[PATCH] powerpc/perf: Fix deadlock caused by calling printk() in PMU exception

2013-06-05 Thread Michael Ellerman
In commit bc09c21 "Fix finding overflowed PMC in interrupt" we added a printk() to the PMU exception handler. Unfortunately that is not safe. The problem is that the PMU exception may run even when interrupts are soft disabled, aka NMI context. We do this so that we can profile parts of the kernel

Re: [PATCH] powerpc/perf: Fix deadlock caused by calling printk() in PMU exception

2013-06-04 Thread Michael Ellerman
On Tue, 2013-06-04 at 14:35 +0530, Anshuman Khandual wrote: > > + seq_printf(p, "%*s: ", prec, "PMS"); > > Lets make this PMIS or PMI_S instead of PMS. Everything else is aligned using a three character prefix, so that would stuff the alignment up. > > > + for_each_online_cpu(j) > > +

Re: [PATCH] powerpc/perf: Fix deadlock caused by calling printk() in PMU exception

2013-06-04 Thread Anshuman Khandual
> + seq_printf(p, "%*s: ", prec, "PMS"); Lets make this PMIS or PMI_S instead of PMS. > + for_each_online_cpu(j) > + seq_printf(p, "%10u ", per_cpu(irq_stat, j).pmu_irqs); This would be pmu_spurious_irqs instead of pmu_irqs. ___ L

[PATCH] powerpc/perf: Fix deadlock caused by calling printk() in PMU exception

2013-06-03 Thread Michael Ellerman
In commit bc09c21 "Fix finding overflowed PMC in interrupt" we added a printk() to the PMU exception handler. Unfortunately that is not safe. The problem is that the PMU exception runs even when interrupts are soft disabled. We do this so that we can profile parts of the kernel that have interrupt