diff options
author | Anton Blanchard <anton@samba.org> | 2015-04-08 23:51:30 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-04-09 03:40:23 -0400 |
commit | 55dd0df781e58ec23d218376ea4a676e7362a98c (patch) | |
tree | 2401cee7d708bb538a2ed0251f675a01cda71407 /arch/arm64/include | |
parent | 01ac33c1f907b366dcc50551316b372f1519cca9 (diff) |
jump_label: Allow asm/jump_label.h to be included in assembly
Wrap asm/jump_label.h for all archs with #ifndef __ASSEMBLY__.
Since these are kernel only headers, we don't need #ifdef
__KERNEL__ so can simplify things a bit.
If an architecture wants to use jump labels in assembly, it
will still need to define a macro to create the __jump_table
entries (see ARCH_STATIC_BRANCH in the powerpc asm/jump_label.h
for an example).
Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: benh@kernel.crashing.org
Cc: catalin.marinas@arm.com
Cc: davem@davemloft.net
Cc: heiko.carstens@de.ibm.com
Cc: jbaron@akamai.com
Cc: linux@arm.linux.org.uk
Cc: linuxppc-dev@lists.ozlabs.org
Cc: liuj97@gmail.com
Cc: mgorman@suse.de
Cc: mmarek@suse.cz
Cc: mpe@ellerman.id.au
Cc: paulus@samba.org
Cc: ralf@linux-mips.org
Cc: rostedt@goodmis.org
Cc: schwidefsky@de.ibm.com
Cc: will.deacon@arm.com
Link: http://lkml.kernel.org/r/1428551492-21977-1-git-send-email-anton@samba.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/arm64/include')
-rw-r--r-- | arch/arm64/include/asm/jump_label.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm64/include/asm/jump_label.h b/arch/arm64/include/asm/jump_label.h index 076a1c714049..c0e5165c2f76 100644 --- a/arch/arm64/include/asm/jump_label.h +++ b/arch/arm64/include/asm/jump_label.h | |||
@@ -18,11 +18,12 @@ | |||
18 | */ | 18 | */ |
19 | #ifndef __ASM_JUMP_LABEL_H | 19 | #ifndef __ASM_JUMP_LABEL_H |
20 | #define __ASM_JUMP_LABEL_H | 20 | #define __ASM_JUMP_LABEL_H |
21 | |||
22 | #ifndef __ASSEMBLY__ | ||
23 | |||
21 | #include <linux/types.h> | 24 | #include <linux/types.h> |
22 | #include <asm/insn.h> | 25 | #include <asm/insn.h> |
23 | 26 | ||
24 | #ifdef __KERNEL__ | ||
25 | |||
26 | #define JUMP_LABEL_NOP_SIZE AARCH64_INSN_SIZE | 27 | #define JUMP_LABEL_NOP_SIZE AARCH64_INSN_SIZE |
27 | 28 | ||
28 | static __always_inline bool arch_static_branch(struct static_key *key) | 29 | static __always_inline bool arch_static_branch(struct static_key *key) |
@@ -39,8 +40,6 @@ l_yes: | |||
39 | return true; | 40 | return true; |
40 | } | 41 | } |
41 | 42 | ||
42 | #endif /* __KERNEL__ */ | ||
43 | |||
44 | typedef u64 jump_label_t; | 43 | typedef u64 jump_label_t; |
45 | 44 | ||
46 | struct jump_entry { | 45 | struct jump_entry { |
@@ -49,4 +48,5 @@ struct jump_entry { | |||
49 | jump_label_t key; | 48 | jump_label_t key; |
50 | }; | 49 | }; |
51 | 50 | ||
51 | #endif /* __ASSEMBLY__ */ | ||
52 | #endif /* __ASM_JUMP_LABEL_H */ | 52 | #endif /* __ASM_JUMP_LABEL_H */ |