1
2
3
4
5 #include <linux/linkage.h>
6 #include <linux/arm-smccc.h>
7
8 #include <asm/asm-offsets.h>
9 #include <asm/assembler.h>
10
11 .macro SMCCC instr
12 .cfi_startproc
13 \instr #0
14 ldr x4, [sp]
15 stp x0, x1, [x4, #ARM_SMCCC_RES_X0_OFFS]
16 stp x2, x3, [x4, #ARM_SMCCC_RES_X2_OFFS]
17 ldr x4, [sp, #8]
18 cbz x4, 1f
19 ldr x9, [x4, #ARM_SMCCC_QUIRK_ID_OFFS]
20 cmp x9, #ARM_SMCCC_QUIRK_QCOM_A6
21 b.ne 1f
22 str x6, [x4, ARM_SMCCC_QUIRK_STATE_OFFS]
23 1: ret
24 .cfi_endproc
25 .endm
26
27
28
29
30
31
32
33 ENTRY(__arm_smccc_smc)
34 SMCCC smc
35 ENDPROC(__arm_smccc_smc)
36 EXPORT_SYMBOL(__arm_smccc_smc)
37
38
39
40
41
42
43
44 ENTRY(__arm_smccc_hvc)
45 SMCCC hvc
46 ENDPROC(__arm_smccc_hvc)
47 EXPORT_SYMBOL(__arm_smccc_hvc)