arm64: entry: convert IRQ+FIQ handlers to C
authorMark Rutland <mark.rutland@arm.com>
Mon, 7 Jun 2021 09:46:11 +0000 (10:46 +0100)
committerWill Deacon <will@kernel.org>
Mon, 7 Jun 2021 10:35:55 +0000 (11:35 +0100)
commit064dbfb4169141943ec7d9dbfd02974dd008f2ce
tree2e67ec533160b8bc74d99ca82c0a11cd551be86b
parentf8049488e7d37b0a0e438ee449e83b3e46958743
arm64: entry: convert IRQ+FIQ handlers to C

For various reasons we'd like to convert the bulk of arm64's exception
triage logic to C. As a step towards that, this patch converts the EL1
and EL0 IRQ+FIQ triage logic to C.

Separate C functions are added for the native and compat cases so that
in subsequent patches we can handle native/compat differences in C.

Since the triage functions can now call arm64_apply_bp_hardening()
directly, the do_el0_irq_bp_hardening() wrapper function is removed.

Since the user_exit_irqoff macro is now unused, it is removed. The
user_enter_irqoff macro is still used by the ret_to_user code, and
cannot be removed at this time.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Joey Gouly <joey.gouly@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210607094624.34689-8-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/exception.h
arch/arm64/include/asm/processor.h
arch/arm64/kernel/entry-common.c
arch/arm64/kernel/entry.S
arch/arm64/mm/fault.c