Commit 54b703ed authored by David S. Miller's avatar David S. Miller

[SPARC64]: Fix typos in Rustys extable changes.

parent 66b9bcb8
...@@ -149,17 +149,17 @@ void data_access_exception (struct pt_regs *regs, ...@@ -149,17 +149,17 @@ void data_access_exception (struct pt_regs *regs,
if (regs->tstate & TSTATE_PRIV) { if (regs->tstate & TSTATE_PRIV) {
/* Test if this comes from uaccess places. */ /* Test if this comes from uaccess places. */
const struct exception_table_entry *entry; unsigned long fixup;
unsigned long g2 = regs->u_regs[UREG_G2]; unsigned long g2 = regs->u_regs[UREG_G2];
if ((entry = search_extables_range(regs->tpc, &g2))) { if ((fixup = search_extables_range(regs->tpc, &g2))) {
/* Ouch, somebody is trying ugly VM hole tricks on us... */ /* Ouch, somebody is trying ugly VM hole tricks on us... */
#ifdef DEBUG_EXCEPTIONS #ifdef DEBUG_EXCEPTIONS
printk("Exception: PC<%016lx> faddr<UNKNOWN>\n", regs->tpc); printk("Exception: PC<%016lx> faddr<UNKNOWN>\n", regs->tpc);
printk("EX_TABLE: insn<%016lx> fixup<%016lx> " printk("EX_TABLE: insn<%016lx> fixup<%016lx> "
"g2<%016lx>\n", regs->tpc, entry->fixup, g2); "g2<%016lx>\n", regs->tpc, fixup, g2);
#endif #endif
regs->tpc = entry->fixup; regs->tpc = fixup;
regs->tnpc = regs->tpc + 4; regs->tnpc = regs->tpc + 4;
regs->u_regs[UREG_G2] = g2; regs->u_regs[UREG_G2] = g2;
return; return;
...@@ -1390,8 +1390,8 @@ void cheetah_deferred_handler(struct pt_regs *regs, unsigned long afsr, unsigned ...@@ -1390,8 +1390,8 @@ void cheetah_deferred_handler(struct pt_regs *regs, unsigned long afsr, unsigned
/* Only perform fixup if we still have a /* Only perform fixup if we still have a
* recoverable condition. * recoverable condition.
*/ */
if (entry && recoverable) { if (recoverable) {
regs->tpc = entry->fixup; regs->tpc = fixup;
regs->tnpc = regs->tpc + 4; regs->tnpc = regs->tpc + 4;
regs->u_regs[UREG_G2] = g2; regs->u_regs[UREG_G2] = g2;
} }
......
...@@ -361,7 +361,7 @@ void kernel_mna_trap_fault(struct pt_regs *regs, unsigned int insn) __asm__ ("ke ...@@ -361,7 +361,7 @@ void kernel_mna_trap_fault(struct pt_regs *regs, unsigned int insn) __asm__ ("ke
void kernel_mna_trap_fault(struct pt_regs *regs, unsigned int insn) void kernel_mna_trap_fault(struct pt_regs *regs, unsigned int insn)
{ {
unsigned long g2 = regs->u_regs [UREG_G2]; unsigned long g2 = regs->u_regs [UREG_G2];
unsigned long fixup = search_exception_table (regs->tpc, &g2); unsigned long fixup = search_extables_range(regs->tpc, &g2);
if (!fixup) { if (!fixup) {
unsigned long address = compute_effective_address(regs, insn, ((insn >> 25) & 0x1f)); unsigned long address = compute_effective_address(regs, insn, ((insn >> 25) & 0x1f));
......
...@@ -31,7 +31,7 @@ search_extable(const struct exception_table_entry *start, ...@@ -31,7 +31,7 @@ search_extable(const struct exception_table_entry *start,
*/ */
/* 1. Try to find an exact match. */ /* 1. Try to find an exact match. */
for (walk = start; walk <= end; walk++) { for (walk = start; walk <= last; walk++) {
if (walk->fixup == 0) { if (walk->fixup == 0) {
/* A range entry, skip both parts. */ /* A range entry, skip both parts. */
walk++; walk++;
...@@ -43,7 +43,7 @@ search_extable(const struct exception_table_entry *start, ...@@ -43,7 +43,7 @@ search_extable(const struct exception_table_entry *start,
} }
/* 2. Try to find a range match. */ /* 2. Try to find a range match. */
for (walk = start; walk <= (end - 1); walk++) { for (walk = start; walk <= (last - 1); walk++) {
if (walk->fixup) if (walk->fixup)
continue; continue;
......
...@@ -286,7 +286,7 @@ static void do_kernel_fault(struct pt_regs *regs, int si_code, int fault_code, ...@@ -286,7 +286,7 @@ 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 */ /* Look in asi.h: All _S asis have LS bit set */
if ((asi & 0x1) && if ((asi & 0x1) &&
(fizup = search_extables_range(regs->tpc, &g2))) { (fixup = search_extables_range(regs->tpc, &g2))) {
regs->tpc = fixup; regs->tpc = fixup;
regs->tnpc = regs->tpc + 4; regs->tnpc = regs->tpc + 4;
regs->u_regs[UREG_G2] = g2; regs->u_regs[UREG_G2] = g2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment