Skip to content

Commit

Permalink
hw/npu2: Show name of opencapi error interrupts
Browse files Browse the repository at this point in the history
Add the name of which error interrupt is received.

Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
fbarrat authored and stewartsmith committed Apr 29, 2019
1 parent b50406b commit c3e38ba
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions hw/npu2-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ static void npu2_err_interrupt(struct irq_source *is, uint32_t isn)
{
struct npu2 *p = is->data;
uint32_t idx = isn - p->base_lsi;
char *irq_name;
int brick;

switch (idx) {
Expand All @@ -413,8 +414,10 @@ static void npu2_err_interrupt(struct irq_source *is, uint32_t isn)
case 27 ... 34:
/* opencapi only */
brick = 2 + ((idx - 27) % 4);
prlog(PR_ERR, "NPU[%d] error interrupt for brick %d\n",
p->chip_id, brick);
irq_name = npu2_ipi_name(is, isn);
prlog(PR_ERR, "NPU[%d] received error interrupt '%s'\n",
p->chip_id, irq_name);
free(irq_name);
show_all_regs(p, brick);
opal_update_pending_evt(OPAL_EVENT_PCI_ERROR,
OPAL_EVENT_PCI_ERROR);
Expand Down

0 comments on commit c3e38ba

Please sign in to comment.