linux-stable/arch/powerpc/sysdev/xive
Cédric Le Goater 33e4bc5946 powerpc/xive: Fix xmon command "dxi"
When under xmon, the "dxi" command dumps the state of the XIVE
interrupts. If an interrupt number is specified, only the state of
the associated XIVE interrupt is dumped. This form of the command
lacks an irq_data parameter which is nevertheless used by
xmon_xive_get_irq_config(), leading to an xmon crash.

Fix that by doing a lookup in the system IRQ mapping to query the IRQ
descriptor data. Invalid interrupt numbers, or not belonging to the
XIVE IRQ domain, OPAL event interrupt number for instance, should be
caught by the previous query done at the firmware level.

Fixes: 97ef275077 ("powerpc/xive: Fix xmon support on the PowerNV platform")
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>
Tested-by: Greg Kurz <groug@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-8-clg@kaod.org
2021-04-14 23:04:15 +10:00
..
common.c powerpc/xive: Fix xmon command "dxi" 2021-04-14 23:04:15 +10:00
Kconfig powerpc: remove redundant 'default n' from Kconfig-s 2018-10-13 22:21:25 +11:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
native.c powerpc/xive: Improve error reporting of OPAL calls 2020-12-11 09:53:11 +11:00
spapr.c powerpc/xive: use true and false for bool variable 2021-03-29 13:22:13 +11:00
xive-internal.h powerpc/xive: Remove P9 DD1 flag XIVE_IRQ_FLAG_EOI_FW 2020-12-11 09:53:10 +11:00