mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 23:21:31 +00:00
arm64: kvm: Annotate assembly using modern annoations
In an effort to clarify and simplify the annotation of assembly functions in the kernel new macros have been introduced. These replace ENTRY and ENDPROC with separate annotations for standard C callable functions, data and code with different calling conventions. Update the more straightforward annotations in the kvm code to the new macros. Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Marc Zyngier <maz@kernel.org>
This commit is contained in:
parent
a5d4420b26
commit
617a2f392c
@ -18,7 +18,7 @@
|
||||
|
||||
.align 11
|
||||
|
||||
ENTRY(__kvm_hyp_init)
|
||||
SYM_CODE_START(__kvm_hyp_init)
|
||||
ventry __invalid // Synchronous EL2t
|
||||
ventry __invalid // IRQ EL2t
|
||||
ventry __invalid // FIQ EL2t
|
||||
@ -117,9 +117,9 @@ CPU_BE( orr x4, x4, #SCTLR_ELx_EE)
|
||||
|
||||
/* Hello, World! */
|
||||
eret
|
||||
ENDPROC(__kvm_hyp_init)
|
||||
SYM_CODE_END(__kvm_hyp_init)
|
||||
|
||||
ENTRY(__kvm_handle_stub_hvc)
|
||||
SYM_CODE_START(__kvm_handle_stub_hvc)
|
||||
cmp x0, #HVC_SOFT_RESTART
|
||||
b.ne 1f
|
||||
|
||||
@ -158,7 +158,7 @@ reset:
|
||||
ldr x0, =HVC_STUB_ERR
|
||||
eret
|
||||
|
||||
ENDPROC(__kvm_handle_stub_hvc)
|
||||
SYM_CODE_END(__kvm_handle_stub_hvc)
|
||||
|
||||
.ltorg
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
* and is used to implement hyp stubs in the same way as in
|
||||
* arch/arm64/kernel/hyp_stub.S.
|
||||
*/
|
||||
ENTRY(__kvm_call_hyp)
|
||||
SYM_FUNC_START(__kvm_call_hyp)
|
||||
hvc #0
|
||||
ret
|
||||
ENDPROC(__kvm_call_hyp)
|
||||
SYM_FUNC_END(__kvm_call_hyp)
|
||||
|
@ -11,12 +11,12 @@
|
||||
.text
|
||||
.pushsection .hyp.text, "ax"
|
||||
|
||||
ENTRY(__fpsimd_save_state)
|
||||
SYM_FUNC_START(__fpsimd_save_state)
|
||||
fpsimd_save x0, 1
|
||||
ret
|
||||
ENDPROC(__fpsimd_save_state)
|
||||
SYM_FUNC_END(__fpsimd_save_state)
|
||||
|
||||
ENTRY(__fpsimd_restore_state)
|
||||
SYM_FUNC_START(__fpsimd_restore_state)
|
||||
fpsimd_restore x0, 1
|
||||
ret
|
||||
ENDPROC(__fpsimd_restore_state)
|
||||
SYM_FUNC_END(__fpsimd_restore_state)
|
||||
|
@ -180,7 +180,7 @@ el2_error:
|
||||
eret
|
||||
sb
|
||||
|
||||
ENTRY(__hyp_do_panic)
|
||||
SYM_FUNC_START(__hyp_do_panic)
|
||||
mov lr, #(PSR_F_BIT | PSR_I_BIT | PSR_A_BIT | PSR_D_BIT |\
|
||||
PSR_MODE_EL1h)
|
||||
msr spsr_el2, lr
|
||||
@ -188,18 +188,19 @@ ENTRY(__hyp_do_panic)
|
||||
msr elr_el2, lr
|
||||
eret
|
||||
sb
|
||||
ENDPROC(__hyp_do_panic)
|
||||
SYM_FUNC_END(__hyp_do_panic)
|
||||
|
||||
ENTRY(__hyp_panic)
|
||||
SYM_CODE_START(__hyp_panic)
|
||||
get_host_ctxt x0, x1
|
||||
b hyp_panic
|
||||
ENDPROC(__hyp_panic)
|
||||
SYM_CODE_END(__hyp_panic)
|
||||
|
||||
.macro invalid_vector label, target = __hyp_panic
|
||||
.align 2
|
||||
SYM_CODE_START(\label)
|
||||
\label:
|
||||
b \target
|
||||
ENDPROC(\label)
|
||||
SYM_CODE_END(\label)
|
||||
.endm
|
||||
|
||||
/* None of these should ever happen */
|
||||
@ -246,7 +247,7 @@ check_preamble_length 661b, 662b
|
||||
check_preamble_length 661b, 662b
|
||||
.endm
|
||||
|
||||
ENTRY(__kvm_hyp_vector)
|
||||
SYM_CODE_START(__kvm_hyp_vector)
|
||||
invalid_vect el2t_sync_invalid // Synchronous EL2t
|
||||
invalid_vect el2t_irq_invalid // IRQ EL2t
|
||||
invalid_vect el2t_fiq_invalid // FIQ EL2t
|
||||
@ -266,7 +267,7 @@ ENTRY(__kvm_hyp_vector)
|
||||
valid_vect el1_irq // IRQ 32-bit EL1
|
||||
invalid_vect el1_fiq_invalid // FIQ 32-bit EL1
|
||||
valid_vect el1_error // Error 32-bit EL1
|
||||
ENDPROC(__kvm_hyp_vector)
|
||||
SYM_CODE_END(__kvm_hyp_vector)
|
||||
|
||||
#ifdef CONFIG_KVM_INDIRECT_VECTORS
|
||||
.macro hyp_ventry
|
||||
|
Loading…
Reference in New Issue
Block a user