mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 21:54:11 +08:00
powerpc/xive: Drop check on irq_data in xive_core_debug_show()
When looping on IRQ descriptor, irq_data is always valid.
Fixes: 930914b7d5
("powerpc/xive: Add a debugfs file to dump internal XIVE state")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210331144514.892250-6-clg@kaod.org
This commit is contained in:
parent
5159d98728
commit
a74ce5926b
@ -1611,6 +1611,8 @@ static void xive_debug_show_irq(struct seq_file *m, struct irq_data *d)
|
||||
u32 target;
|
||||
u8 prio;
|
||||
u32 lirq;
|
||||
struct xive_irq_data *xd;
|
||||
u64 val;
|
||||
|
||||
rc = xive_ops->get_irq_config(hw_irq, &target, &prio, &lirq);
|
||||
if (rc) {
|
||||
@ -1621,17 +1623,14 @@ static void xive_debug_show_irq(struct seq_file *m, struct irq_data *d)
|
||||
seq_printf(m, "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);
|
||||
|
||||
seq_printf(m, "flags=%c%c%c PQ=%c%c",
|
||||
xd->flags & XIVE_IRQ_FLAG_STORE_EOI ? 'S' : ' ',
|
||||
xd->flags & XIVE_IRQ_FLAG_LSI ? 'L' : ' ',
|
||||
xd->flags & XIVE_IRQ_FLAG_H_INT_ESB ? 'H' : ' ',
|
||||
val & XIVE_ESB_VAL_P ? 'P' : '-',
|
||||
val & XIVE_ESB_VAL_Q ? 'Q' : '-');
|
||||
}
|
||||
xd = irq_data_get_irq_handler_data(d);
|
||||
val = xive_esb_read(xd, XIVE_ESB_GET);
|
||||
seq_printf(m, "flags=%c%c%c PQ=%c%c",
|
||||
xd->flags & XIVE_IRQ_FLAG_STORE_EOI ? 'S' : ' ',
|
||||
xd->flags & XIVE_IRQ_FLAG_LSI ? 'L' : ' ',
|
||||
xd->flags & XIVE_IRQ_FLAG_H_INT_ESB ? 'H' : ' ',
|
||||
val & XIVE_ESB_VAL_P ? 'P' : '-',
|
||||
val & XIVE_ESB_VAL_Q ? 'Q' : '-');
|
||||
seq_puts(m, "\n");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user