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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sat Jan  7 15:34:27 2012 +0100

hal: introduce support for mm tracking w/ pipeline core

---

 include/asm-arm/hal.h     |    4 ++++
 include/asm-nios2/hal.h   |    4 ----
 include/asm-powerpc/hal.h |    8 ++++++--
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/include/asm-arm/hal.h b/include/asm-arm/hal.h
index a9a09bb..bbe263a 100644
--- a/include/asm-arm/hal.h
+++ b/include/asm-arm/hal.h
@@ -193,7 +193,11 @@ static inline void rthal_timer_program_shot (unsigned long 
delay)
 static inline struct mm_struct *rthal_get_active_mm(void)
 {
 #ifdef TIF_MMSWITCH_INT
+#ifdef CONFIG_IPIPE_CORE
+       return __this_cpu_read(ipipe_percpu.active_mm);
+#else
        return per_cpu(ipipe_active_mm, smp_processor_id());
+#endif
 #else /* !TIF_MMSWITCH_INT */
        return current->active_mm;
 #endif /* !TIF_MMSWITCH_INT */
diff --git a/include/asm-nios2/hal.h b/include/asm-nios2/hal.h
index a6bcf49..909b87d 100644
--- a/include/asm-nios2/hal.h
+++ b/include/asm-nios2/hal.h
@@ -67,11 +67,7 @@ static inline void rthal_timer_program_shot(unsigned long 
delay)
 
 static inline struct mm_struct *rthal_get_active_mm(void)
 {
-#ifdef CONFIG_XENO_HW_UNLOCKED_SWITCH
-       return per_cpu(ipipe_active_mm, ipipe_processor_id());
-#else
        return current->active_mm;
-#endif
 }
 
 #ifdef CONFIG_XENO_OPT_TIMING_PERIODIC
diff --git a/include/asm-powerpc/hal.h b/include/asm-powerpc/hal.h
index 016a3c4..9cf6134 100644
--- a/include/asm-powerpc/hal.h
+++ b/include/asm-powerpc/hal.h
@@ -104,10 +104,14 @@ static inline void rthal_timer_program_shot(unsigned long 
delay)
 static inline struct mm_struct *rthal_get_active_mm(void)
 {
 #ifdef CONFIG_XENO_HW_UNLOCKED_SWITCH
-       return per_cpu(ipipe_active_mm, smp_processor_id());
+#ifdef CONFIG_IPIPE_CORE
+       return __this_cpu_read(ipipe_percpu.active_mm);
 #else
-       return current->active_mm;
+       return per_cpu(ipipe_active_mm, smp_processor_id());
 #endif
+#else  /* !CONFIG_XENO_HW_UNLOCKED_SWITCH */
+       return current->active_mm;
+#endif  /* !CONFIG_XENO_HW_UNLOCKED_SWITCH */
 }
 
     /* Private interface -- Internal use only */


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to