summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/alternative.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-08-25 09:59:19 +0200
committerIngo Molnar <mingo@kernel.org>2015-08-25 09:59:19 +0200
commit8d58b66ed2b000f27658c88a4ed70e8042e86a58 (patch)
tree5bae2c74f932b5d863f72cb698a6f71260340b26 /arch/x86/kernel/alternative.c
parent13fe86f465b72fc9328d4f5ebc33223c011852ae (diff)
parentc13dcf9f2d6f5f06ef1bf79ec456df614c5e058b (diff)
downloadlinux-8d58b66ed2b000f27658c88a4ed70e8042e86a58.tar.gz
linux-8d58b66ed2b000f27658c88a4ed70e8042e86a58.tar.xz
Merge tag 'v4.2-rc8' into x86/mm, before applying new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/alternative.c')
-rw-r--r--arch/x86/kernel/alternative.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index aef653193160..c42827eb86cf 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -21,6 +21,10 @@
#include <asm/io.h>
#include <asm/fixmap.h>
+int __read_mostly alternatives_patched;
+
+EXPORT_SYMBOL_GPL(alternatives_patched);
+
#define MAX_PATCH_LEN (255-1)
static int __initdata_or_module debug_alternative;
@@ -227,6 +231,15 @@ void __init arch_init_ideal_nops(void)
#endif
}
break;
+
+ case X86_VENDOR_AMD:
+ if (boot_cpu_data.x86 > 0xf) {
+ ideal_nops = p6_nops;
+ return;
+ }
+
+ /* fall through */
+
default:
#ifdef CONFIG_X86_64
ideal_nops = k8_nops;
@@ -627,6 +640,7 @@ void __init alternative_instructions(void)
apply_paravirt(__parainstructions, __parainstructions_end);
restart_nmi();
+ alternatives_patched = 1;
}
/**