mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86, MCE: support raising machine check poll for software MCE injection in IRQ context
@ 2014-08-12 12:45 Chen Yucong
  2014-09-28  3:38 ` Chen Yucong
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Yucong @ 2014-08-12 12:45 UTC (permalink / raw)
  To: tony.luck; +Cc: gong.chen, andi, linux-edac, linux-kernel, Chen Yucong

At present MCJ_NMI_BROADCAST(same for raise_local) supports both raise_exception()
and raise_poll(), but MCJ_IRQ_BROADCAST only supports raise_exception(). The goal
of this patch is that MCJ_IRQ_BROADCAST can support raising machine check poll.

Signed-off-by: Chen Yucong <slaoub@gmail.com>
---
 arch/x86/kernel/cpu/mcheck/mce-inject.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce-inject.c b/arch/x86/kernel/cpu/mcheck/mce-inject.c
index 5ac2d1f..97e4f7a 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-inject.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-inject.c
@@ -99,11 +99,13 @@ static void mce_irq_ipi(void *info)
 	int cpu = smp_processor_id();
 	struct mce *m = &__get_cpu_var(injectm);
 
-	if (cpumask_test_cpu(cpu, mce_inject_cpumask) &&
-			m->inject_flags & MCJ_EXCEPTION) {
-		cpumask_clear_cpu(cpu, mce_inject_cpumask);
+	if (!cpumask_test_cpu(cpu, mce_inject_cpumask))
+		return;
+	cpumask_clear_cpu(cpu, mce_inject_cpumask);
+	if (m->inject_flags & MCJ_EXCEPTION)
 		raise_exception(m, NULL);
-	}
+	else if (m->status)
+		raise_poll(m);
 }
 
 /* Inject mce on current CPU */
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-28  3:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-12 12:45 [PATCH] x86, MCE: support raising machine check poll for software MCE injection in IRQ context Chen Yucong
2014-09-28  3:38 ` Chen Yucong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome