diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/nwfpe/fpa11.h | 4 | ||||
-rw-r--r-- | arch/arm/nwfpe/fpmodule.c | 2 | ||||
-rw-r--r-- | arch/arm/nwfpe/fpmodule.inl | 14 |
3 files changed, 9 insertions, 11 deletions
diff --git a/arch/arm/nwfpe/fpa11.h b/arch/arm/nwfpe/fpa11.h index 45cc65426a22..e4a61aea534b 100644 --- a/arch/arm/nwfpe/fpa11.h +++ b/arch/arm/nwfpe/fpa11.h | |||
@@ -29,9 +29,7 @@ | |||
29 | * stack+task struct. Use the same method as 'current' uses to | 29 | * stack+task struct. Use the same method as 'current' uses to |
30 | * reach them. | 30 | * reach them. |
31 | */ | 31 | */ |
32 | register unsigned long *user_registers asm("sl"); | 32 | #define GET_USERREG() ((struct pt_regs *)(THREAD_START_SP + (unsigned long)current_thread_info()) - 1) |
33 | |||
34 | #define GET_USERREG() (user_registers) | ||
35 | 33 | ||
36 | #include <linux/config.h> | 34 | #include <linux/config.h> |
37 | #include <linux/thread_info.h> | 35 | #include <linux/thread_info.h> |
diff --git a/arch/arm/nwfpe/fpmodule.c b/arch/arm/nwfpe/fpmodule.c index a8efcf34888e..12885f31d347 100644 --- a/arch/arm/nwfpe/fpmodule.c +++ b/arch/arm/nwfpe/fpmodule.c | |||
@@ -132,7 +132,7 @@ void float_raise(signed char flags) | |||
132 | printk(KERN_DEBUG | 132 | printk(KERN_DEBUG |
133 | "NWFPE: %s[%d] takes exception %08x at %p from %08lx\n", | 133 | "NWFPE: %s[%d] takes exception %08x at %p from %08lx\n", |
134 | current->comm, current->pid, flags, | 134 | current->comm, current->pid, flags, |
135 | __builtin_return_address(0), GET_USERREG()[15]); | 135 | __builtin_return_address(0), GET_USERREG()->ARM_pc); |
136 | #endif | 136 | #endif |
137 | 137 | ||
138 | /* Keep SoftFloat exception flags up to date. */ | 138 | /* Keep SoftFloat exception flags up to date. */ |
diff --git a/arch/arm/nwfpe/fpmodule.inl b/arch/arm/nwfpe/fpmodule.inl index e5f59e9a3022..2c39ad408f22 100644 --- a/arch/arm/nwfpe/fpmodule.inl +++ b/arch/arm/nwfpe/fpmodule.inl | |||
@@ -28,8 +28,8 @@ static inline unsigned long readRegister(const unsigned int nReg) | |||
28 | for this in this routine. LDF/STF instructions with Rn = PC | 28 | for this in this routine. LDF/STF instructions with Rn = PC |
29 | depend on the PC being correct, as they use PC+8 in their | 29 | depend on the PC being correct, as they use PC+8 in their |
30 | address calculations. */ | 30 | address calculations. */ |
31 | unsigned long *userRegisters = GET_USERREG(); | 31 | struct pt_regs *regs = GET_USERREG(); |
32 | unsigned int val = userRegisters[nReg]; | 32 | unsigned int val = regs->uregs[nReg]; |
33 | if (REG_PC == nReg) | 33 | if (REG_PC == nReg) |
34 | val -= 4; | 34 | val -= 4; |
35 | return val; | 35 | return val; |
@@ -38,8 +38,8 @@ static inline unsigned long readRegister(const unsigned int nReg) | |||
38 | static inline void | 38 | static inline void |
39 | writeRegister(const unsigned int nReg, const unsigned long val) | 39 | writeRegister(const unsigned int nReg, const unsigned long val) |
40 | { | 40 | { |
41 | unsigned long *userRegisters = GET_USERREG(); | 41 | struct pt_regs *regs = GET_USERREG(); |
42 | userRegisters[nReg] = val; | 42 | regs->uregs[nReg] = val; |
43 | } | 43 | } |
44 | 44 | ||
45 | static inline unsigned long readCPSR(void) | 45 | static inline unsigned long readCPSR(void) |
@@ -63,12 +63,12 @@ static inline unsigned long readConditionCodes(void) | |||
63 | 63 | ||
64 | static inline void writeConditionCodes(const unsigned long val) | 64 | static inline void writeConditionCodes(const unsigned long val) |
65 | { | 65 | { |
66 | unsigned long *userRegisters = GET_USERREG(); | 66 | struct pt_regs *regs = GET_USERREG(); |
67 | unsigned long rval; | 67 | unsigned long rval; |
68 | /* | 68 | /* |
69 | * Operate directly on userRegisters since | 69 | * Operate directly on userRegisters since |
70 | * the CPSR may be the PC register itself. | 70 | * the CPSR may be the PC register itself. |
71 | */ | 71 | */ |
72 | rval = userRegisters[REG_CPSR] & ~CC_MASK; | 72 | rval = regs->ARM_cpsr & ~CC_MASK; |
73 | userRegisters[REG_CPSR] = rval | (val & CC_MASK); | 73 | regs->ARM_cpsr = rval | (val & CC_MASK); |
74 | } | 74 | } |