diff options
author | Cédric Le Goater <clg@kaod.org> | 2017-08-30 15:46:17 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-09-02 07:02:38 -0400 |
commit | 5f121292f0a0873fa2cd3a0292fb4860a8953f38 (patch) | |
tree | 392de73ab431f90c672ed633c0fb87d3143a77ec | |
parent | ac5e5a5402d64acd48af3287718e24ff8ba9fa21 (diff) |
powerpc/xive: improve debugging macros
Having the CPU identifier in the debug logs is helpful when tracking
issues. Also add some more logging and fix a compile issue in
xive_do_source_eoi().
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r-- | arch/powerpc/sysdev/xive/common.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c index 7014ca6da4f6..f387318678b9 100644 --- a/arch/powerpc/sysdev/xive/common.c +++ b/arch/powerpc/sysdev/xive/common.c | |||
@@ -40,7 +40,8 @@ | |||
40 | #undef DEBUG_ALL | 40 | #undef DEBUG_ALL |
41 | 41 | ||
42 | #ifdef DEBUG_ALL | 42 | #ifdef DEBUG_ALL |
43 | #define DBG_VERBOSE(fmt...) pr_devel(fmt) | 43 | #define DBG_VERBOSE(fmt, ...) pr_devel("cpu %d - " fmt, \ |
44 | smp_processor_id(), ## __VA_ARGS__) | ||
44 | #else | 45 | #else |
45 | #define DBG_VERBOSE(fmt...) do { } while(0) | 46 | #define DBG_VERBOSE(fmt...) do { } while(0) |
46 | #endif | 47 | #endif |
@@ -344,7 +345,7 @@ void xive_do_source_eoi(u32 hw_irq, struct xive_irq_data *xd) | |||
344 | xive_esb_read(xd, XIVE_ESB_LOAD_EOI); | 345 | xive_esb_read(xd, XIVE_ESB_LOAD_EOI); |
345 | else { | 346 | else { |
346 | eoi_val = xive_esb_read(xd, XIVE_ESB_SET_PQ_00); | 347 | eoi_val = xive_esb_read(xd, XIVE_ESB_SET_PQ_00); |
347 | DBG_VERBOSE("eoi_val=%x\n", offset, eoi_val); | 348 | DBG_VERBOSE("eoi_val=%x\n", eoi_val); |
348 | 349 | ||
349 | /* Re-trigger if needed */ | 350 | /* Re-trigger if needed */ |
350 | if ((eoi_val & XIVE_ESB_VAL_Q) && xd->trig_mmio) | 351 | if ((eoi_val & XIVE_ESB_VAL_Q) && xd->trig_mmio) |
@@ -1008,6 +1009,9 @@ static void xive_ipi_eoi(struct irq_data *d) | |||
1008 | { | 1009 | { |
1009 | struct xive_cpu *xc = __this_cpu_read(xive_cpu); | 1010 | struct xive_cpu *xc = __this_cpu_read(xive_cpu); |
1010 | 1011 | ||
1012 | DBG_VERBOSE("IPI eoi: irq=%d [0x%lx] (HW IRQ 0x%x) pending=%02x\n", | ||
1013 | d->irq, irqd_to_hwirq(d), xc->hw_ipi, xc->pending_prio); | ||
1014 | |||
1011 | /* Handle possible race with unplug and drop stale IPIs */ | 1015 | /* Handle possible race with unplug and drop stale IPIs */ |
1012 | if (!xc) | 1016 | if (!xc) |
1013 | return; | 1017 | return; |