1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2013 Huawei Ltd.
4 * Author: Jiang Liu <liuj97@gmail.com>
6 * Based on arch/arm/include/asm/jump_label.h
8 #ifndef __ASM_JUMP_LABEL_H
9 #define __ASM_JUMP_LABEL_H
13 #include <linux/types.h>
16 #define JUMP_LABEL_NOP_SIZE AARCH64_INSN_SIZE
18 static __always_inline
bool arch_static_branch(struct static_key
*key
,
23 " .pushsection __jump_table, \"aw\" \n\t"
25 " .long 1b - ., %l[l_yes] - . \n\t"
28 : : "i"(&((char *)key
)[branch
]) : : l_yes
);
35 static __always_inline
bool arch_static_branch_jump(struct static_key
*key
,
40 " .pushsection __jump_table, \"aw\" \n\t"
42 " .long 1b - ., %l[l_yes] - . \n\t"
45 : : "i"(&((char *)key
)[branch
]) : : l_yes
);
52 #endif /* __ASSEMBLY__ */
53 #endif /* __ASM_JUMP_LABEL_H */