On 3/25/21 1:29 PM, Richard Henderson wrote:
> On 3/24/21 11:54 AM, Philippe Mathieu-Daudé wrote:
>> To avoid abusing isa_get_irq(NULL) using a hidden ISA bridge
>> under the hood, let the IDE function expose 2 output IRQs,
>> and connect them to the ISA function inputs when creating
>> the south bridge chipset model in vt82c686b_southbridge_init.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
>> ---
>> hw/ide/via.c | 19 +++++++++++++++++--
>> hw/mips/fuloong2e.c | 9 ++++++++-
>> 2 files changed, 25 insertions(+), 3 deletions(-)
>> diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c
>> index 931385c760f..f1c5db13b78 100644
>> --- a/hw/mips/fuloong2e.c
>> +++ b/hw/mips/fuloong2e.c
>> @@ -203,12 +203,19 @@ static void vt82c686b_southbridge_init(PCIBus
>> *pci_bus, int slot, qemu_irq intc,
>> I2CBus **i2c_bus)
>> {
>> PCIDevice *dev;
>> + DeviceState *isa;
>> dev = pci_create_simple_multifunction(pci_bus, PCI_DEVFN(slot,
>> 0), true,
>> TYPE_VT82C686B_ISA);
>> - qdev_connect_gpio_out_named(DEVICE(dev), "intr", 0, intc);
>> + isa = DEVICE(dev);
>> + qdev_connect_gpio_out_named(isa, "intr", 0, intc);
>> dev = pci_create_simple(pci_bus, PCI_DEVFN(slot, 1), "via-ide");
>> + for (unsigned i = 0; i < 2; i++) {
>> + qdev_connect_gpio_out_named(DEVICE(dev), "ide-irq", i,
>
> ^^^^^^^^^^^ isa?
OK.
>> + qdev_get_gpio_in_named(isa,
>> + "isa-irq",
>> 14 + i));
>> + }
>
> It all looks a little funny, but I think I follow it, and see that it
> can't be split further, because of the movement of the +14.
I can break the indent to shift left. Anyway this disappear in the next
commit.
> Reviewed-by: Richard Henderson <[email protected]>
>
Thanks!
Phil.