pc: Convert GSIState::i8259_irq into array
authorJan Kiszka <jan.kiszka@siemens.com>
Fri, 7 Oct 2011 07:19:36 +0000 (09:19 +0200)
committerBlue Swirl <blauwirbel@gmail.com>
Sun, 16 Oct 2011 11:10:52 +0000 (11:10 +0000)
Will be required when we no longer let i8259_init allocate the PIC IRQs
but convert that chips to qdev.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/pc.h
hw/pc_piix.c

diff --git a/hw/pc.h b/hw/pc.h
index 558d9a5f969cd4cd87706d2274a3df251d8fb53f..72f8c7c978be1b129e82c7bd668209953d89998c 100644 (file)
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -76,7 +76,7 @@ void irq_info(Monitor *mon);
 #define GSI_NUM_PINS IOAPIC_NUM_PINS
 
 typedef struct GSIState {
-    qemu_irq *i8259_irq;
+    qemu_irq i8259_irq[ISA_NUM_IRQS];
     qemu_irq ioapic_irq[IOAPIC_NUM_PINS];
 } GSIState;
 
index e6e280c55bb995625e8d7939be126ff9a6dc8705..c89042f1ced20748756f4916a777324a9d4abe8f 100644 (file)
@@ -158,7 +158,9 @@ static void pc_init1(MemoryRegion *system_memory,
         i8259 = xen_interrupt_controller_init();
     }
 
-    gsi_state->i8259_irq = i8259;
+    for (i = 0; i < ISA_NUM_IRQS; i++) {
+        gsi_state->i8259_irq[i] = i8259[i];
+    }
     if (pci_enabled) {
         ioapic_init(gsi_state);
     }