linux-uconsole/arch/powerpc/sysdev/xive
Cédric Le Goater c1f9809611 powerpc/xive: Fix xmon command "dxi"
[ Upstream commit 33e4bc5946 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-14 09:50:38 +02:00
..
common.c powerpc/xive: Fix xmon command "dxi" 2021-05-14 09:50:38 +02: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: Ignore kmemleak false positives 2020-06-22 10:37:57 +10:00
spapr.c powerpc: fix function annotations to avoid section mismatch warnings with gcc-10 2020-07-30 10:50:07 +10:00
xive-internal.h powerpc/xive: Add a debugfs file to dump internal XIVE state 2020-03-27 00:20:38 +11:00