diff options
author | Christophe Lombard <clombard@linux.vnet.ibm.com> | 2021-10-14 17:56:59 +0200 |
---|---|---|
committer | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2021-10-19 12:26:01 +0530 |
commit | a3bbeac7e23795456df4f3f52d442bd1ba35eaa3 (patch) | |
tree | b8d649bbffb04b129cc972bbb2c097cfd3f21184 /hw/npu2-common.c | |
parent | d4cd8a29e4c548f6383b47604a83c69b58d849e8 (diff) | |
download | skiboot-a3bbeac7e23795456df4f3f52d442bd1ba35eaa3.zip skiboot-a3bbeac7e23795456df4f3f52d442bd1ba35eaa3.tar.gz skiboot-a3bbeac7e23795456df4f3f52d442bd1ba35eaa3.tar.bz2 |
pau: hmi scom dump
This patch add a new function to dump PAU registers when a HMI has been
raised and an OpenCAPI link has been hit by an error.
For each register, the scom address and the register value are printed.
The hmi.c has been redesigned in order to support the new PHB/PCIEX
type (PAU OpenCapi). Now, the *npu* functions support NPU and PAU units of
P8, P9 and P10 chips.
Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Diffstat (limited to 'hw/npu2-common.c')
-rw-r--r-- | hw/npu2-common.c | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/hw/npu2-common.c b/hw/npu2-common.c index 3bc9bce..b3f500f 100644 --- a/hw/npu2-common.c +++ b/hw/npu2-common.c @@ -296,31 +296,10 @@ static void show_all_regs(struct npu2 *npu, int brick_index) } } -void npu2_dump_scoms(int chip_id) +void npu2_dump_scoms(struct npu2 *npu, int chip_id) { - struct npu2 *npu; - struct phb *phb; - struct npu2_dev *dev; - - /* - * Look for the npu2 structure for that chip ID. We can access it - * through the array of phbs, looking for a nvlink or opencapi - * phb. We can have several entries, but they all point - * to the same npu2 structure - */ - for_each_phb(phb) { - npu = NULL; - if (phb->phb_type == phb_type_npu_v2) { - npu = phb_to_npu2_nvlink(phb); - } else if (phb->phb_type == phb_type_npu_v2_opencapi) { - dev = phb_to_npu2_dev_ocapi(phb); - npu = dev->npu; - } - if (npu && npu->chip_id == chip_id) { - show_all_regs(npu, -1 /* all bricks */); - break; - } - } + if (npu && npu->chip_id == chip_id) + show_all_regs(npu, -1 /* all bricks */); } static uint64_t npu2_ipi_attributes(struct irq_source *is __unused, uint32_t isn __unused) |