lkml.org 
[lkml]   [2011]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86, UV: Fix NMI handler for UV platforms

* Jack Steiner <steiner@sgi.com> wrote:

> This fixes a problem seen on UV systems handling NMIs from the node controller.
> The original code used the DIE notifier as the hook to get to the UV NMI
> handler. This does not work if performance counters are active - the hw_perf
> code consumes the NMI and the UV handler is not called.

Sigh:

> --- linux.orig/arch/x86/kernel/traps.c 2011-03-21 09:05:43.000000000 -0500
> +++ linux/arch/x86/kernel/traps.c 2011-03-21 09:13:01.306555675 -0500
> @@ -57,6 +57,7 @@
> #include <asm/mce.h>
>
> #include <asm/mach_traps.h>
> +#include <asm/uv/uv.h>
>
> #ifdef CONFIG_X86_64
> #include <asm/x86_init.h>
> @@ -397,13 +398,16 @@ unknown_nmi_error(unsigned char reason,
> static notrace __kprobes void default_do_nmi(struct pt_regs *regs)
> {
> unsigned char reason = 0;
> + int handled;
>
> /*
> * CPU-specific NMI must be processed before non-CPU-specific
> * NMI, otherwise we may lose it, because the CPU-specific
> * NMI can not be detected/processed on other CPUs.
> */
> - if (notify_die(DIE_NMI, "nmi", regs, 0, 2, SIGINT) == NOTIFY_STOP)
> + handled = uv_handle_nmi(regs, reason);
> + if (notify_die(DIE_NMI, "nmi", regs, 0, 2, SIGINT) == NOTIFY_STOP ||
> + handled)
> return;

Such code is extremely ugly. Please *reduce* the number of is_uv_system() type
of hacks in core x86 code, not increase it!

Any reason why a higher priority for the UV NMI handler cannot solve the 'perf
eats the NMI' problem?

Thanks,

Ingo


\
 
 \ /
  Last update: 2011-03-21 17:17    [W:0.119 / U:1.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site