[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH V12 11/27] pc: introduce a function to allocate cpu
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH V12 11/27] pc: introduce a function to allocate cpu irq. |
Date: |
Wed, 6 Jan 2010 11:39:35 +0900 |
Introduce a function, pc_allocate_cpu_irq(), to allocate cpu irq
in order to make pic_irq_request() piix independent.
Later piix code will be split out to another file keeping pic_irq_request()
static.
Signed-off-by: Isaku Yamahata <address@hidden>
Acked-by: Gerd Hoffmann <address@hidden>
---
hw/pc.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index 3ad9bbb..fc603bc 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -987,6 +987,11 @@ static CPUState *pc_new_cpu(const char *cpu_model)
return env;
}
+static qemu_irq *pc_allocate_cpu_irq(void)
+{
+ return qemu_allocate_irqs(pic_irq_request, NULL, 1);
+}
+
/* PC hardware initialisation */
static void pc_init1(ram_addr_t ram_size,
const char *boot_device,
@@ -1119,7 +1124,7 @@ static void pc_init1(ram_addr_t ram_size,
rom_add_option(option_rom[i]);
}
- cpu_irq = qemu_allocate_irqs(pic_irq_request, NULL, 1);
+ cpu_irq = pc_allocate_cpu_irq();
i8259 = i8259_init(cpu_irq[0]);
isa_irq_state = qemu_mallocz(sizeof(*isa_irq_state));
isa_irq_state->i8259 = i8259;
--
1.6.5.4
- [Qemu-devel] [PATCH V12 00/27] split out piix specific part from pc emulator and some clean ups, Isaku Yamahata, 2010/01/05
- [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 <=
- [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, 2010/01/05
- [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