Skip to content

Commit

Permalink
arm64: entry: consolidate EL1 exception returns
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Rutland authored and Will Deacon committed Jun 7, 2021
1 parent e931fa0 commit af541cb
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions arch/arm64/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit af541cb

Please sign in to comment.