diff options
author | Kostenzer Felix <fkostenzer@live.at> | 2016-03-06 17:20:06 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-03-08 06:48:19 -0500 |
commit | 8e2a7f5b9a8c49f1f4e1dc8972198510f43c0b2e (patch) | |
tree | afe4787696a0b2594bc6cd6282e3983baf1ba24c /arch/x86/kernel | |
parent | e17dc65328057c00db7e1bfea249c8771a78b30b (diff) |
x86/nmi: Mark 'ignore_nmis' as __read_mostly
ignore_nmis is used in two distinct places:
1. modified through {stop,restart}_nmi by alternative_instructions
2. read by do_nmi to determine if default_do_nmi should be called or not
thus the access pattern conforms to __read_mostly and do_nmi() is a fastpath.
Signed-off-by: Kostenzer Felix <fkostenzer@live.at>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/nmi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c index 8a2cdd736fa4..04b132a767f1 100644 --- a/arch/x86/kernel/nmi.c +++ b/arch/x86/kernel/nmi.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <asm/nmi.h> | 30 | #include <asm/nmi.h> |
31 | #include <asm/x86_init.h> | 31 | #include <asm/x86_init.h> |
32 | #include <asm/reboot.h> | 32 | #include <asm/reboot.h> |
33 | #include <asm/cache.h> | ||
33 | 34 | ||
34 | #define CREATE_TRACE_POINTS | 35 | #define CREATE_TRACE_POINTS |
35 | #include <trace/events/nmi.h> | 36 | #include <trace/events/nmi.h> |
@@ -69,7 +70,7 @@ struct nmi_stats { | |||
69 | 70 | ||
70 | static DEFINE_PER_CPU(struct nmi_stats, nmi_stats); | 71 | static DEFINE_PER_CPU(struct nmi_stats, nmi_stats); |
71 | 72 | ||
72 | static int ignore_nmis; | 73 | static int ignore_nmis __read_mostly; |
73 | 74 | ||
74 | int unknown_nmi_panic; | 75 | int unknown_nmi_panic; |
75 | /* | 76 | /* |