diff options
author | Tong Tiangen <tongtiangen@huawei.com> | 2022-06-21 07:26:34 +0000 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2022-06-28 12:11:47 +0100 |
commit | bacac637025c2d73c2af5188e5a12008c5869df9 (patch) | |
tree | 854e20f35189235a5aeaaf1392f3ef7a6c7d3faf | |
parent | e4208e80a353b5ee1d2ae4681bd41f62a3391958 (diff) | |
download | linux-bacac637025c2d73c2af5188e5a12008c5869df9.tar.gz linux-bacac637025c2d73c2af5188e5a12008c5869df9.tar.bz2 linux-bacac637025c2d73c2af5188e5a12008c5869df9.zip |
arm64: extable: cleanup redundant extable type EX_TYPE_FIXUP
Currently, extable type EX_TYPE_FIXUP is no place to use, We can safely
remove it.
Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Tong Tiangen <tongtiangen@huawei.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20220621072638.1273594-7-tongtiangen@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
-rw-r--r-- | arch/arm64/include/asm/asm-extable.h | 23 | ||||
-rw-r--r-- | arch/arm64/mm/extable.c | 9 |
2 files changed, 4 insertions, 28 deletions
diff --git a/arch/arm64/include/asm/asm-extable.h b/arch/arm64/include/asm/asm-extable.h index b97213d292ce..980d1dd8e1a3 100644 --- a/arch/arm64/include/asm/asm-extable.h +++ b/arch/arm64/include/asm/asm-extable.h @@ -6,11 +6,10 @@ #include <asm/gpr-num.h> #define EX_TYPE_NONE 0 -#define EX_TYPE_FIXUP 1 -#define EX_TYPE_BPF 2 -#define EX_TYPE_UACCESS_ERR_ZERO 3 -#define EX_TYPE_KACCESS_ERR_ZERO 4 -#define EX_TYPE_LOAD_UNALIGNED_ZEROPAD 5 +#define EX_TYPE_BPF 1 +#define EX_TYPE_UACCESS_ERR_ZERO 2 +#define EX_TYPE_KACCESS_ERR_ZERO 3 +#define EX_TYPE_LOAD_UNALIGNED_ZEROPAD 4 /* Data fields for EX_TYPE_UACCESS_ERR_ZERO */ #define EX_DATA_REG_ERR_SHIFT 0 @@ -35,9 +34,6 @@ .short (data); \ .popsection; -#define _ASM_EXTABLE(insn, fixup) \ - __ASM_EXTABLE_RAW(insn, fixup, EX_TYPE_FIXUP, 0) - #define EX_DATA_REG(reg, gpr) \ (.L__gpr_num_##gpr << EX_DATA_REG_##reg##_SHIFT) @@ -56,14 +52,6 @@ _ASM_EXTABLE_UACCESS_ERR_ZERO(insn, fixup, wzr, wzr) /* - * Create an exception table entry for `insn`, which will branch to `fixup` - * when an unhandled fault is taken. - */ - .macro _asm_extable, insn, fixup - _ASM_EXTABLE(\insn, \fixup) - .endm - -/* * Create an exception table entry for uaccess `insn`, which will branch to `fixup` * when an unhandled fault is taken. */ @@ -94,9 +82,6 @@ ".short (" data ")\n" \ ".popsection\n" -#define _ASM_EXTABLE(insn, fixup) \ - __ASM_EXTABLE_RAW(#insn, #fixup, __stringify(EX_TYPE_FIXUP), "0") - #define EX_DATA_REG(reg, gpr) \ "((.L__gpr_num_" #gpr ") << " __stringify(EX_DATA_REG_##reg##_SHIFT) ")" diff --git a/arch/arm64/mm/extable.c b/arch/arm64/mm/extable.c index 056591e5ca80..228d681a8715 100644 --- a/arch/arm64/mm/extable.c +++ b/arch/arm64/mm/extable.c @@ -16,13 +16,6 @@ get_ex_fixup(const struct exception_table_entry *ex) return ((unsigned long)&ex->fixup + ex->fixup); } -static bool ex_handler_fixup(const struct exception_table_entry *ex, - struct pt_regs *regs) -{ - regs->pc = get_ex_fixup(ex); - return true; -} - static bool ex_handler_uaccess_err_zero(const struct exception_table_entry *ex, struct pt_regs *regs) { @@ -72,8 +65,6 @@ bool fixup_exception(struct pt_regs *regs) return false; switch (ex->type) { - case EX_TYPE_FIXUP: - return ex_handler_fixup(ex, regs); case EX_TYPE_BPF: return ex_handler_bpf(ex, regs); case EX_TYPE_UACCESS_ERR_ZERO: |