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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Mon Jul 13 19:20:37 2009 +0200

powerpc: fix fpu backup area layout

---

 include/asm-powerpc/hal.h      |   25 +++++++++++++------------
 include/asm-powerpc/wrappers.h |    4 ++++
 2 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/include/asm-powerpc/hal.h b/include/asm-powerpc/hal.h
index 5e36ebc..afd061a 100644
--- a/include/asm-powerpc/hal.h
+++ b/include/asm-powerpc/hal.h
@@ -121,18 +121,19 @@ asmlinkage void rthal_thread_trampoline(void);
 #ifdef CONFIG_XENO_HW_FPU
 
 typedef struct rthal_fpenv {
-
-       /* This layout must follow exactely the definition of the FPU
-          backup area in a PPC thread struct available from
-          <asm-ppc/processor.h>. Specifically, fpr[] an fpscr words must
-          be contiguous in memory (see arch/powerpc/hal/fpu.S). */
-
-       double fpr[32];
-#ifndef CONFIG_PPC64
-       unsigned long fpscr_pad;        /* <= Hi-word of the FPR used to */
-#endif
-       unsigned long fpscr;    /* retrieve the FPSCR. */
-
+       /*
+        * This layout must follow exactely the definition of the FPU
+        * backup area in a PPC thread struct available from
+        * <arch/powerpc/include/asm/processor.h>. Specifically, fpr[]
+        * an fpscr struct must be contiguous in memory (see
+        * ksrc/arch/powerpc/fpu.S).
+        */
+       double          fpr[32][TS_FPRWIDTH];
+       struct {
+
+               unsigned int pad;
+               unsigned int val;       /* Floating point status */
+       } fpscr;
 } rthal_fpenv_t;
 
 void rthal_init_fpu(rthal_fpenv_t * fpuenv);
diff --git a/include/asm-powerpc/wrappers.h b/include/asm-powerpc/wrappers.h
index b242729..d518a04 100644
--- a/include/asm-powerpc/wrappers.h
+++ b/include/asm-powerpc/wrappers.h
@@ -177,4 +177,8 @@ typedef irq_handler_t rthal_irq_host_handler_t;
 #define rthal_irq_chip_end(irq)      ({ rthal_irq_descp(irq)->ipipe_end(irq, 
rthal_irq_descp(irq)); 0; })
 #endif
 
+#ifndef TS_FPRWIDTH
+#define TS_FPRWIDTH  1
+#endif
+
 #endif /* _XENO_ASM_POWERPC_WRAPPERS_H */


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

Reply via email to