Skip to content

Commit 7af9288

Browse files
AndrewScullctmarinas
authored andcommitted
smccc: Make constants available to assembly
Move constants out of the C-only section of the header next to the other constants that are available to assembly. Signed-off-by: Andrew Scull <[email protected]> Reviewed-by: Sudeep Holla <[email protected]> Acked-by: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent a1634a5 commit 7af9288

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

include/linux/arm-smccc.h

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,28 @@
8181
ARM_SMCCC_SMC_32, \
8282
0, 0x7fff)
8383

84+
/* Paravirtualised time calls (defined by ARM DEN0057A) */
85+
#define ARM_SMCCC_HV_PV_TIME_FEATURES \
86+
ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \
87+
ARM_SMCCC_SMC_64, \
88+
ARM_SMCCC_OWNER_STANDARD_HYP, \
89+
0x20)
90+
91+
#define ARM_SMCCC_HV_PV_TIME_ST \
92+
ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \
93+
ARM_SMCCC_SMC_64, \
94+
ARM_SMCCC_OWNER_STANDARD_HYP, \
95+
0x21)
96+
97+
/*
98+
* Return codes defined in ARM DEN 0070A
99+
* ARM DEN 0070A is now merged/consolidated into ARM DEN 0028 C
100+
*/
101+
#define SMCCC_RET_SUCCESS 0
102+
#define SMCCC_RET_NOT_SUPPORTED -1
103+
#define SMCCC_RET_NOT_REQUIRED -2
104+
#define SMCCC_RET_INVALID_PARAMETER -3
105+
84106
#ifndef __ASSEMBLY__
85107

86108
#include <linux/linkage.h>
@@ -331,15 +353,6 @@ asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1,
331353
*/
332354
#define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__)
333355

334-
/*
335-
* Return codes defined in ARM DEN 0070A
336-
* ARM DEN 0070A is now merged/consolidated into ARM DEN 0028 C
337-
*/
338-
#define SMCCC_RET_SUCCESS 0
339-
#define SMCCC_RET_NOT_SUPPORTED -1
340-
#define SMCCC_RET_NOT_REQUIRED -2
341-
#define SMCCC_RET_INVALID_PARAMETER -3
342-
343356
/*
344357
* Like arm_smccc_1_1* but always returns SMCCC_RET_NOT_SUPPORTED.
345358
* Used when the SMCCC conduit is not defined. The empty asm statement
@@ -385,18 +398,5 @@ asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1,
385398
method; \
386399
})
387400

388-
/* Paravirtualised time calls (defined by ARM DEN0057A) */
389-
#define ARM_SMCCC_HV_PV_TIME_FEATURES \
390-
ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \
391-
ARM_SMCCC_SMC_64, \
392-
ARM_SMCCC_OWNER_STANDARD_HYP, \
393-
0x20)
394-
395-
#define ARM_SMCCC_HV_PV_TIME_ST \
396-
ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \
397-
ARM_SMCCC_SMC_64, \
398-
ARM_SMCCC_OWNER_STANDARD_HYP, \
399-
0x21)
400-
401401
#endif /*__ASSEMBLY__*/
402402
#endif /*__LINUX_ARM_SMCCC_H*/

0 commit comments

Comments
 (0)