[SPARC64]: Convert to use generic exception table support.
[deliverable/linux.git] / arch / sparc64 / mm / fault.c
index db1e3310e907dc2ba2f4c60a237f2c69664964ff..59dc9a2ece5a0436d45650bc72909b798165298d 100644 (file)
@@ -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 {
This page took 0.02466 seconds and 5 git commands to generate.