[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>
This commit is contained in:
@@ -242,7 +242,6 @@ static unsigned int get_fault_insn(struct pt_regs *regs, unsigned int insn)
|
||||
static void do_kernel_fault(struct pt_regs *regs, int si_code, int fault_code,
|
||||
unsigned int insn, unsigned long address)
|
||||
{
|
||||
unsigned long g2;
|
||||
unsigned char asi = ASI_P;
|
||||
|
||||
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,
|
||||
}
|
||||
}
|
||||
|
||||
g2 = regs->u_regs[UREG_G2];
|
||||
|
||||
/* Is this in ex_table? */
|
||||
if (regs->tstate & TSTATE_PRIV) {
|
||||
unsigned long fixup;
|
||||
const struct exception_table_entry *entry;
|
||||
|
||||
if (asi == ASI_P && (insn & 0xc0800000) == 0xc0800000) {
|
||||
if (insn & 0x2000)
|
||||
@@ -288,10 +285,9 @@ static void do_kernel_fault(struct pt_regs *regs, int si_code, int fault_code,
|
||||
|
||||
/* Look in asi.h: All _S asis have LS bit set */
|
||||
if ((asi & 0x1) &&
|
||||
(fixup = search_extables_range(regs->tpc, &g2))) {
|
||||
regs->tpc = fixup;
|
||||
(entry = search_exception_tables(regs->tpc))) {
|
||||
regs->tpc = entry->fixup;
|
||||
regs->tnpc = regs->tpc + 4;
|
||||
regs->u_regs[UREG_G2] = g2;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user