Commit 1242b9b3 authored by Mark Brown's avatar Mark Brown Committed by Catalin Marinas

arm64: sdei: Annotate SDEI entry points using new style annotations

In an effort to clarify and simplify the annotation of assembly
functions new macros have been introduced. These replace ENTRY and
ENDPROC with two different annotations for normal functions and those
with unusual calling conventions.

The SDEI entry points are currently annotated as normal functions but
are called from non-kernel contexts with non-standard calling convention
and should therefore be annotated as such so do so.
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Acked-by: default avatarJames Morse <james.Morse@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 4db61fef
...@@ -938,7 +938,7 @@ NOKPROBE(ret_from_fork) ...@@ -938,7 +938,7 @@ NOKPROBE(ret_from_fork)
*/ */
.ltorg .ltorg
.pushsection ".entry.tramp.text", "ax" .pushsection ".entry.tramp.text", "ax"
ENTRY(__sdei_asm_entry_trampoline) SYM_CODE_START(__sdei_asm_entry_trampoline)
mrs x4, ttbr1_el1 mrs x4, ttbr1_el1
tbz x4, #USER_ASID_BIT, 1f tbz x4, #USER_ASID_BIT, 1f
...@@ -960,7 +960,7 @@ ENTRY(__sdei_asm_entry_trampoline) ...@@ -960,7 +960,7 @@ ENTRY(__sdei_asm_entry_trampoline)
ldr x4, =__sdei_asm_handler ldr x4, =__sdei_asm_handler
#endif #endif
br x4 br x4
ENDPROC(__sdei_asm_entry_trampoline) SYM_CODE_END(__sdei_asm_entry_trampoline)
NOKPROBE(__sdei_asm_entry_trampoline) NOKPROBE(__sdei_asm_entry_trampoline)
/* /*
...@@ -970,14 +970,14 @@ NOKPROBE(__sdei_asm_entry_trampoline) ...@@ -970,14 +970,14 @@ NOKPROBE(__sdei_asm_entry_trampoline)
* x2: exit_mode * x2: exit_mode
* x4: struct sdei_registered_event argument from registration time. * x4: struct sdei_registered_event argument from registration time.
*/ */
ENTRY(__sdei_asm_exit_trampoline) SYM_CODE_START(__sdei_asm_exit_trampoline)
ldr x4, [x4, #(SDEI_EVENT_INTREGS + S_ORIG_ADDR_LIMIT)] ldr x4, [x4, #(SDEI_EVENT_INTREGS + S_ORIG_ADDR_LIMIT)]
cbnz x4, 1f cbnz x4, 1f
tramp_unmap_kernel tmp=x4 tramp_unmap_kernel tmp=x4
1: sdei_handler_exit exit_mode=x2 1: sdei_handler_exit exit_mode=x2
ENDPROC(__sdei_asm_exit_trampoline) SYM_CODE_END(__sdei_asm_exit_trampoline)
NOKPROBE(__sdei_asm_exit_trampoline) NOKPROBE(__sdei_asm_exit_trampoline)
.ltorg .ltorg
.popsection // .entry.tramp.text .popsection // .entry.tramp.text
...@@ -1003,7 +1003,7 @@ SYM_DATA_END(__sdei_asm_trampoline_next_handler) ...@@ -1003,7 +1003,7 @@ SYM_DATA_END(__sdei_asm_trampoline_next_handler)
* follow SMC-CC. We save (or retrieve) all the registers as the handler may * follow SMC-CC. We save (or retrieve) all the registers as the handler may
* want them. * want them.
*/ */
ENTRY(__sdei_asm_handler) SYM_CODE_START(__sdei_asm_handler)
stp x2, x3, [x1, #SDEI_EVENT_INTREGS + S_PC] stp x2, x3, [x1, #SDEI_EVENT_INTREGS + S_PC]
stp x4, x5, [x1, #SDEI_EVENT_INTREGS + 16 * 2] stp x4, x5, [x1, #SDEI_EVENT_INTREGS + 16 * 2]
stp x6, x7, [x1, #SDEI_EVENT_INTREGS + 16 * 3] stp x6, x7, [x1, #SDEI_EVENT_INTREGS + 16 * 3]
...@@ -1086,6 +1086,6 @@ alternative_else_nop_endif ...@@ -1086,6 +1086,6 @@ alternative_else_nop_endif
tramp_alias dst=x5, sym=__sdei_asm_exit_trampoline tramp_alias dst=x5, sym=__sdei_asm_exit_trampoline
br x5 br x5
#endif #endif
ENDPROC(__sdei_asm_handler) SYM_CODE_END(__sdei_asm_handler)
NOKPROBE(__sdei_asm_handler) NOKPROBE(__sdei_asm_handler)
#endif /* CONFIG_ARM_SDE_INTERFACE */ #endif /* CONFIG_ARM_SDE_INTERFACE */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment