diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2005-09-28 23:21:11 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-09-28 23:21:11 -0400 |
commit | 8cf14af0a740fb7e9f94a203b5a989beb875d58f (patch) | |
tree | a7bec4d60c352e780d6a2b75e9b95e637e3a14f7 /arch/sparc64/mm/fault.c | |
parent | 705747ab87c96f1b4b8e73ba617c323d9087f6ac (diff) |
[SPARC64]: Convert to use generic exception table support.
The funny "range" exception table entries we had were only
used by the compat layer socketcall assembly, and it wasn't
even needed there.
For free we now get proper exception table sorting and fast
binary searching.
Signed-off-by: David S. Miller <davem@davemloft.net>
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 { |