Module: xenomai-head Branch: master Commit: 28ddf349c7e4d2abcceca61ceae542d9f89f0b6c URL: http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=28ddf349c7e4d2abcceca61ceae542d9f89f0b6c
Author: Gilles Chanteperdrix <[email protected]> Date: Wed Oct 12 12:59:05 2011 +0200 arm: fix context switch for linux 2.6.38 --- ksrc/arch/arm/switch.S | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ksrc/arch/arm/switch.S b/ksrc/arch/arm/switch.S index f48eb05..a5bee60 100644 --- a/ksrc/arch/arm/switch.S +++ b/ksrc/arch/arm/switch.S @@ -37,6 +37,16 @@ .endm #endif +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 37) +#ifdef CONFIG_MMU +#define USE_DOMAINS +#endif /* CONFIG_MMU */ +#else /* Linux >= 2.6.38 */ +#ifdef CONFIG_CPU_USE_DOMAINS +#define USE_DOMAINS +#endif /* CONFIG_CPU_USE_DOMAINS */ +#endif /* Linux >= 2.6.38 */ + .macro fpu_switch tmp #ifdef CONFIG_VFP @ Always disable VFP so we can lazily save/restore the old @@ -127,13 +137,13 @@ ENTRY(rthal_thread_switch) add ip, r1, #TI_CPU_SAVE ldr r3, [r2, #TI_TP_VALUE] stmia ip!, {r4 - sl, fp, sp, lr} @ Store most regs on stack -#ifdef CONFIG_MMU +#ifdef USE_DOMAINS ldr r6, [r2, #TI_CPU_DOMAIN] #endif clear_exclusive_monitor set_tls r3, r4, r5 -#ifdef CONFIG_MMU +#ifdef USE_DOMAINS mcr p15, 0, r6, c3, c0, 0 @ Set domain register #endif fpu_switch r4 _______________________________________________ Xenomai-git mailing list [email protected] https://mail.gna.org/listinfo/xenomai-git
