diff options
Diffstat (limited to 'arch/sparc64/mm/fault.c')
-rw-r--r-- | arch/sparc64/mm/fault.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c index db1e3310e907..59dc9a2ece5a 100644 --- a/arch/sparc64/mm/fault.c +++ b/arch/sparc64/mm/fault.c | |||
@@ -242,7 +242,6 @@ static unsigned int get_fault_insn(struct pt_regs *regs, unsigned int insn) | |||
242 | static void do_kernel_fault(struct pt_regs *regs, int si_code, int fault_code, | 242 | static void do_kernel_fault(struct pt_regs *regs, int si_code, int fault_code, |
243 | unsigned int insn, unsigned long address) | 243 | unsigned int insn, unsigned long address) |
244 | { | 244 | { |
245 | unsigned long g2; | ||
246 | unsigned char asi = ASI_P; | 245 | unsigned char asi = ASI_P; |
247 | 246 | ||
248 | if ((!insn) && (regs->tstate & TSTATE_PRIV)) | 247 | if ((!insn) && (regs->tstate & TSTATE_PRIV)) |
@@ -273,11 +272,9 @@ static void do_kernel_fault(struct pt_regs *regs, int si_code, int fault_code, | |||
273 | } | 272 | } |
274 | } | 273 | } |
275 | 274 | ||
276 | g2 = regs->u_regs[UREG_G2]; | ||
277 | |||
278 | /* Is this in ex_table? */ | 275 | /* Is this in ex_table? */ |
279 | if (regs->tstate & TSTATE_PRIV) { | 276 | if (regs->tstate & TSTATE_PRIV) { |
280 | unsigned long fixup; | 277 | const struct exception_table_entry *entry; |
281 | 278 | ||
282 | if (asi == ASI_P && (insn & 0xc0800000) == 0xc0800000) { | 279 | if (asi == ASI_P && (insn & 0xc0800000) == 0xc0800000) { |
283 | if (insn & 0x2000) | 280 | if (insn & 0x2000) |
@@ -288,10 +285,9 @@ static void do_kernel_fault(struct pt_regs *regs, int si_code, int fault_code, | |||
288 | 285 | ||
289 | /* Look in asi.h: All _S asis have LS bit set */ | 286 | /* Look in asi.h: All _S asis have LS bit set */ |
290 | if ((asi & 0x1) && | 287 | if ((asi & 0x1) && |
291 | (fixup = search_extables_range(regs->tpc, &g2))) { | 288 | (entry = search_exception_tables(regs->tpc))) { |
292 | regs->tpc = fixup; | 289 | regs->tpc = entry->fixup; |
293 | regs->tnpc = regs->tpc + 4; | 290 | regs->tnpc = regs->tpc + 4; |
294 | regs->u_regs[UREG_G2] = g2; | ||
295 | return; | 291 | return; |
296 | } | 292 | } |
297 | } else { | 293 | } else { |