[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170123183514.13356-2-bp@alien8.de>
Date: Mon, 23 Jan 2017 19:35:06 +0100
From: Borislav Petkov <bp@...en8.de>
To: X86 ML <x86@...nel.org>
Cc: Tony Luck <tony.luck@...el.com>,
Yazen Ghannam <Yazen.Ghannam@....com>,
linux-edac <linux-edac@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 1/9] x86/mce-inject: Make it depend on X86_LOCAL_APIC
From: Borislav Petkov <bp@...e.de>
... and get rid of the annoying:
arch/x86/kernel/cpu/mcheck/mce-inject.c:97:13: warning: ‘mce_irq_ipi’
defined but not used [-Wunused-function]
static void mce_irq_ipi(void *info
when doing randconfig builds.
Signed-off-by: Borislav Petkov <bp@...e.de>
---
arch/x86/Kconfig | 2 +-
arch/x86/kernel/cpu/mcheck/mce-inject.c | 5 +----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index e487493bbd47..7b6fd68b4715 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1070,7 +1070,7 @@ config X86_MCE_THRESHOLD
def_bool y
config X86_MCE_INJECT
- depends on X86_MCE
+ depends on X86_MCE && X86_LOCAL_APIC
tristate "Machine check injector support"
---help---
Provide support for injecting machine checks for testing purposes.
diff --git a/arch/x86/kernel/cpu/mcheck/mce-inject.c b/arch/x86/kernel/cpu/mcheck/mce-inject.c
index 517619ea6498..99165b206df3 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-inject.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-inject.c
@@ -152,7 +152,6 @@ static void raise_mce(struct mce *m)
if (context == MCJ_CTX_RANDOM)
return;
-#ifdef CONFIG_X86_LOCAL_APIC
if (m->inject_flags & (MCJ_IRQ_BROADCAST | MCJ_NMI_BROADCAST)) {
unsigned long start;
int cpu;
@@ -192,9 +191,7 @@ static void raise_mce(struct mce *m)
raise_local();
put_cpu();
put_online_cpus();
- } else
-#endif
- {
+ } else {
preempt_disable();
raise_local();
preempt_enable();
--
2.11.0
Powered by blists - more mailing lists