hw/ide: Un-inline ide_set_irq()

Only include "hw/irq.h" where appropriate.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230215112712.23110-10-philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Philippe Mathieu-Daudé 2023-02-09 23:01:55 +01:00
parent 1f7a0d0339
commit da9f1172c0
9 changed files with 16 additions and 8 deletions

View File

@ -22,6 +22,7 @@
*/ */
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "hw/irq.h"
#include "hw/pci/msi.h" #include "hw/pci/msi.h"
#include "hw/pci/pci.h" #include "hw/pci/pci.h"
#include "hw/qdev-properties.h" #include "hw/qdev-properties.h"

View File

@ -24,6 +24,7 @@
*/ */
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "hw/irq.h"
#include "hw/isa/isa.h" #include "hw/isa/isa.h"
#include "migration/vmstate.h" #include "migration/vmstate.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"
@ -2782,6 +2783,13 @@ void ide_init2(IDEBus *bus, qemu_irq irq)
bus->dma = &ide_dma_nop; bus->dma = &ide_dma_nop;
} }
void ide_set_irq(IDEBus *bus)
{
if (!(bus->cmd & IDE_CTRL_DISABLE_IRQ)) {
qemu_irq_raise(bus->irq);
}
}
void ide_exit(IDEState *s) void ide_exit(IDEState *s)
{ {
timer_free(s->sector_write_timer); timer_free(s->sector_write_timer);

View File

@ -61,6 +61,7 @@
*/ */
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "hw/irq.h"
#include "hw/pci/msi.h" #include "hw/pci/msi.h"
#include "hw/pci/pci.h" #include "hw/pci/pci.h"
#include "migration/vmstate.h" #include "migration/vmstate.h"

View File

@ -24,6 +24,7 @@
*/ */
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "hw/irq.h"
#include "hw/ppc/mac_dbdma.h" #include "hw/ppc/mac_dbdma.h"
#include "hw/qdev-properties.h" #include "hw/qdev-properties.h"
#include "migration/vmstate.h" #include "migration/vmstate.h"

View File

@ -29,6 +29,7 @@
#include "qapi/error.h" #include "qapi/error.h"
#include "qemu/module.h" #include "qemu/module.h"
#include "sysemu/dma.h" #include "sysemu/dma.h"
#include "hw/irq.h"
#include "hw/ide/internal.h" #include "hw/ide/internal.h"
#include "qom/object.h" #include "qom/object.h"

View File

@ -24,6 +24,7 @@
*/ */
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "hw/irq.h"
#include "hw/pci/pci.h" #include "hw/pci/pci.h"
#include "migration/vmstate.h" #include "migration/vmstate.h"
#include "sysemu/dma.h" #include "sysemu/dma.h"

View File

@ -28,6 +28,7 @@
#include "migration/vmstate.h" #include "migration/vmstate.h"
#include "hw/misc/macio/macio.h" #include "hw/misc/macio/macio.h"
#include "hw/misc/macio/gpio.h" #include "hw/misc/macio/gpio.h"
#include "hw/irq.h"
#include "hw/nmi.h" #include "hw/nmi.h"
#include "qemu/log.h" #include "qemu/log.h"
#include "qemu/module.h" #include "qemu/module.h"

View File

@ -28,6 +28,7 @@
#include "qapi/error.h" #include "qapi/error.h"
#include "qemu/datadir.h" #include "qemu/datadir.h"
#include "cpu.h" #include "cpu.h"
#include "hw/irq.h"
#include "hw/pci/pci.h" #include "hw/pci/pci.h"
#include "hw/pci/pci_bridge.h" #include "hw/pci/pci_bridge.h"
#include "hw/pci/pci_bus.h" #include "hw/pci/pci_bus.h"

View File

@ -8,7 +8,6 @@
*/ */
#include "hw/ide.h" #include "hw/ide.h"
#include "hw/irq.h"
#include "sysemu/dma.h" #include "sysemu/dma.h"
#include "hw/block/block.h" #include "hw/block/block.h"
#include "exec/ioport.h" #include "exec/ioport.h"
@ -572,13 +571,6 @@ static inline IDEState *idebus_active_if(IDEBus *bus)
return bus->ifs + bus->unit; return bus->ifs + bus->unit;
} }
static inline void ide_set_irq(IDEBus *bus)
{
if (!(bus->cmd & IDE_CTRL_DISABLE_IRQ)) {
qemu_irq_raise(bus->irq);
}
}
/* hw/ide/core.c */ /* hw/ide/core.c */
extern const VMStateDescription vmstate_ide_bus; extern const VMStateDescription vmstate_ide_bus;
@ -627,6 +619,7 @@ int ide_init_drive(IDEState *s, BlockBackend *blk, IDEDriveKind kind,
void ide_init2(IDEBus *bus, qemu_irq irq); void ide_init2(IDEBus *bus, qemu_irq irq);
void ide_exit(IDEState *s); void ide_exit(IDEState *s);
int ide_init_ioport(IDEBus *bus, ISADevice *isa, int iobase, int iobase2); int ide_init_ioport(IDEBus *bus, ISADevice *isa, int iobase, int iobase2);
void ide_set_irq(IDEBus *bus);
void ide_register_restart_cb(IDEBus *bus); void ide_register_restart_cb(IDEBus *bus);
void ide_exec_cmd(IDEBus *bus, uint32_t val); void ide_exec_cmd(IDEBus *bus, uint32_t val);