public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] x86: Only call smp_processor_id in non-preempt cases
@ 2011-01-05  3:38 Don Zickus
  2011-01-05  3:38 ` [PATCH 2/3] x86: Avoid calling arch_trigger_all_cpu_backtrace() at the same time Don Zickus
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Don Zickus @ 2011-01-05  3:38 UTC (permalink / raw)
  To: x86; +Cc: LKML, Don Zickus, Jan Kiszka

There are some paths that walk the die_chain with preemption on.
Make sure we are in an NMI call before we start doing anything.

This was triggered by do_general_protection calling notify_die with
DIE_GPF.

Reported-by: Jan Kiszka <jan.kiszka@web.de>
CC: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Don Zickus <dzickus@redhat.com>
---
 arch/x86/kernel/apic/hw_nmi.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/apic/hw_nmi.c b/arch/x86/kernel/apic/hw_nmi.c
index c57d0b5..2b40a60 100644
--- a/arch/x86/kernel/apic/hw_nmi.c
+++ b/arch/x86/kernel/apic/hw_nmi.c
@@ -51,7 +51,7 @@ arch_trigger_all_cpu_backtrace_handler(struct notifier_block *self,
 {
 	struct die_args *args = __args;
 	struct pt_regs *regs;
-	int cpu = smp_processor_id();
+	int cpu;
 
 	switch (cmd) {
 	case DIE_NMI:
@@ -63,6 +63,7 @@ arch_trigger_all_cpu_backtrace_handler(struct notifier_block *self,
 	}
 
 	regs = args->regs;
+	cpu = smp_processor_id();
 
 	if (cpumask_test_cpu(cpu, to_cpumask(backtrace_mask))) {
 		static arch_spinlock_t lock = __ARCH_SPIN_LOCK_UNLOCKED;
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH 2/5] x86, NMI: Add touch_nmi_watchdog to io_check_error delay
@ 2010-10-16  2:22 Don Zickus
  2010-10-16 16:36 ` [tip:perf/core] " tip-bot for Huang Ying
  0 siblings, 1 reply; 7+ messages in thread
From: Don Zickus @ 2010-10-16  2:22 UTC (permalink / raw)
  To: mingo; +Cc: andi, robert.richter, linux-kernel, peterz, ying.huang,
	Don Zickus

From: Huang Ying <ying.huang@intel.com>

Prevent the long delay in io_check_error making NMI watchdog timeout.

Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Don Zickus <dzickus@redhat.com>
---
 arch/x86/kernel/traps.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index e04e59b..bef859e 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -344,9 +344,11 @@ io_check_error(unsigned char reason, struct pt_regs *regs)
 	reason = (reason & NMI_REASON_CLEAR_MASK) | NMI_REASON_CLEAR_IOCHK;
 	outb(reason, NMI_REASON_PORT);
 
-	i = 2000;
-	while (--i)
-		udelay(1000);
+	i = 20000;
+	while (--i) {
+		touch_nmi_watchdog();
+		udelay(100);
+	}
 
 	reason &= ~NMI_REASON_CLEAR_IOCHK;
 	outb(reason, NMI_REASON_PORT);
-- 
1.7.2.3


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

end of thread, other threads:[~2011-01-05 14:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-05  3:38 [PATCH 1/3] x86: Only call smp_processor_id in non-preempt cases Don Zickus
2011-01-05  3:38 ` [PATCH 2/3] x86: Avoid calling arch_trigger_all_cpu_backtrace() at the same time Don Zickus
2011-01-05 14:07   ` [tip:perf/core] " tip-bot for Dongdong Deng
2011-01-05  3:38 ` [PATCH 3/3] x86, NMI: Add touch_nmi_watchdog to io_check_error delay Don Zickus
2011-01-05 14:08   ` [tip:perf/core] " tip-bot for Huang Ying
2011-01-05 14:07 ` [tip:perf/core] x86: Only call smp_processor_id in non-preempt cases tip-bot for Don Zickus
  -- strict thread matches above, loose matches on Subject: below --
2010-10-16  2:22 [PATCH 2/5] x86, NMI: Add touch_nmi_watchdog to io_check_error delay Don Zickus
2010-10-16 16:36 ` [tip:perf/core] " tip-bot for Huang Ying

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