blob: 5fdf51520d92642c078269d6efc0828b77d497bd [file] [log] [blame]
Stefan Bosch6563ea22020-07-10 19:07:26 +02001#include <asm-offsets.h>
2#include <config.h>
3#include <linux/linkage.h>
4
5#define ___asm_opcode_identity32(x) ((x) & 0xFFFFFFFF)
6#define __opcode_to_mem_arm(x) ___opcode_identity32(x)
7#define ___asm_opcode_to_mem_arm(x) ___asm_opcode_identity32(x)
8
9#define ___opcode_identity32(x) ((u32)(x))
10#define ___inst_arm(x) .long x
11#define __inst_arm(x) ___inst_arm(___asm_opcode_to_mem_arm(x))
12
13#define __inst_arm_thumb32(arm_opcode, thumb_opcode) __inst_arm(arm_opcode)
14
15#define __SMC(imm4) __inst_arm_thumb32( \
16 0xE1600070 | (((imm4) & 0xF) << 0), \
17 0xF7F08000 | (((imm4) & 0xF) << 16) \
18)
19
20ENTRY(__invoke_nexell_fn_smc)
21 __SMC(0)
22 bx lr
23ENDPROC(__invoke_nexell_fn_smc)