OSDN Git Service

arm64: entry: convert el1_sync to C
authorMark Rutland <mark.rutland@arm.com>
Fri, 25 Oct 2019 16:42:13 +0000 (17:42 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 28 Oct 2019 11:22:47 +0000 (11:22 +0000)
commited3768db588291ddb5dc794daed12cc751373566
tree86e3e27244aac6ca06e74748e367573f35a211a0
parent51077e03b8cef2a24d6582b8c54b718fced6878c
arm64: entry: convert el1_sync to C

This patch converts the EL1 sync entry assembly logic to C code.

Doing this will allow us to make changes in a slightly more
readable way. A case in point is supporting kernel-first RAS.
do_sea() should be called on the CPU that took the fault.

Largely the assembly code is converted to C in a relatively
straightforward manner.

Since all sync sites share a common asm entry point, the ASM_BUG()
instances are no longer required for effective backtraces back to
assembly, and we don't need similar BUG() entries.

The ESR_ELx.EC codes for all (supported) debug exceptions are now
checked in the el1_sync_handler's switch statement, which renders the
check in el1_dbg redundant. This both simplifies the el1_dbg handler,
and makes the EL1 exception handling more robust to
currently-unallocated ESR_ELx.EC encodings.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
[split out of a bigger series, added nokprobes, moved prototypes]
Signed-off-by: James Morse <james.morse@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Cc: Julien Thierry <julien.thierry.kdev@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/Makefile
arch/arm64/kernel/entry-common.c [new file with mode: 0644]
arch/arm64/kernel/entry.S