Re: [PATCH] x86, UV: Fix NMI handler for UV platforms

From: Don Zickus
Date: Wed Mar 23 2011 - 16:00:46 EST


On Wed, Mar 23, 2011 at 01:53:20PM -0400, Don Zickus wrote:
> Let me know if the patch fixes that problem. Then it will be one less
> thing to worry about. :-)

Ok, I was an idiot and made the patch against RHEL-6. Here is the one
against 2.6.38. Sorry about that.

Cheers,
Don


diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 87eab4a..62ec8e9 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -1375,7 +1375,7 @@ perf_event_nmi_handler(struct notifier_block *self,
if ((handled > 1) ||
/* the next nmi could be a back-to-back nmi */
((__this_cpu_read(pmu_nmi.marked) == this_nmi) &&
- (__this_cpu_read(pmu_nmi.handled) > 1))) {
+ (__this_cpu_read(pmu_nmi.handled) > 0) && handled && this_nmi)) {
/*
* We could have two subsequent back-to-back nmis: The
* first handles more than one counter, the 2nd
@@ -1386,6 +1386,8 @@ perf_event_nmi_handler(struct notifier_block *self,
* handling more than one counter. We will mark the
* next (3rd) and then drop it if unhandled.
*/
+ //if ((__this_cpu_read(pmu_nmi.handled) == 1) && (handled == 1))
+ // trace_printk("!! fixed?\n");
__this_cpu_write(pmu_nmi.marked, this_nmi + 1);
__this_cpu_write(pmu_nmi.handled, handled);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/