x86/asm: Add asm macros for static keys/jump labels
authorAndy Lutomirski <luto@kernel.org>
Thu, 12 Nov 2015 20:59:03 +0000 (12:59 -0800)
committerIngo Molnar <mingo@kernel.org>
Tue, 24 Nov 2015 08:56:44 +0000 (09:56 +0100)
commit2671c3e4fe2a34bd9bf2eecdf5d1149d4b55dbdf
tree5b5b1a0394bf34c6747aa5c2e266a33a16862c1f
parentc28454332fe0b65e22c3a2717e5bf05b5b47ca20
x86/asm: Add asm macros for static keys/jump labels

Unfortunately, we can only do this if HAVE_JUMP_LABEL.  In
principle, we could do some serious surgery on the core jump
label infrastructure to keep the patch infrastructure available
on x86 on all builds, but that's probably not worth it.

Implementing the macros using a conditional branch as a fallback
seems like a bad idea: we'd have to clobber flags.

This limitation can't cause silent failures -- trying to include
asm/jump_label.h at all on a non-HAVE_JUMP_LABEL kernel will
error out.  The macro's users are responsible for handling this
issue themselves.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/63aa45c4b692e8469e1876d6ccbb5da707972990.1447361906.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/jump_label.h
This page took 0.027839 seconds and 5 git commands to generate.