[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH V12 12/27] pc: make pc_init1() not refer ferr_irq di
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH V12 12/27] pc: make pc_init1() not refer ferr_irq directly. |
Date: |
Wed, 6 Jan 2010 11:39:36 +0900 |
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 <address@hidden>
Acked-by: Gerd Hoffmann <address@hidden>
---
hw/pc.c | 8 +++++++-
hw/pc.h | 2 ++
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index fc603bc..1a13b0f 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -86,6 +86,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)
{
@@ -1141,7 +1147,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 4ad20c1..6791b0b 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -91,6 +91,8 @@ void cmos_set_s3_resume_fn(void *opaque, int n, int level);
/* 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);
--
1.6.5.4
- Re: [Qemu-devel] [PATCH V12 24/27] pm_smbus: remove #ifdef DEBUG., (continued)
[Qemu-devel] [PATCH V12 23/27] pci hotadd, acpi_piix4: remove global variables., Isaku Yamahata, 2010/01/05
[Qemu-devel] [PATCH V12 11/27] pc: introduce a function to allocate cpu irq., Isaku Yamahata, 2010/01/05
[Qemu-devel] [PATCH V12 09/27] pc: remove a global variable, floppy_controller., Isaku Yamahata, 2010/01/05
[Qemu-devel] [PATCH V12 25/27] acpi_piix4: remove #ifdef DEBUG., Isaku Yamahata, 2010/01/05
[Qemu-devel] [PATCH V12 01/27] acpi: split out piix4 smbus routines from acpi.c into pm_smbus.c, Isaku Yamahata, 2010/01/05
[Qemu-devel] [PATCH V12 05/27] acpi_piix4: remove unused variable in get_pmsts()., Isaku Yamahata, 2010/01/05
[Qemu-devel] [PATCH V12 27/27] mc146818rtc: remove #ifdef DEBUG_CMOS., Isaku Yamahata, 2010/01/05
[Qemu-devel] [PATCH V12 12/27] pc: make pc_init1() not refer ferr_irq directly.,
Isaku Yamahata <=
[Qemu-devel] [PATCH V12 08/27] pc: make an unnecessary global variable, pit, local., Isaku Yamahata, 2010/01/05
[Qemu-devel] [PATCH V12 22/27] pci hotplug: add argument to pci hot plug callback., Isaku Yamahata, 2010/01/05
[Qemu-devel] [PATCH V12 16/27] pc: split out basic device init from pc_init1() into pc_basic_device_init(), Isaku Yamahata, 2010/01/05
[Qemu-devel] [PATCH V12 14/27] pc: split out memory allocation from pc_init1() into pc_memory_init(), Isaku Yamahata, 2010/01/05
[Qemu-devel] [PATCH V12 18/27] pc: split out piix specific part from pc.c into pc_piix.c, Isaku Yamahata, 2010/01/05
[Qemu-devel] [PATCH V12 21/27] acpi_piix4: qdevfy., Isaku Yamahata, 2010/01/05
[Qemu-devel] [PATCH V12 20/27] rtc: make rtc_xxx accept/return ISADevice instead of RTCState., Isaku Yamahata, 2010/01/05
[Qemu-devel] [PATCH V12 19/27] pc: move rtc declarations from pc.h into a dedicated header file., Isaku Yamahata, 2010/01/05
[Qemu-devel] [PATCH V12 06/27] pc: initialize ioapic before use., Isaku Yamahata, 2010/01/05
[Qemu-devel] [PATCH V12 13/27] pc: split out cpu initialization from pc_init1() into pc_cpus_init()., Isaku Yamahata, 2010/01/05