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/mips_malta.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/mips_malta.c')
-rw-r--r-- | hw/mips_malta.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/hw/mips_malta.c b/hw/mips_malta.c index 792709bf5a..a8f9d152dd 100644 --- a/hw/mips_malta.c +++ b/hw/mips_malta.c @@ -763,6 +763,15 @@ static void main_cpu_reset(void *opaque) } } +static void cpu_request_exit(void *opaque, int irq, int level) +{ + CPUState *env = cpu_single_env; + + if (env && level) { + cpu_exit(env); + } +} + static void mips_malta_init (ram_addr_t ram_size, const char *boot_device, @@ -781,6 +790,7 @@ void mips_malta_init (ram_addr_t ram_size, FDCtrl *floppy_controller; MaltaFPGAState *malta_fpga; qemu_irq *i8259; + qemu_irq *cpu_exit_irq; int piix4_devfn; uint8_t *eeprom_buf; i2c_bus *smbus; @@ -943,7 +953,8 @@ void mips_malta_init (ram_addr_t ram_size, qdev_init_nofail(eeprom); } pit = pit_init(0x40, isa_reserve_irq(0)); - DMA_init(0); + cpu_exit_irq = qemu_allocate_irqs(cpu_request_exit, NULL, 1); + DMA_init(0, cpu_exit_irq); /* Super I/O */ isa_dev = isa_create_simple("i8042"); |