[PATCH] testdev: adjust for ISA irq changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Recent changes killed the ioapic_irq_hack hack, use the isa_get_irq() API
instead.

Signed-off-by: Avi Kivity <avi@xxxxxxxxxx>
---
 hw/isa-bus.c |    2 +-
 hw/testdev.c |    4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/hw/isa-bus.c b/hw/isa-bus.c
index 2765543..7e06efc 100644
--- a/hw/isa-bus.c
+++ b/hw/isa-bus.c
@@ -66,7 +66,7 @@ void isa_bus_irqs(qemu_irq *irqs)
  */
 qemu_irq isa_get_irq(int isairq)
 {
-    if (isairq < 0 || isairq > 15) {
+    if (isairq < 0 || isairq > 23) {
         hw_error("isa irq %d invalid", isairq);
     }
     return isabus->irqs[isairq];
diff --git a/hw/testdev.c b/hw/testdev.c
index f0355c8..bf1611c 100644
--- a/hw/testdev.c
+++ b/hw/testdev.c
@@ -28,11 +28,9 @@ static uint32_t test_device_memsize_read(void *opaque, uint32_t addr)
     return ram_size;
 }
 
-extern qemu_irq *ioapic_irq_hack;
-
 static void test_device_irq_line(void *opaque, uint32_t addr, uint32_t data)
 {
-    qemu_set_irq(ioapic_irq_hack[addr - 0x2000], !!data);
+    qemu_set_irq(isa_get_irq(addr - 0x2000), !!data);
 }
 
 static uint32 test_device_ioport_data;
-- 
1.7.5.2

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux