hw/arm/omap: Remove unused wakeup irq
The OMAP code creates a qemu_irq whose set function is omap_mpu_wakeup(), and passes that irq into omap_mpuio_init(), which saves it in its omap_mpuio_s::wakeup field. However nothing ever touches that qemu_irq again, so omap_mpu_wakeup() is never called. Remove all this as dead code. This lets us remove a direct call to cpu_interrupt(cpu, CPU_INTERRUPT_EXITTB) from within board/SoC code, which is pretty ugly and might not even do the right thing these days. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20260512203414.3633237-7-peter.maydell@linaro.org
Peter Maydell committed
May 12, 2026 at 21:34 UTC
043b8e470773ec4d2ea3e900fe9479baf1e1dfa1
2 files changed
+2
-18
hw/arm/omap1.c
+2
-16
@@ -1846,7 +1846,6 @@ struct omap_mpuio_s {
1846
qemu_irq kbd_irq;
1847
qemu_irq *in;
1848
qemu_irq handler[16];
1849
- qemu_irq wakeup;
1849
MemoryRegion iomem;
1850
1851
uint16_t inputs;
@@ -2074,14 +2073,13 @@ static void omap_mpuio_onoff(void *opaque, int line, int on)
2073
2074
static struct omap_mpuio_s *omap_mpuio_init(MemoryRegion *memory,
2075
hwaddr base,
2077
- qemu_irq kbd_int, qemu_irq gpio_int, qemu_irq wakeup,
2076
+ qemu_irq kbd_int, qemu_irq gpio_int,
2077
omap_clk clk)
2078
{
2079
struct omap_mpuio_s *s = g_new0(struct omap_mpuio_s, 1);
2080
2081
s->irq = gpio_int;
2082
s->kbd_irq = kbd_int;
2084
- s->wakeup = wakeup;
2083
s->in = qemu_allocate_irqs(omap_mpuio_set, s, 16);
2084
omap_mpuio_reset(s);
2085
@@ -3693,16 +3691,6 @@ static void omap_setup_dsp_mapping(MemoryRegion *system_memory,
3691
}
3692
}
3693
3696
-void omap_mpu_wakeup(void *opaque, int irq, int req)
3697
-{
3698
- struct omap_mpu_state_s *mpu = opaque;
3699
- CPUState *cpu = CPU(mpu->cpu);
3700
-
3701
- if (cpu->halted) {
3702
- cpu_interrupt(cpu, CPU_INTERRUPT_EXITTB);
3703
- }
3704
-}
3705
-
3694
static const struct dma_irq_map omap1_dma_irq_map[] = {
3695
{ 0, OMAP_INT_DMA_CH0_6 },
3696
{ 0, OMAP_INT_DMA_CH1_7 },
@@ -3765,8 +3753,6 @@ struct omap_mpu_state_s *omap310_mpu_init(MemoryRegion *dram,
3753
s->sdram_size = memory_region_size(dram);
3754
s->sram_size = OMAP15XX_SRAM_SIZE;
3755
3768
- s->wakeup = qemu_allocate_irq(omap_mpu_wakeup, s, 0);
3769
-
3756
/* Clocks */
3757
omap_clk_init(s);
3758
@@ -3912,7 +3898,7 @@ struct omap_mpu_state_s *omap310_mpu_init(MemoryRegion *dram,
3898
s->mpuio = omap_mpuio_init(system_memory, 0xfffb5000,
3899
qdev_get_gpio_in(s->ih[1], OMAP_INT_KEYBOARD),
3900
qdev_get_gpio_in(s->ih[1], OMAP_INT_MPUIO),
3915
- s->wakeup, omap_findclk(s, "clk32-kHz"));
3901
+ omap_findclk(s, "clk32-kHz"));
3902
3903
s->gpio = qdev_new("omap-gpio");
3904
omap_gpio_set_clk(OMAP1_GPIO(s->gpio), omap_findclk(s, "arm_gpio_ck"));
include/hw/arm/omap.h
-2
@@ -463,8 +463,6 @@ struct omap_mpu_state_s {
463
struct omap_mpu_state_s *omap310_mpu_init(MemoryRegion *sdram,
464
const char *core);
465
466
-void omap_mpu_wakeup(void *opaque, int irq, int req);
467
-
466
#define OMAP_BAD_REG(paddr) \
467
qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad register %#08"HWADDR_PRIx"\n", \
468
__func__, paddr)