diff mbox series

[02/11] hw/isa/i82378: Rename output IRQ as 'cpu_intr'

Message ID 20230210163744.32182-3-philmd@linaro.org
State Superseded
Headers show
Series hw/isa: More housekeeping | expand

Commit Message

Philippe Mathieu-Daudé Feb. 10, 2023, 4:37 p.m. UTC
Commit a04ff94097 ("prep: Add i82378 PCI-to-ISA bridge
emulation") aimed to model the 2 output IRQs: CPU intr
and NMI. Commit 5039d6e235 ("i8257: remove cpu_request_exit
irq") removed the NMI IRQ.
Since this model only use the CPU interrupt, replace the
'out[2]' array by a single 'cpu_intr'.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/isa/i82378.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Richard Henderson Feb. 11, 2023, 5:10 p.m. UTC | #1
On 2/10/23 06:37, Philippe Mathieu-Daudé wrote:
> Commit a04ff94097 ("prep: Add i82378 PCI-to-ISA bridge
> emulation") aimed to model the 2 output IRQs: CPU intr
> and NMI. Commit 5039d6e235 ("i8257: remove cpu_request_exit
> irq") removed the NMI IRQ.
> Since this model only use the CPU interrupt, replace the
> 'out[2]' array by a single 'cpu_intr'.
> 
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
>   hw/isa/i82378.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
diff mbox series

Patch

diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c
index e3322e03bf..84ce761f5f 100644
--- a/hw/isa/i82378.c
+++ b/hw/isa/i82378.c
@@ -32,7 +32,7 @@  OBJECT_DECLARE_SIMPLE_TYPE(I82378State, I82378)
 struct I82378State {
     PCIDevice parent_obj;
 
-    qemu_irq out[2];
+    qemu_irq cpu_intr;
     qemu_irq *i8259;
     MemoryRegion io;
 };
@@ -50,7 +50,7 @@  static const VMStateDescription vmstate_i82378 = {
 static void i82378_request_out0_irq(void *opaque, int irq, int level)
 {
     I82378State *s = opaque;
-    qemu_set_irq(s->out[0], level);
+    qemu_set_irq(s->cpu_intr, level);
 }
 
 static void i82378_request_pic_irq(void *opaque, int irq, int level)
@@ -113,7 +113,7 @@  static void i82378_init(Object *obj)
     DeviceState *dev = DEVICE(obj);
     I82378State *s = I82378(obj);
 
-    qdev_init_gpio_out(dev, s->out, 1);
+    qdev_init_gpio_out(dev, &s->cpu_intr, 1);
     qdev_init_gpio_in(dev, i82378_request_pic_irq, 16);
 }