Module: xenomai-2.6
Branch: master
Commit: 9796a511cc2d360ca655171255a8fdacd65ebba9
URL:    
http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=9796a511cc2d360ca655171255a8fdacd65ebba9

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Wed Jun  5 08:03:39 2013 +0200

hal/arm: replace config check with compile check

Starting with Linux 3.8, due to the change in the ASID roll-over mechanism,
we can disable unlocked context switch on SMP platforms, which improves
user-space scheduling latency and may provide a more interesting trade-off
especially since SMP platforms do not flush the cache on mm switch, so have
short mm switch time.

So, replace the Kconfig check that was forcing unlocked context switch on SMP,
with a compile-time check, which takes the kernel version into account.

---

 include/asm-arm/wrappers.h |    5 +++++
 ksrc/arch/arm/Kconfig      |    9 ++-------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/asm-arm/wrappers.h b/include/asm-arm/wrappers.h
index b170d3a..6706ff9 100644
--- a/include/asm-arm/wrappers.h
+++ b/include/asm-arm/wrappers.h
@@ -115,4 +115,9 @@ static inline void fp_init(union fp_state *state)
 #define CONFIG_XENO_HW_UNLOCKED_SWITCH         1
 #endif
 
+#if defined(CONFIG_SMP) && !defined(CONFIG_XENO_HW_UNLOCKED_SWITCH) && \
+       LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
+#error "Xenomai: ARM SMP systems require unlocked context switch prior to 
Linux 3.8"
+#endif
+
 #endif /* _XENO_ASM_ARM_WRAPPERS_H */
diff --git a/ksrc/arch/arm/Kconfig b/ksrc/arch/arm/Kconfig
index f400faa..ade963a 100644
--- a/ksrc/arch/arm/Kconfig
+++ b/ksrc/arch/arm/Kconfig
@@ -24,11 +24,6 @@ config IPIPE_WANT_PREEMPTIBLE_SWITCH
 config IPIPE_WANT_ACTIVE_MM
        def_bool y
 
-config SELECT_HW_UNLOCKED_SWITCH_ON_SMP
-       bool
-       select XENO_HW_UNLOCKED_SWITCH
-       default y if SMP
-
 config XENO_HW_FPU
        bool "Enable FPU support"
        default y
@@ -51,9 +46,9 @@ config XENO_HW_UNLOCKED_SWITCH
 
        This option reduces interrupt latency when costly cache and
        TLB flushes are required to switch context, and is mandatory
-       on SMP/multi-core systems.
+       on SMP/multi-core systems prior to Linux 3.8.
 
-       You definitely want to enable that option on embedded ARM
+       You definitely want to enable that option on low-end ARM
        platforms.
 
 endmenu


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to