summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-nexell/reg-call.S
blob: 5fdf51520d92642c078269d6efc0828b77d497bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <asm-offsets.h>
#include <config.h>
#include <linux/linkage.h>

#define ___asm_opcode_identity32(x) ((x) & 0xFFFFFFFF)
#define __opcode_to_mem_arm(x) ___opcode_identity32(x)
#define ___asm_opcode_to_mem_arm(x) ___asm_opcode_identity32(x)

#define ___opcode_identity32(x) ((u32)(x))
#define ___inst_arm(x) .long x
#define __inst_arm(x) ___inst_arm(___asm_opcode_to_mem_arm(x))

#define __inst_arm_thumb32(arm_opcode, thumb_opcode) __inst_arm(arm_opcode)

#define __SMC(imm4) __inst_arm_thumb32(                                 \
        0xE1600070 | (((imm4) & 0xF) << 0),                             \
        0xF7F08000 | (((imm4) & 0xF) << 16)                             \
)

ENTRY(__invoke_nexell_fn_smc)
	__SMC(0)
	bx      lr
ENDPROC(__invoke_nexell_fn_smc)