]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/mips/include/asm/elf.h
MIPS: Respect the ISA level in FCSR handling
[karo-tx-linux.git] / arch / mips / include / asm / elf.h
index 535f196ffe02da7ad769ab0b7053b4dd5253dd82..612cf519bd889db63f9265eb2dde151f551ba7ac 100644 (file)
@@ -11,6 +11,9 @@
 #include <linux/fs.h>
 #include <uapi/linux/elf.h>
 
+#include <asm/cpu-info.h>
+#include <asm/current.h>
+
 /* ELF header e_flags defines. */
 /* MIPS architecture level. */
 #define EF_MIPS_ARCH_1         0x00000000      /* -mips1 code.  */
@@ -297,6 +300,8 @@ do {                                                                        \
        mips_set_personality_fp(state);                                 \
                                                                        \
        current->thread.abi = &mips_abi;                                \
+                                                                       \
+       current->thread.fpu.fcr31 = current_cpu_data.fpu_csr31;         \
 } while (0)
 
 #endif /* CONFIG_32BIT */
@@ -356,6 +361,8 @@ do {                                                                        \
        else                                                            \
                current->thread.abi = &mips_abi;                        \
                                                                        \
+       current->thread.fpu.fcr31 = current_cpu_data.fpu_csr31;         \
+                                                                       \
        p = personality(current->personality);                          \
        if (p != PER_LINUX32 && p != PER_LINUX)                         \
                set_personality(PER_LINUX);                             \