[PATCH RFC V4 09/10] x86/jump_label: use GENERIC_NOP5_ATOMIC instead of jmp5 +0

Jeremy Fitzhardinge
2011-10-13T00:09:47Z

From: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>

GENERIC_NOP5_ATOMIC should make a better nop.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
---
arch/x86/include/asm/jump_label.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/x86/include/asm/jump_label.h b/arch/x86/include/asm/jump_label.h
index a32b18c..189100e 100644
--- a/arch/x86/include/asm/jump_label.h
+++ b/arch/x86/include/asm/jump_label.h
@@ -4,12 +4,13 @@
#ifdef __KERNEL__

#include <linux/types.h>
+#include <linux/stringify.h>
#include <asm/nops.h>
#include <asm/asm.h>

#define JUMP_LABEL_NOP_SIZE 5

-#define JUMP_LABEL_INITIAL_NOP ".byte 0xe9 \n\t .long 0\n\t"
+#define JUMP_LABEL_INITIAL_NOP ".byte " __stringify(GENERIC_NOP5_ATOMIC) "\n\t"

static __always_inline bool arch_static_branch(struct jump_label_key *key)
{
--
1.7.6.4