@@ -15,18 +15,20 @@
#include <linux/arm-smccc.h>
#include <asm/asm-offsets.h>
- .macro SMCCC instr
+ .macro SMCCC instr, maybe_quirk = 0
.cfi_startproc
\instr #0
ldr x4, [sp]
stp x0, x1, [x4, #ARM_SMCCC_RES_X0_OFFS]
stp x2, x3, [x4, #ARM_SMCCC_RES_X2_OFFS]
ldr x4, [sp, #8]
+ .if \maybe_quirk != 0
cbz x4, 1f /* no quirk structure */
ldr x9, [x4, #ARM_SMCCC_QUIRK_ID_OFFS]
cmp x9, #ARM_SMCCC_QUIRK_QCOM_A6
b.ne 1f
str x6, [x4, ARM_SMCCC_QUIRK_STATE_OFFS]
+ .endif
1: ret
.cfi_endproc
.endm
@@ -38,7 +40,7 @@
* struct arm_smccc_quirk *quirk)
*/
ENTRY(__arm_smccc_smc)
- SMCCC smc
+ SMCCC smc, 1
ENDPROC(__arm_smccc_smc)
/*