[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/6] hw/isa/i82378: Simplify removing unuseful qemu_allocate_irqs
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 2/6] hw/isa/i82378: Simplify removing unuseful qemu_allocate_irqs() call |
Date: |
Wed, 24 Mar 2021 00:13:54 +0100 |
When the i82378 model was added in commit a04ff940974 ("prep:
Add i82378 PCI-to-ISA bridge emulation") the i8259 model was
not yet QOM'ified. This happened later in commit 747c70af78f
("i8259: Convert to qdev").
Instead of creating an input IRQ with qemu_allocate_irqs()
to pass it as output IRQ of the PIC, with its handler simply
dispatching into the "intr" output IRQ, we can now simplify
and directly connect the PIC to the "intr" named output.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/isa/i82378.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c
index fd296c8ed7a..817eca47053 100644
--- a/hw/isa/i82378.c
+++ b/hw/isa/i82378.c
@@ -47,12 +47,6 @@ 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);
-}
-
static void i82378_request_pic_irq(void *opaque, int irq, int level)
{
DeviceState *dev = opaque;
@@ -94,8 +88,7 @@ static void i82378_realize(PCIDevice *pci, Error **errp)
*/
/* 2 82C59 (irq) */
- s->i8259 = i8259_init(isabus,
- qemu_allocate_irq(i82378_request_out0_irq, s, 0));
+ s->i8259 = i8259_init(isabus, s->out[0]);
isa_bus_irqs(isabus, s->i8259);
/* 1 82C54 (pit) */
--
2.26.2
- [PATCH 0/6] hw/isa: Remove unuseful qemu_allocate_irqs() call, Philippe Mathieu-Daudé, 2021/03/23
- [PATCH 1/6] hw/isa/i82378: Name output IRQ as 'intr', Philippe Mathieu-Daudé, 2021/03/23
- [PATCH 2/6] hw/isa/i82378: Simplify removing unuseful qemu_allocate_irqs() call,
Philippe Mathieu-Daudé <=
- [PATCH 3/6] hw/isa/i82378: Rename output IRQ variable, Philippe Mathieu-Daudé, 2021/03/23
- [PATCH 4/6] hw/isa/vt82c686: Name output IRQ as 'intr', Philippe Mathieu-Daudé, 2021/03/23
- [PATCH 5/6] hw/isa/vt82c686: Simplify removing unuseful qemu_allocate_irqs() call, Philippe Mathieu-Daudé, 2021/03/23
- [PATCH 6/6] hw/isa/piix4: Fix leak removing unuseful qemu_allocate_irqs() call, Philippe Mathieu-Daudé, 2021/03/23