[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 22/44] target/ppc: Replace debug messages by asserts for unknown I
From: |
David Gibson |
Subject: |
[PULL 22/44] target/ppc: Replace debug messages by asserts for unknown IRQ pins |
Date: |
Thu, 30 Sep 2021 15:44:04 +1000 |
From: Cédric Le Goater <clg@kaod.org>
If an unknown pin of the IRQ controller is raised, something is very
wrong in the QEMU model. It is better to abort.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20210920061203.989563-3-clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
hw/ppc/ppc.c | 24 ++++++------------------
1 file changed, 6 insertions(+), 18 deletions(-)
diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c
index 7375bf4fa9..a327206a0a 100644
--- a/hw/ppc/ppc.c
+++ b/hw/ppc/ppc.c
@@ -165,9 +165,7 @@ static void ppc6xx_set_irq(void *opaque, int pin, int level)
ppc_set_irq(cpu, PPC_INTERRUPT_RESET, level);
break;
default:
- /* Unknown pin - do nothing */
- LOG_IRQ("%s: unknown IRQ pin %d\n", __func__, pin);
- return;
+ g_assert_not_reached();
}
if (level)
env->irq_input_state |= 1 << pin;
@@ -252,9 +250,7 @@ static void ppc970_set_irq(void *opaque, int pin, int level)
/* XXX: TODO */
break;
default:
- /* Unknown pin - do nothing */
- LOG_IRQ("%s: unknown IRQ pin %d\n", __func__, pin);
- return;
+ g_assert_not_reached();
}
if (level)
env->irq_input_state |= 1 << pin;
@@ -287,9 +283,7 @@ static void power7_set_irq(void *opaque, int pin, int level)
ppc_set_irq(cpu, PPC_INTERRUPT_EXT, level);
break;
default:
- /* Unknown pin - do nothing */
- LOG_IRQ("%s: unknown IRQ pin %d\n", __func__, pin);
- return;
+ g_assert_not_reached();
}
}
@@ -323,9 +317,7 @@ static void power9_set_irq(void *opaque, int pin, int level)
ppc_set_irq(cpu, PPC_INTERRUPT_HVIRT, level);
break;
default:
- /* Unknown pin - do nothing */
- LOG_IRQ("%s: unknown IRQ pin %d\n", __func__, pin);
- return;
+ g_assert_not_reached();
}
}
@@ -459,9 +451,7 @@ static void ppc40x_set_irq(void *opaque, int pin, int level)
ppc_set_irq(cpu, PPC_INTERRUPT_DEBUG, level);
break;
default:
- /* Unknown pin - do nothing */
- LOG_IRQ("%s: unknown IRQ pin %d\n", __func__, pin);
- return;
+ g_assert_not_reached();
}
if (level)
env->irq_input_state |= 1 << pin;
@@ -523,9 +513,7 @@ static void ppce500_set_irq(void *opaque, int pin, int
level)
ppc_set_irq(cpu, PPC_INTERRUPT_DEBUG, level);
break;
default:
- /* Unknown pin - do nothing */
- LOG_IRQ("%s: unknown IRQ pin %d\n", __func__, pin);
- return;
+ g_assert_not_reached();
}
if (level)
env->irq_input_state |= 1 << pin;
--
2.31.1
- [PULL 13/44] target/ppc: fix setting of CR flags in bcdcfsq, (continued)
- [PULL 13/44] target/ppc: fix setting of CR flags in bcdcfsq, David Gibson, 2021/09/30
- [PULL 18/44] qapi/qdev.json: add DEVICE_UNPLUG_GUEST_ERROR QAPI event, David Gibson, 2021/09/30
- [PULL 20/44] memory_hotplug.c: send DEVICE_UNPLUG_GUEST_ERROR in acpi_memory_hotplug_write(), David Gibson, 2021/09/30
- [PULL 09/44] ppc/xive: Export xive_tctx_word2() helper, David Gibson, 2021/09/30
- [PULL 15/44] spapr.c: handle dev->id in spapr_memory_unplug_rollback(), David Gibson, 2021/09/30
- [PULL 19/44] spapr: use DEVICE_UNPLUG_GUEST_ERROR to report unplug errors, David Gibson, 2021/09/30
- [PULL 25/44] spapr_numa.c: split FORM1 code into helpers, David Gibson, 2021/09/30
- [PULL 17/44] qapi/qdev.json: fix DEVICE_DELETED parameters doc, David Gibson, 2021/09/30
- [PULL 08/44] ppc/xive: Export priority_to_ipb() helper, David Gibson, 2021/09/30
- [PULL 21/44] target/ppc: Convert debug to trace events (exceptions), David Gibson, 2021/09/30
- [PULL 22/44] target/ppc: Replace debug messages by asserts for unknown IRQ pins,
David Gibson <=
- [PULL 23/44] target/ppc: add LPCR[HR] to DisasContext and hflags, David Gibson, 2021/09/30
- [PULL 24/44] target/ppc: Check privilege level based on PSR and LPCR[HR] in tlbie[l], David Gibson, 2021/09/30
- [PULL 26/44] spapr_numa.c: scrap 'legacy_numa' concept, David Gibson, 2021/09/30
- [PULL 27/44] spapr_numa.c: parametrize FORM1 macros, David Gibson, 2021/09/30
- [PULL 29/44] spapr: move FORM1 verifications to post CAS, David Gibson, 2021/09/30
- [PULL 32/44] target/ppc: Convert debug to trace events (decrementer and IRQ), David Gibson, 2021/09/30
- [PULL 36/44] hw/intc: openpic: Clean up the styles, David Gibson, 2021/09/30
- [PULL 28/44] spapr_numa.c: rename numa_assoc_array to FORM1_assoc_array, David Gibson, 2021/09/30
- [PULL 30/44] spapr_numa.c: FORM2 NUMA affinity support, David Gibson, 2021/09/30
- [PULL 33/44] target/ppc: Fix 64-bit decrementer, David Gibson, 2021/09/30