2 * Copyright 2015 Tilera Corporation. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation, version 2.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
11 * NON INFRINGEMENT. See the GNU General Public License for
15 #ifndef _ASM_TILE_JUMP_LABEL_H
16 #define _ASM_TILE_JUMP_LABEL_H
18 #include <arch/opcode.h>
20 #define JUMP_LABEL_NOP_SIZE TILE_BUNDLE_SIZE_IN_BYTES
22 static __always_inline
bool arch_static_branch(struct static_key
*key
,
25 asm_volatile_goto("1:\n\t"
27 ".pushsection __jump_table, \"aw\"\n\t"
28 ".quad 1b, %l[l_yes], %0 + %1 \n\t"
30 : : "i" (key
), "i" (branch
) : : l_yes
);
36 static __always_inline
bool arch_static_branch_jump(struct static_key
*key
,
39 asm_volatile_goto("1:\n\t"
41 ".pushsection __jump_table, \"aw\"\n\t"
42 ".quad 1b, %l[l_yes], %0 + %1 \n\t"
44 : : "i" (key
), "i" (branch
) : : l_yes
);
50 typedef u64 jump_label_t
;
58 #endif /* _ASM_TILE_JUMP_LABEL_H */