diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2010-05-22 08:00:52 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-05-22 08:00:52 +0000 |
commit | 4556bd8b2514a55d48c15b1adb17537f49657744 (patch) | |
tree | 67314570081e4b10e768aec2457d1a1d5748a2db /hw/pc.c | |
parent | c86d2c23879da1534a257eecb572a76f1ead5d93 (diff) |
Compile dma only once
Use a qemu_irq to request CPU exit.
7 compilations less for the full build.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/pc.c')
-rw-r--r-- | hw/pc.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -914,6 +914,15 @@ void pc_vga_init(PCIBus *pci_bus) } } +static void cpu_request_exit(void *opaque, int irq, int level) +{ + CPUState *env = cpu_single_env; + + if (env && level) { + cpu_exit(env); + } +} + void pc_basic_device_init(qemu_irq *isa_irq, FDCtrl **floppy_controller, ISADevice **rtc_state) @@ -923,6 +932,7 @@ void pc_basic_device_init(qemu_irq *isa_irq, PITState *pit; qemu_irq *a20_line; ISADevice *i8042; + qemu_irq *cpu_exit_irq; register_ioport_write(0x80, 1, 1, ioport80_write, NULL); @@ -955,7 +965,8 @@ void pc_basic_device_init(qemu_irq *isa_irq, i8042_setup_a20_line(i8042, a20_line); vmmouse_init(i8042); - DMA_init(0); + cpu_exit_irq = qemu_allocate_irqs(cpu_request_exit, NULL, 1); + DMA_init(0, cpu_exit_irq); for(i = 0; i < MAX_FD; i++) { fd[i] = drive_get(IF_FLOPPY, 0, i); |