hw/isa: Rename isa_bus_irqs() -> isa_bus_register_input_irqs()

isa_bus_irqs() register an array of input IRQs on
the ISA bus. Rename it as isa_bus_register_input_irqs().

Mechanical change using:

 $ sed -i -e 's/isa_bus_irqs/isa_bus_register_input_irqs/g' \
   $(git grep -wl isa_bus_irqs)

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230210163744.32182-10-philmd@linaro.org>
This commit is contained in:
Philippe Mathieu-Daudé 2023-02-09 13:32:18 +01:00
parent 23c69bb822
commit 7067887ea1
12 changed files with 16 additions and 16 deletions

View File

@ -98,7 +98,7 @@ static ISABus *hppa_isa_bus(void)
isa_irqs = i8259_init(isa_bus, isa_irqs = i8259_init(isa_bus,
/* qemu_allocate_irq(dino_set_isa_irq, s, 0)); */ /* qemu_allocate_irq(dino_set_isa_irq, s, 0)); */
NULL); NULL);
isa_bus_irqs(isa_bus, isa_irqs); isa_bus_register_input_irqs(isa_bus, isa_irqs);
return isa_bus; return isa_bus;
} }

View File

@ -174,7 +174,7 @@ static void microvm_devices_init(MicrovmMachineState *mms)
isa_bus = isa_bus_new(NULL, get_system_memory(), get_system_io(), isa_bus = isa_bus_new(NULL, get_system_memory(), get_system_io(),
&error_abort); &error_abort);
isa_bus_irqs(isa_bus, x86ms->gsi); isa_bus_register_input_irqs(isa_bus, x86ms->gsi);
ioapic_init_gsi(gsi_state, "machine"); ioapic_init_gsi(gsi_state, "machine");
if (ioapics > 1) { if (ioapics > 1) {

View File

@ -246,7 +246,7 @@ static void pc_init1(MachineState *machine,
i8257_dma_init(isa_bus, 0); i8257_dma_init(isa_bus, 0);
pcms->hpet_enabled = false; pcms->hpet_enabled = false;
} }
isa_bus_irqs(isa_bus, x86ms->gsi); isa_bus_register_input_irqs(isa_bus, x86ms->gsi);
if (x86ms->pic == ON_OFF_AUTO_ON || x86ms->pic == ON_OFF_AUTO_AUTO) { if (x86ms->pic == ON_OFF_AUTO_ON || x86ms->pic == ON_OFF_AUTO_AUTO) {
pc_i8259_create(isa_bus, gsi_state->i8259_irq); pc_i8259_create(isa_bus, gsi_state->i8259_irq);

View File

@ -89,7 +89,7 @@ static void i82378_realize(PCIDevice *pci, Error **errp)
/* 2 82C59 (irq) */ /* 2 82C59 (irq) */
s->isa_irqs_in = i8259_init(isabus, s->cpu_intr); s->isa_irqs_in = i8259_init(isabus, s->cpu_intr);
isa_bus_irqs(isabus, s->isa_irqs_in); isa_bus_register_input_irqs(isabus, s->isa_irqs_in);
/* 1 82C54 (pit) */ /* 1 82C54 (pit) */
pit = i8254_pit_init(isabus, 0x40, 0, NULL); pit = i8254_pit_init(isabus, 0x40, 0, NULL);

View File

@ -67,13 +67,13 @@ ISABus *isa_bus_new(DeviceState *dev, MemoryRegion* address_space,
return isabus; return isabus;
} }
void isa_bus_irqs(ISABus *bus, qemu_irq *irqs) void isa_bus_register_input_irqs(ISABus *bus, qemu_irq *irqs_in)
{ {
bus->irqs = irqs; bus->irqs_in = irqs_in;
} }
/* /*
* isa_get_irq() returns the corresponding qemu_irq entry for the i8259. * isa_get_irq() returns the corresponding input qemu_irq entry for the i8259.
* *
* This function is only for special cases such as the 'ferr', and * This function is only for special cases such as the 'ferr', and
* temporary use for normal devices until they are converted to qdev. * temporary use for normal devices until they are converted to qdev.
@ -82,7 +82,7 @@ qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq)
{ {
assert(!dev || ISA_BUS(qdev_get_parent_bus(DEVICE(dev))) == isabus); assert(!dev || ISA_BUS(qdev_get_parent_bus(DEVICE(dev))) == isabus);
assert(isairq < ISA_NUM_IRQS); assert(isairq < ISA_NUM_IRQS);
return isabus->irqs[isairq]; return isabus->irqs_in[isairq];
} }
void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq) void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq)

View File

@ -719,7 +719,7 @@ static void ich9_lpc_realize(PCIDevice *d, Error **errp)
qdev_init_gpio_out_named(dev, lpc->gsi, ICH9_GPIO_GSI, IOAPIC_NUM_PINS); qdev_init_gpio_out_named(dev, lpc->gsi, ICH9_GPIO_GSI, IOAPIC_NUM_PINS);
isa_bus_irqs(isa_bus, lpc->gsi); isa_bus_register_input_irqs(isa_bus, lpc->gsi);
i8257_dma_init(isa_bus, 0); i8257_dma_init(isa_bus, 0);

View File

@ -212,7 +212,7 @@ static void piix4_realize(PCIDevice *dev, Error **errp)
s->isa = i8259_init(isa_bus, *i8259_out_irq); s->isa = i8259_init(isa_bus, *i8259_out_irq);
/* initialize ISA irqs */ /* initialize ISA irqs */
isa_bus_irqs(isa_bus, s->isa); isa_bus_register_input_irqs(isa_bus, s->isa);
/* initialize pit */ /* initialize pit */
i8254_pit_init(isa_bus, 0x40, 0, NULL); i8254_pit_init(isa_bus, 0x40, 0, NULL);

View File

@ -615,7 +615,7 @@ static void via_isa_realize(PCIDevice *d, Error **errp)
} }
s->isa_irqs_in = i8259_init(isa_bus, s->cpu_intr); s->isa_irqs_in = i8259_init(isa_bus, s->cpu_intr);
isa_bus_irqs(isa_bus, s->isa_irqs_in); isa_bus_register_input_irqs(isa_bus, s->isa_irqs_in);
i8254_pit_init(isa_bus, 0x40, 0, NULL); i8254_pit_init(isa_bus, 0x40, 0, NULL);
i8257_dma_init(isa_bus, 0); i8257_dma_init(isa_bus, 0);

View File

@ -249,7 +249,7 @@ static void mips_jazz_init(MachineState *machine,
/* ISA devices */ /* ISA devices */
i8259 = i8259_init(isa_bus, env->irq[4]); i8259 = i8259_init(isa_bus, env->irq[4]);
isa_bus_irqs(isa_bus, i8259); isa_bus_register_input_irqs(isa_bus, i8259);
i8257_dma_init(isa_bus, 0); i8257_dma_init(isa_bus, 0);
pit = i8254_pit_init(isa_bus, 0x40, 0, NULL); pit = i8254_pit_init(isa_bus, 0x40, 0, NULL);
pcspk_init(isa_new(TYPE_PC_SPEAKER), isa_bus, pit); pcspk_init(isa_new(TYPE_PC_SPEAKER), isa_bus, pit);

View File

@ -837,7 +837,7 @@ ISABus *pnv_lpc_isa_create(PnvLpcController *lpc, bool use_cpld, Error **errp)
irqs = qemu_allocate_irqs(handler, lpc, ISA_NUM_IRQS); irqs = qemu_allocate_irqs(handler, lpc, ISA_NUM_IRQS);
isa_bus_irqs(isa_bus, irqs); isa_bus_register_input_irqs(isa_bus, irqs);
return isa_bus; return isa_bus;
} }

View File

@ -316,7 +316,7 @@ static void ebus_realize(PCIDevice *pci_dev, Error **errp)
/* ISA bus */ /* ISA bus */
s->isa_irqs_in = qemu_allocate_irqs(ebus_isa_irq_handler, s, ISA_NUM_IRQS); s->isa_irqs_in = qemu_allocate_irqs(ebus_isa_irq_handler, s, ISA_NUM_IRQS);
isa_bus_irqs(s->isa_bus, s->isa_irqs_in); isa_bus_register_input_irqs(s->isa_bus, s->isa_irqs_in);
qdev_init_gpio_out_named(DEVICE(s), s->isa_irqs_out, "isa-irq", qdev_init_gpio_out_named(DEVICE(s), s->isa_irqs_out, "isa-irq",
ISA_NUM_IRQS); ISA_NUM_IRQS);

View File

@ -55,7 +55,7 @@ struct ISABus {
MemoryRegion *address_space; MemoryRegion *address_space;
MemoryRegion *address_space_io; MemoryRegion *address_space_io;
qemu_irq *irqs; qemu_irq *irqs_in;
IsaDma *dma[2]; IsaDma *dma[2];
}; };
@ -69,7 +69,7 @@ struct ISADevice {
ISABus *isa_bus_new(DeviceState *dev, MemoryRegion *address_space, ISABus *isa_bus_new(DeviceState *dev, MemoryRegion *address_space,
MemoryRegion *address_space_io, Error **errp); MemoryRegion *address_space_io, Error **errp);
void isa_bus_irqs(ISABus *bus, qemu_irq *irqs); void isa_bus_register_input_irqs(ISABus *bus, qemu_irq *irqs_in);
void isa_bus_dma(ISABus *bus, IsaDma *dma8, IsaDma *dma16); void isa_bus_dma(ISABus *bus, IsaDma *dma8, IsaDma *dma16);
IsaDma *isa_get_dma(ISABus *bus, int nchan); IsaDma *isa_get_dma(ISABus *bus, int nchan);
ISADevice *isa_new(const char *name); ISADevice *isa_new(const char *name);