Skip to content

Commit 617a2f3

Browse files
brooniectmarinas
authored andcommitted
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 <[email protected]> Signed-off-by: Catalin Marinas <[email protected]> Acked-by: Marc Zyngier <[email protected]>
1 parent a5d4420 commit 617a2f3

File tree

4 files changed

+18
-17
lines changed

4 files changed

+18
-17
lines changed

arch/arm64/kvm/hyp-init.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
.align 11
2020

21-
ENTRY(__kvm_hyp_init)
21+
SYM_CODE_START(__kvm_hyp_init)
2222
ventry __invalid // Synchronous EL2t
2323
ventry __invalid // IRQ EL2t
2424
ventry __invalid // FIQ EL2t
@@ -117,9 +117,9 @@ CPU_BE( orr x4, x4, #SCTLR_ELx_EE)
117117

118118
/* Hello, World! */
119119
eret
120-
ENDPROC(__kvm_hyp_init)
120+
SYM_CODE_END(__kvm_hyp_init)
121121

122-
ENTRY(__kvm_handle_stub_hvc)
122+
SYM_CODE_START(__kvm_handle_stub_hvc)
123123
cmp x0, #HVC_SOFT_RESTART
124124
b.ne 1f
125125

@@ -158,7 +158,7 @@ reset:
158158
ldr x0, =HVC_STUB_ERR
159159
eret
160160

161-
ENDPROC(__kvm_handle_stub_hvc)
161+
SYM_CODE_END(__kvm_handle_stub_hvc)
162162

163163
.ltorg
164164

arch/arm64/kvm/hyp.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* and is used to implement hyp stubs in the same way as in
2929
* arch/arm64/kernel/hyp_stub.S.
3030
*/
31-
ENTRY(__kvm_call_hyp)
31+
SYM_FUNC_START(__kvm_call_hyp)
3232
hvc #0
3333
ret
34-
ENDPROC(__kvm_call_hyp)
34+
SYM_FUNC_END(__kvm_call_hyp)

arch/arm64/kvm/hyp/fpsimd.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
.text
1212
.pushsection .hyp.text, "ax"
1313

14-
ENTRY(__fpsimd_save_state)
14+
SYM_FUNC_START(__fpsimd_save_state)
1515
fpsimd_save x0, 1
1616
ret
17-
ENDPROC(__fpsimd_save_state)
17+
SYM_FUNC_END(__fpsimd_save_state)
1818

19-
ENTRY(__fpsimd_restore_state)
19+
SYM_FUNC_START(__fpsimd_restore_state)
2020
fpsimd_restore x0, 1
2121
ret
22-
ENDPROC(__fpsimd_restore_state)
22+
SYM_FUNC_END(__fpsimd_restore_state)

arch/arm64/kvm/hyp/hyp-entry.S

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,26 +180,27 @@ el2_error:
180180
eret
181181
sb
182182

183-
ENTRY(__hyp_do_panic)
183+
SYM_FUNC_START(__hyp_do_panic)
184184
mov lr, #(PSR_F_BIT | PSR_I_BIT | PSR_A_BIT | PSR_D_BIT |\
185185
PSR_MODE_EL1h)
186186
msr spsr_el2, lr
187187
ldr lr, =panic
188188
msr elr_el2, lr
189189
eret
190190
sb
191-
ENDPROC(__hyp_do_panic)
191+
SYM_FUNC_END(__hyp_do_panic)
192192

193-
ENTRY(__hyp_panic)
193+
SYM_CODE_START(__hyp_panic)
194194
get_host_ctxt x0, x1
195195
b hyp_panic
196-
ENDPROC(__hyp_panic)
196+
SYM_CODE_END(__hyp_panic)
197197

198198
.macro invalid_vector label, target = __hyp_panic
199199
.align 2
200+
SYM_CODE_START(\label)
200201
\label:
201202
b \target
202-
ENDPROC(\label)
203+
SYM_CODE_END(\label)
203204
.endm
204205

205206
/* None of these should ever happen */
@@ -246,7 +247,7 @@ check_preamble_length 661b, 662b
246247
check_preamble_length 661b, 662b
247248
.endm
248249

249-
ENTRY(__kvm_hyp_vector)
250+
SYM_CODE_START(__kvm_hyp_vector)
250251
invalid_vect el2t_sync_invalid // Synchronous EL2t
251252
invalid_vect el2t_irq_invalid // IRQ EL2t
252253
invalid_vect el2t_fiq_invalid // FIQ EL2t
@@ -266,7 +267,7 @@ ENTRY(__kvm_hyp_vector)
266267
valid_vect el1_irq // IRQ 32-bit EL1
267268
invalid_vect el1_fiq_invalid // FIQ 32-bit EL1
268269
valid_vect el1_error // Error 32-bit EL1
269-
ENDPROC(__kvm_hyp_vector)
270+
SYM_CODE_END(__kvm_hyp_vector)
270271

271272
#ifdef CONFIG_KVM_INDIRECT_VECTORS
272273
.macro hyp_ventry

0 commit comments

Comments
 (0)