[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 14/30] hw/i386/pc: Fix misusing qemu_allocate_irqs fo
From: |
Michael Tokarev |
Subject: |
[Qemu-devel] [PULL 14/30] hw/i386/pc: Fix misusing qemu_allocate_irqs for single irq |
Date: |
Wed, 3 Jun 2015 16:08:34 +0300 |
From: Shannon Zhao <address@hidden>
Since pc_allocate_cpu_irq only requests one irq, so let it just call
qemu_allocate_irq.
Signed-off-by: Shannon Zhao <address@hidden>
Signed-off-by: Shannon Zhao <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
hw/i386/pc.c | 4 ++--
hw/i386/pc_piix.c | 4 +---
hw/i386/pc_q35.c | 4 +---
include/hw/i386/pc.h | 2 +-
4 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 1eb1db0..886151b 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1345,9 +1345,9 @@ FWCfgState *pc_memory_init(MachineState *machine,
return fw_cfg;
}
-qemu_irq *pc_allocate_cpu_irq(void)
+qemu_irq pc_allocate_cpu_irq(void)
{
- return qemu_allocate_irqs(pic_irq_request, NULL, 1);
+ return qemu_allocate_irq(pic_irq_request, NULL, 0);
}
DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 8d949a3..768b09b 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -86,7 +86,6 @@ static void pc_init1(MachineState *machine)
ISABus *isa_bus;
PCII440FXState *i440fx_state;
int piix3_devfn = -1;
- qemu_irq *cpu_irq;
qemu_irq *gsi;
qemu_irq *i8259;
qemu_irq smi_irq;
@@ -220,8 +219,7 @@ static void pc_init1(MachineState *machine)
} else if (xen_enabled()) {
i8259 = xen_interrupt_controller_init();
} else {
- cpu_irq = pc_allocate_cpu_irq();
- i8259 = i8259_init(isa_bus, cpu_irq[0]);
+ i8259 = i8259_init(isa_bus, pc_allocate_cpu_irq());
}
for (i = 0; i < ISA_NUM_IRQS; i++) {
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 66220b3..110dfb7 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -79,7 +79,6 @@ static void pc_q35_init(MachineState *machine)
GSIState *gsi_state;
ISABus *isa_bus;
int pci_enabled = 1;
- qemu_irq *cpu_irq;
qemu_irq *gsi;
qemu_irq *i8259;
int i;
@@ -230,8 +229,7 @@ static void pc_q35_init(MachineState *machine)
} else if (xen_enabled()) {
i8259 = xen_interrupt_controller_init();
} else {
- cpu_irq = pc_allocate_cpu_irq();
- i8259 = i8259_init(isa_bus, cpu_irq[0]);
+ i8259 = i8259_init(isa_bus, pc_allocate_cpu_irq());
}
for (i = 0; i < ISA_NUM_IRQS; i++) {
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 27bd748..261155f 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -193,7 +193,7 @@ FWCfgState *pc_memory_init(MachineState *machine,
MemoryRegion *rom_memory,
MemoryRegion **ram_memory,
PcGuestInfo *guest_info);
-qemu_irq *pc_allocate_cpu_irq(void);
+qemu_irq pc_allocate_cpu_irq(void);
DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus);
void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,
ISADevice **rtc_state,
--
2.1.4
- [Qemu-devel] [PULL 25/30] hw/display/tc6393xb.c: Fix misusing qemu_allocate_irqs for single irq, (continued)
- [Qemu-devel] [PULL 25/30] hw/display/tc6393xb.c: Fix misusing qemu_allocate_irqs for single irq, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 22/30] hw/unicore32/puv3.c: Fix misusing qemu_allocate_irqs for single irq, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 29/30] cadence_gem: Fix Rx buffer size field mask, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 18/30] hw/sparc/sun4m.c: Fix misusing qemu_allocate_irqs for single irq, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 20/30] hw/lm32/lm32_boards.c: Fix misusing qemu_allocate_irqs for single irq, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 30/30] configure: postfix --extra-cflags to QEMU_CFLAGS, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 23/30] hw/alpha/typhoon.c: Fix misusing qemu_allocate_irqs for single irq, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 13/30] hw/intc/exynos4210_gic.c: Fix memory leak by adjusting order, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 16/30] hw/isa/i82378.c: Fix misusing qemu_allocate_irqs for single irq, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 19/30] hw/ppc/prep.c: Fix misusing qemu_allocate_irqs for single irq, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 14/30] hw/i386/pc: Fix misusing qemu_allocate_irqs for single irq,
Michael Tokarev <=
- [Qemu-devel] [PULL 01/30] iscsi: Remove pointless runtime check of macro value, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 27/30] translate-all: delete prototype for non-existent function, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 12/30] hw/arm/omap_sx1.c: Fix memory leak spotted by valgrind, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 02/30] microblaze: cpu: Delete MMAP_SHIFT definition, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 21/30] hw/lm32/milkymist.c: Fix misusing qemu_allocate_irqs for single irq, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 11/30] hw/ppc/e500.c: Fix memory leak, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 09/30] vl: fix memory leak spotted by valgrind, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 26/30] Add -incoming help text, Michael Tokarev, 2015/06/03
- Re: [Qemu-devel] [PULL 00/30] Trivial patches for 2015-06-03, Peter Maydell, 2015/06/04