]> git.proxmox.com Git - qemu.git/commitdiff
pc: make pc_init1() not refer ferr_irq directly.
authorIsaku Yamahata <yamahata@valinux.co.jp>
Fri, 14 May 2010 07:29:09 +0000 (16:29 +0900)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 15 May 2010 15:42:48 +0000 (15:42 +0000)
By introducing a registering function, make pc_init1() not refer to
ferr_irq directly in order to make ferr_irq piix independent.
Later pc_init1() will be split out into another file keeping ferr_irq
static.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/pc.c
hw/pc.h

diff --git a/hw/pc.c b/hw/pc.c
index fa11477e15af84f1038a1659b06dbb5453caa847..18c025bbb8309d0b7632f896e181ac7abe073f25 100644 (file)
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -102,6 +102,12 @@ static void ioport80_write(void *opaque, uint32_t addr, uint32_t data)
 
 /* MSDOS compatibility mode FPU exception support */
 static qemu_irq ferr_irq;
+
+void pc_register_ferr_irq(qemu_irq irq)
+{
+    ferr_irq = irq;
+}
+
 /* XXX: add IGNNE support */
 void cpu_set_ferr(CPUX86State *s)
 {
@@ -950,7 +956,7 @@ static void pc_init1(ram_addr_t ram_size,
     }
     isa_bus_irqs(isa_irq);
 
-    ferr_irq = isa_reserve_irq(13);
+    pc_register_ferr_irq(isa_reserve_irq(13));
 
     /* init basic PC hardware */
     register_ioport_write(0x80, 1, 1, ioport80_write, NULL);
diff --git a/hw/pc.h b/hw/pc.h
index 77239a05715cc3d6017a94b4dfd88eb3b82d3496..abf02decace451efa5a4710e655463d2baecf6c2 100644 (file)
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -77,6 +77,8 @@ void rtc_set_date(RTCState *s, const struct tm *tm);
 /* pc.c */
 extern int fd_bootchk;
 
+void pc_register_ferr_irq(qemu_irq irq);
+
 void ioport_set_a20(int enable);
 int ioport_get_a20(void);