sh: Provide the FPSCR init through AT_FPUCW.
authorPaul Mundt <lethal@linux-sh.org>
Mon, 10 Dec 2007 07:21:57 +0000 (16:21 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 28 Jan 2008 04:19:00 +0000 (13:19 +0900)
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
include/asm-sh/auxvec.h
include/asm-sh/elf.h
include/asm-sh/system.h

index 4069858f813113ff7da5fdbcca3f1e7b4b6b1cda..a6b9d4f4859e36c9d9b0d6c09e57ce2afb176ab5 100644 (file)
@@ -6,6 +6,12 @@
  * for more of them.
  */
 
+/*
+ * This entry gives some information about the FPU initialization
+ * performed by the kernel.
+ */
+#define AT_FPUCW               18      /* Used FPU control word.  */
+
 #ifdef CONFIG_VSYSCALL
 /*
  * Only define this in the vsyscall case, the entry point to
index 9a95f8cb2e1316cb7af1ed44ad544f7a7c2ae9de..e00a58cb476c49086aa327e943807eea7503facc 100644 (file)
@@ -169,13 +169,22 @@ extern void __kernel_vsyscall;
 #define VSYSCALL_AUX_ENT
 #endif /* CONFIG_VSYSCALL */
 
+#ifdef CONFIG_SH_FPU
+#define FPU_AUX_ENT    NEW_AUX_ENT(AT_FPUCW, FPSCR_INIT)
+#else
+#define FPU_AUX_ENT
+#endif
+
 extern int l1i_cache_shape, l1d_cache_shape, l2_cache_shape;
 
 /* update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes */
 #define ARCH_DLINFO                                            \
 do {                                                           \
+       /* Optional FPU initialization */                       \
+       FPU_AUX_ENT;                                            \
+                                                               \
        /* Optional vsyscall entry */                           \
-       VSYSCALL_AUX_ENT                                        \
+       VSYSCALL_AUX_ENT;                                       \
                                                                \
        /* Cache desc */                                        \
        NEW_AUX_ENT(AT_L1I_CACHESHAPE, l1i_cache_shape);        \
index 84592555ba2a3c5f11b107d40ffd57008e9b1e56..772cd1a0a67467a479ed5a66c4d7f804204c6639 100644 (file)
@@ -12,7 +12,7 @@
 #include <asm/types.h>
 #include <asm/ptrace.h>
 
-#define AT_VECTOR_SIZE_ARCH 4 /* entries in ARCH_DLINFO */
+#define AT_VECTOR_SIZE_ARCH 5 /* entries in ARCH_DLINFO */
 
 #if defined(CONFIG_CPU_SH4A) || defined(CONFIG_CPU_SH5)
 #define __icbi()                       \