]> err.no Git - linux-2.6/blobdiff - include/asm-sh/elf.h
[ALSA] include/sound/: Spelling fixes
[linux-2.6] / include / asm-sh / elf.h
index 61960408e6efc2cc4706b509c7d0b25527802c74..05092da1aa59bdae4c74a5f8903b0cf2fb3e4825 100644 (file)
@@ -62,11 +62,6 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
 
 typedef struct user_fpu_struct elf_fpregset_t;
 
-/*
- * This is used to ensure we don't load something for the wrong architecture.
- */
-#define elf_check_arch(x) ( (x)->e_machine == EM_SH )
-
 /*
  * These are used to set parameters in the core dumps.
  */
@@ -78,6 +73,12 @@ typedef struct user_fpu_struct elf_fpregset_t;
 #endif
 #define ELF_ARCH       EM_SH
 
+#ifdef __KERNEL__
+/*
+ * This is used to ensure we don't load something for the wrong architecture.
+ */
+#define elf_check_arch(x) ( (x)->e_machine == EM_SH )
+
 #define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE      PAGE_SIZE
 
@@ -88,7 +89,6 @@ typedef struct user_fpu_struct elf_fpregset_t;
 
 #define ELF_ET_DYN_BASE         (2 * TASK_SIZE / 3)
 
-
 #define ELF_CORE_COPY_REGS(_dest,_regs)                                \
        memcpy((char *) &_dest, (char *) _regs,                 \
               sizeof(struct pt_regs));
@@ -106,7 +106,7 @@ typedef struct user_fpu_struct elf_fpregset_t;
    For the moment, we have only optimizations for the Intel generations,
    but that could change... */
 
-#define ELF_PLATFORM  (NULL)
+#define ELF_PLATFORM   (utsname()->machine)
 
 #ifdef __SH5__
 #define ELF_PLAT_INIT(_r, load_addr) \
@@ -138,7 +138,6 @@ typedef struct user_fpu_struct elf_fpregset_t;
        _r->sr = SR_FD; } while (0)
 #endif
 
-#ifdef __KERNEL__
 #define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX_32BIT)
 struct task_struct;
 extern int dump_task_regs (struct task_struct *, elf_gregset_t *);
@@ -146,7 +145,6 @@ extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *);
 
 #define ELF_CORE_COPY_TASK_REGS(tsk, elf_regs) dump_task_regs(tsk, elf_regs)
 #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs)
-#endif
 
 #ifdef CONFIG_VSYSCALL
 /* vDSO has arch_setup_additional_pages */
@@ -168,13 +166,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);        \
@@ -182,4 +189,5 @@ do {                                                                \
        NEW_AUX_ENT(AT_L2_CACHESHAPE, l2_cache_shape);          \
 } while (0)
 
+#endif /* __KERNEL__ */
 #endif /* __ASM_SH_ELF_H */