From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hiroshi Shimamoto Subject: [PATCH -rt 3/4] x86: nmi_watchdog NMI needed for irq_show_regs_callback() Date: Mon, 28 Apr 2008 11:17:48 -0700 Message-ID: <481614CC.2040306@ct.jp.nec.com> References: <48161325.1080508@ct.jp.nec.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org To: Ingo Molnar , Steven Rostedt , Thomas Gleixner Return-path: Received: from gateway-1237.mvista.com ([63.81.120.158]:3689 "EHLO gateway-1237.mvista.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933091AbYD1SRt (ORCPT ); Mon, 28 Apr 2008 14:17:49 -0400 In-Reply-To: <48161325.1080508@ct.jp.nec.com> Sender: linux-rt-users-owner@vger.kernel.org List-ID: From: Hiroshi Shimamoto The -rt kernel doesn't panic immediately when NMI lockup detected. Because the kernel waits show_regs on all cpus, but NMI is not come so frequently. Signed-off-by: Hiroshi Shimamoto --- arch/x86/kernel/nmi_32.c | 7 +++++++ arch/x86/kernel/nmi_64.c | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletions(-) diff --git a/arch/x86/kernel/nmi_32.c b/arch/x86/kernel/nmi_32.c index f55f05b..da9deb3 100644 --- a/arch/x86/kernel/nmi_32.c +++ b/arch/x86/kernel/nmi_32.c @@ -428,6 +428,13 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason) if (i == cpu) continue; nmi_show_regs[i] = 1; + } + + smp_send_nmi_allbutself(); + + for_each_online_cpu(i) { + if (i == cpu) + continue; while (nmi_show_regs[i] == 1) cpu_relax(); } diff --git a/arch/x86/kernel/nmi_64.c b/arch/x86/kernel/nmi_64.c index 69cc737..5d3073c 100644 --- a/arch/x86/kernel/nmi_64.c +++ b/arch/x86/kernel/nmi_64.c @@ -412,10 +412,16 @@ nmi_watchdog_tick(struct pt_regs * regs, unsigned reason) if (i == cpu) continue; nmi_show_regs[i] = 1; + } + + smp_send_nmi_allbutself(); + + for_each_online_cpu(i) { + if (i == cpu) + continue; while (nmi_show_regs[i] == 1) cpu_relax(); } From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935825AbYD1SR7 (ORCPT ); Mon, 28 Apr 2008 14:17:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933231AbYD1SRu (ORCPT ); Mon, 28 Apr 2008 14:17:50 -0400 Received: from gateway-1237.mvista.com ([63.81.120.158]:3689 "EHLO gateway-1237.mvista.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933091AbYD1SRt (ORCPT ); Mon, 28 Apr 2008 14:17:49 -0400 Message-ID: <481614CC.2040306@ct.jp.nec.com> Date: Mon, 28 Apr 2008 11:17:48 -0700 From: Hiroshi Shimamoto User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Ingo Molnar , Steven Rostedt , Thomas Gleixner Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org Subject: [PATCH -rt 3/4] x86: nmi_watchdog NMI needed for irq_show_regs_callback() References: <48161325.1080508@ct.jp.nec.com> In-Reply-To: <48161325.1080508@ct.jp.nec.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hiroshi Shimamoto The -rt kernel doesn't panic immediately when NMI lockup detected. Because the kernel waits show_regs on all cpus, but NMI is not come so frequently. Signed-off-by: Hiroshi Shimamoto --- arch/x86/kernel/nmi_32.c | 7 +++++++ arch/x86/kernel/nmi_64.c | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletions(-) diff --git a/arch/x86/kernel/nmi_32.c b/arch/x86/kernel/nmi_32.c index f55f05b..da9deb3 100644 --- a/arch/x86/kernel/nmi_32.c +++ b/arch/x86/kernel/nmi_32.c @@ -428,6 +428,13 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason) if (i == cpu) continue; nmi_show_regs[i] = 1; + } + + smp_send_nmi_allbutself(); + + for_each_online_cpu(i) { + if (i == cpu) + continue; while (nmi_show_regs[i] == 1) cpu_relax(); } diff --git a/arch/x86/kernel/nmi_64.c b/arch/x86/kernel/nmi_64.c index 69cc737..5d3073c 100644 --- a/arch/x86/kernel/nmi_64.c +++ b/arch/x86/kernel/nmi_64.c @@ -412,10 +412,16 @@ nmi_watchdog_tick(struct pt_regs * regs, unsigned reason) if (i == cpu) continue; nmi_show_regs[i] = 1; + } + + smp_send_nmi_allbutself(); + + for_each_online_cpu(i) { + if (i == cpu) + continue; while (nmi_show_regs[i] == 1) cpu_relax(); } - die_nmi("NMI Watchdog detected LOCKUP on CPU %d\n", regs, panic_on_timeout); } -- 1.5.4.1