summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/entry.S
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2021-06-07 10:46:14 +0100
committerWill Deacon <will@kernel.org>2021-06-07 11:35:55 +0100
commitaf541cbbf9c646d2eaa8b3ee3836d5b16435e848 (patch)
tree9a73898fd1d1960ade6a6c566dda99b06c6cda05 /arch/arm64/kernel/entry.S
parente931fa03c6bf525babc9a41b951eb2311b055abb (diff)
downloadlinux-af541cbbf9c646d2eaa8b3ee3836d5b16435e848.tar.bz2
arm64: entry: consolidate EL1 exception returns
Following the example of ret_to_user, let's consolidate all the EL1 return paths with a ret_to_kernel helper, rather than each entry point having its own copy of the return code. There should be no functional change as a result of this patch. 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-11-mark.rutland@arm.com Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/kernel/entry.S')
-rw-r--r--arch/arm64/kernel/entry.S12
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
index e29d0fb77358..54986d488983 100644
--- a/arch/arm64/kernel/entry.S
+++ b/arch/arm64/kernel/entry.S
@@ -611,30 +611,34 @@ SYM_CODE_START_LOCAL(el1_sync)
kernel_entry 1
mov x0, sp
bl el1_sync_handler
- kernel_exit 1
+ b ret_to_kernel
SYM_CODE_END(el1_sync)
SYM_CODE_START_LOCAL(el1_irq)
kernel_entry 1
mov x0, sp
bl el1_irq_handler
- kernel_exit 1
+ b ret_to_kernel
SYM_CODE_END(el1_irq)
SYM_CODE_START_LOCAL(el1_fiq)
kernel_entry 1
mov x0, sp
bl el1_fiq_handler
- kernel_exit 1
+ b ret_to_kernel
SYM_CODE_END(el1_fiq)
SYM_CODE_START_LOCAL(el1_error)
kernel_entry 1
mov x0, sp
bl el1_error_handler
- kernel_exit 1
+ b ret_to_kernel
SYM_CODE_END(el1_error)
+SYM_CODE_START_LOCAL(ret_to_kernel)
+ kernel_exit 1
+SYM_CODE_END(ret_to_kernel)
+
/*
* EL0 mode handlers.
*/