diff options
Diffstat (limited to 'arch/mips/math-emu/kernel_linkage.c')
-rw-r--r-- | arch/mips/math-emu/kernel_linkage.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/arch/mips/math-emu/kernel_linkage.c b/arch/mips/math-emu/kernel_linkage.c index d187ab71c2ff..56ca0c6a7178 100644 --- a/arch/mips/math-emu/kernel_linkage.c +++ b/arch/mips/math-emu/kernel_linkage.c | |||
@@ -39,9 +39,9 @@ void fpu_emulator_init_fpu(void) | |||
39 | printk("Algorithmics/MIPS FPU Emulator v1.5\n"); | 39 | printk("Algorithmics/MIPS FPU Emulator v1.5\n"); |
40 | } | 40 | } |
41 | 41 | ||
42 | current->thread.fpu.soft.fcr31 = 0; | 42 | current->thread.fpu.fcr31 = 0; |
43 | for (i = 0; i < 32; i++) { | 43 | for (i = 0; i < 32; i++) { |
44 | current->thread.fpu.soft.fpr[i] = SIGNALLING_NAN; | 44 | current->thread.fpu.fpr[i] = SIGNALLING_NAN; |
45 | } | 45 | } |
46 | } | 46 | } |
47 | 47 | ||
@@ -59,10 +59,9 @@ int fpu_emulator_save_context(struct sigcontext *sc) | |||
59 | 59 | ||
60 | for (i = 0; i < 32; i++) { | 60 | for (i = 0; i < 32; i++) { |
61 | err |= | 61 | err |= |
62 | __put_user(current->thread.fpu.soft.fpr[i], | 62 | __put_user(current->thread.fpu.fpr[i], &sc->sc_fpregs[i]); |
63 | &sc->sc_fpregs[i]); | ||
64 | } | 63 | } |
65 | err |= __put_user(current->thread.fpu.soft.fcr31, &sc->sc_fpc_csr); | 64 | err |= __put_user(current->thread.fpu.fcr31, &sc->sc_fpc_csr); |
66 | 65 | ||
67 | return err; | 66 | return err; |
68 | } | 67 | } |
@@ -74,10 +73,9 @@ int fpu_emulator_restore_context(struct sigcontext *sc) | |||
74 | 73 | ||
75 | for (i = 0; i < 32; i++) { | 74 | for (i = 0; i < 32; i++) { |
76 | err |= | 75 | err |= |
77 | __get_user(current->thread.fpu.soft.fpr[i], | 76 | __get_user(current->thread.fpu.fpr[i], &sc->sc_fpregs[i]); |
78 | &sc->sc_fpregs[i]); | ||
79 | } | 77 | } |
80 | err |= __get_user(current->thread.fpu.soft.fcr31, &sc->sc_fpc_csr); | 78 | err |= __get_user(current->thread.fpu.fcr31, &sc->sc_fpc_csr); |
81 | 79 | ||
82 | return err; | 80 | return err; |
83 | } | 81 | } |
@@ -94,10 +92,9 @@ int fpu_emulator_save_context32(struct sigcontext32 *sc) | |||
94 | 92 | ||
95 | for (i = 0; i < 32; i+=2) { | 93 | for (i = 0; i < 32; i+=2) { |
96 | err |= | 94 | err |= |
97 | __put_user(current->thread.fpu.soft.fpr[i], | 95 | __put_user(current->thread.fpu.fpr[i], &sc->sc_fpregs[i]); |
98 | &sc->sc_fpregs[i]); | ||
99 | } | 96 | } |
100 | err |= __put_user(current->thread.fpu.soft.fcr31, &sc->sc_fpc_csr); | 97 | err |= __put_user(current->thread.fpu.fcr31, &sc->sc_fpc_csr); |
101 | 98 | ||
102 | return err; | 99 | return err; |
103 | } | 100 | } |
@@ -109,10 +106,9 @@ int fpu_emulator_restore_context32(struct sigcontext32 *sc) | |||
109 | 106 | ||
110 | for (i = 0; i < 32; i+=2) { | 107 | for (i = 0; i < 32; i+=2) { |
111 | err |= | 108 | err |= |
112 | __get_user(current->thread.fpu.soft.fpr[i], | 109 | __get_user(current->thread.fpu.fpr[i], &sc->sc_fpregs[i]); |
113 | &sc->sc_fpregs[i]); | ||
114 | } | 110 | } |
115 | err |= __get_user(current->thread.fpu.soft.fcr31, &sc->sc_fpc_csr); | 111 | err |= __get_user(current->thread.fpu.fcr31, &sc->sc_fpc_csr); |
116 | 112 | ||
117 | return err; | 113 | return err; |
118 | } | 114 | } |