[24/30] sparc64: Fix NMI programming when perf events are active.

From: Greg KH
Date: Wed Jan 20 2010 - 23:25:58 EST


2.6.32-stable review patch. If anyone has any objections, please let us know.

------------------

From: David S. Miller <davem@xxxxxxxxxxxxx>

[ Upstream commit 8183e2b38480672a1f61d416812ac078ce94b67b ]

If perf events are active, we should not reset the %pcr to
PCR_PIC_PRIV. That perf events code does the management.

Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
arch/sparc/kernel/nmi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- a/arch/sparc/kernel/nmi.c
+++ b/arch/sparc/kernel/nmi.c
@@ -96,7 +96,6 @@ notrace __kprobes void perfctr_irq(int i
int cpu = smp_processor_id();

clear_softint(1 << irq);
- pcr_ops->write(PCR_PIC_PRIV);

local_cpu_data().__nmi_count++;

@@ -105,6 +104,8 @@ notrace __kprobes void perfctr_irq(int i
if (notify_die(DIE_NMI, "nmi", regs, 0,
pt_regs_trap_type(regs), SIGINT) == NOTIFY_STOP)
touched = 1;
+ else
+ pcr_ops->write(PCR_PIC_PRIV);

sum = kstat_irqs_cpu(0, cpu);
if (__get_cpu_var(nmi_touch)) {


--
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/