[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 05/26] pc: initialize ioapic before use.
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH 05/26] pc: initialize ioapic before use. |
Date: |
Fri, 14 May 2010 16:29:03 +0900 |
The changeset of 2c8d9340203c7f19265fd4cb2341f568217a3af6
prevents isa_irq_handler() from NULL refering of IsaIrqState::ioapic.
However it would be better to initialize the member before reference.
Signed-off-by: Isaku Yamahata <address@hidden>
Acked-by: Gerd Hoffmann <address@hidden>
---
hw/pc.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index db2b9a2..8842766 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -921,6 +921,9 @@ static void pc_init1(ram_addr_t ram_size,
i8259 = i8259_init(cpu_irq[0]);
isa_irq_state = qemu_mallocz(sizeof(*isa_irq_state));
isa_irq_state->i8259 = i8259;
+ if (pci_enabled) {
+ isa_irq_state->ioapic = ioapic_init();
+ }
isa_irq = qemu_allocate_irqs(isa_irq_handler, isa_irq_state, 24);
if (pci_enabled) {
@@ -964,9 +967,6 @@ static void pc_init1(ram_addr_t ram_size,
register_ioport_read(0x92, 1, 1, ioport92_read, NULL);
register_ioport_write(0x92, 1, 1, ioport92_write, NULL);
- if (pci_enabled) {
- isa_irq_state->ioapic = ioapic_init();
- }
pit = pit_init(0x40, isa_reserve_irq(0));
pcspk_init(pit);
if (!no_hpet) {
--
1.6.6.1
- [Qemu-devel] [PATCH 00/26] split out piix specific part from pc emulator and some clean ups, Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 11/26] pc: make pc_init1() not refer ferr_irq directly., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 15/26] pc: split out basic device init from pc_init1() into pc_basic_device_init(), Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 09/26] pc: remove global variable rtc_state by using qemu_irq., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 04/26] acpi: split acpi.c into the common part and the piix4 part., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 01/26] acpi: split out piix4 smbus routines from acpi.c into pm_smbus.c, Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 10/26] pc: introduce a function to allocate cpu irq., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 07/26] pc: make an unnecessary global variable, pit, local., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 02/26] acpi: split out apm register emulation from acpi.c, Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 05/26] pc: initialize ioapic before use.,
Isaku Yamahata <=
- [Qemu-devel] [PATCH 06/26] pc, i440fx: Make smm enable/disable function i440fx independent., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 13/26] pc: split out memory allocation from pc_init1() into pc_memory_init(), Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 08/26] pc: remove a global variable, floppy_controller., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 14/26] pc: split out vga initialization from pc_init1() into pc_vga_init()., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 24/26] acpi_piix4: remove #ifdef DEBUG., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 21/26] pci hotplug: add argument to pci hot plug callback., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 18/26] pc: move rtc declarations from pc.h into a dedicated header file., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 25/26] apm: remove #ifdef DEBUG., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 26/26] mc146818rtc: remove #ifdef DEBUG_CMOS., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 03/26] acpi: add acpi constants from linux header files and use them., Isaku Yamahata, 2010/05/14