Module: xenomai-2.4
Branch: master
Commit: 2479aac52eb50b50a186a15f87f3cc46cba1958c
URL:    
http://git.xenomai.org/?p=xenomai-2.4.git;a=commit;h=2479aac52eb50b50a186a15f87f3cc46cba1958c

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Jul 16 20:05:33 2009 +0200

powerpc: flip FE0/FE1 when saving/restoring the FPU in RT mode

---

 include/asm-powerpc/bits/pod.h |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/asm-powerpc/bits/pod.h b/include/asm-powerpc/bits/pod.h
index d9c5f95..5710f8f 100644
--- a/include/asm-powerpc/bits/pod.h
+++ b/include/asm-powerpc/bits/pod.h
@@ -226,8 +226,9 @@ static inline void xnarch_save_fpu(xnarchtcb_t * tcb)
        if (tcb->fpup) {
                rthal_save_fpu(tcb->fpup);
 
-               if (tcb->user_fpu_owner && tcb->user_fpu_owner->thread.regs)
-                       tcb->user_fpu_owner->thread.regs->msr &= ~MSR_FP;
+               if (tcb->user_fpu_owner &&
+                   tcb->user_fpu_owner->thread.regs)
+                       tcb->user_fpu_owner->thread.regs->msr &= 
~(MSR_FP|MSR_FE0|MSR_FE1);
        }
 #endif /* CONFIG_XENO_HW_FPU */
 }
@@ -244,7 +245,7 @@ static inline void xnarch_restore_fpu(xnarchtcb_t * tcb)
                 */
                if (tcb->user_fpu_owner &&
                    tcb->user_fpu_owner->thread.regs)
-                       tcb->user_fpu_owner->thread.regs->msr |= MSR_FP;
+                       tcb->user_fpu_owner->thread.regs->msr |= 
(MSR_FP|MSR_FE0|MSR_FE1);
        }
 
        /* FIXME: We restore FPU "as it was" when Xenomai preempted Linux,


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

Reply via email to