Skip to content

Commit

Permalink
riscv: extable: use ex for exception_table_entry
Browse files Browse the repository at this point in the history
The var name "fixup" is a bit confusing, since this is a
exception_table_entry. Use "ex" instead  to refer to an entire entry.
In subsequent patches we'll use `fixup` to refer to the fixup
field specifically.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
  • Loading branch information
Jisheng Zhang authored and Palmer Dabbelt committed Jan 6, 2022
1 parent ef127bc commit 4c2e7ce
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions arch/riscv/mm/extable.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@

bool fixup_exception(struct pt_regs *regs)
{
const struct exception_table_entry *fixup;
const struct exception_table_entry *ex;

fixup = search_exception_tables(regs->epc);
if (!fixup)
ex = search_exception_tables(regs->epc);
if (!ex)
return false;

if (regs->epc >= BPF_JIT_REGION_START && regs->epc < BPF_JIT_REGION_END)
return rv_bpf_fixup_exception(fixup, regs);
return rv_bpf_fixup_exception(ex, regs);

regs->epc = (unsigned long)&fixup->fixup + fixup->fixup;
regs->epc = (unsigned long)&ex->fixup + ex->fixup;
return true;
}

0 comments on commit 4c2e7ce

Please sign in to comment.