powerpc/xmon: Improve output of XIVE interrupts
When looping on the list of interrupts, add the current value of the PQ bits with a load on the ESB page. This has the side effect of faulting the ESB page of all interrupts. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20190910081850.26038-2-clg@kaod.org
This commit is contained in:
parent
ec5b705c48
commit
5896163f7f
@ -99,8 +99,7 @@ extern void xive_flush_interrupt(void);
|
|||||||
|
|
||||||
/* xmon hook */
|
/* xmon hook */
|
||||||
extern void xmon_xive_do_dump(int cpu);
|
extern void xmon_xive_do_dump(int cpu);
|
||||||
extern int xmon_xive_get_irq_config(u32 irq, u32 *target, u8 *prio,
|
extern int xmon_xive_get_irq_config(u32 hw_irq, struct irq_data *d);
|
||||||
u32 *sw_irq);
|
|
||||||
|
|
||||||
/* APIs used by KVM */
|
/* APIs used by KVM */
|
||||||
extern u32 xive_native_default_eq_shift(void);
|
extern u32 xive_native_default_eq_shift(void);
|
||||||
|
@ -258,10 +258,33 @@ notrace void xmon_xive_do_dump(int cpu)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int xmon_xive_get_irq_config(u32 irq, u32 *target, u8 *prio,
|
int xmon_xive_get_irq_config(u32 hw_irq, struct irq_data *d)
|
||||||
u32 *sw_irq)
|
|
||||||
{
|
{
|
||||||
return xive_ops->get_irq_config(irq, target, prio, sw_irq);
|
int rc;
|
||||||
|
u32 target;
|
||||||
|
u8 prio;
|
||||||
|
u32 lirq;
|
||||||
|
|
||||||
|
rc = xive_ops->get_irq_config(hw_irq, &target, &prio, &lirq);
|
||||||
|
if (rc) {
|
||||||
|
xmon_printf("IRQ 0x%08x : no config rc=%d\n", hw_irq, rc);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
xmon_printf("IRQ 0x%08x : target=0x%x prio=%02x lirq=0x%x ",
|
||||||
|
hw_irq, target, prio, lirq);
|
||||||
|
|
||||||
|
if (d) {
|
||||||
|
struct xive_irq_data *xd = irq_data_get_irq_handler_data(d);
|
||||||
|
u64 val = xive_esb_read(xd, XIVE_ESB_GET);
|
||||||
|
|
||||||
|
xmon_printf("PQ=%c%c",
|
||||||
|
val & XIVE_ESB_VAL_P ? 'P' : '-',
|
||||||
|
val & XIVE_ESB_VAL_Q ? 'Q' : '-');
|
||||||
|
}
|
||||||
|
|
||||||
|
xmon_printf("\n");
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_XMON */
|
#endif /* CONFIG_XMON */
|
||||||
|
@ -2572,16 +2572,9 @@ static void dump_all_xives(void)
|
|||||||
dump_one_xive(cpu);
|
dump_one_xive(cpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dump_one_xive_irq(u32 num)
|
static void dump_one_xive_irq(u32 num, struct irq_data *d)
|
||||||
{
|
{
|
||||||
int rc;
|
xmon_xive_get_irq_config(num, d);
|
||||||
u32 target;
|
|
||||||
u8 prio;
|
|
||||||
u32 lirq;
|
|
||||||
|
|
||||||
rc = xmon_xive_get_irq_config(num, &target, &prio, &lirq);
|
|
||||||
xmon_printf("IRQ 0x%08x : target=0x%x prio=%d lirq=0x%x (rc=%d)\n",
|
|
||||||
num, target, prio, lirq, rc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dump_all_xive_irq(void)
|
static void dump_all_xive_irq(void)
|
||||||
@ -2599,7 +2592,7 @@ static void dump_all_xive_irq(void)
|
|||||||
hwirq = (unsigned int)irqd_to_hwirq(d);
|
hwirq = (unsigned int)irqd_to_hwirq(d);
|
||||||
/* IPIs are special (HW number 0) */
|
/* IPIs are special (HW number 0) */
|
||||||
if (hwirq)
|
if (hwirq)
|
||||||
dump_one_xive_irq(hwirq);
|
dump_one_xive_irq(hwirq, d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2619,7 +2612,7 @@ static void dump_xives(void)
|
|||||||
return;
|
return;
|
||||||
} else if (c == 'i') {
|
} else if (c == 'i') {
|
||||||
if (scanhex(&num))
|
if (scanhex(&num))
|
||||||
dump_one_xive_irq(num);
|
dump_one_xive_irq(num, NULL);
|
||||||
else
|
else
|
||||||
dump_all_xive_irq();
|
dump_all_xive_irq();
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user