qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 5/6] hw/ide/via: Connect IDE function output IRQs to the ISA


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 5/6] hw/ide/via: Connect IDE function output IRQs to the ISA function input
Date: Thu, 25 Mar 2021 15:27:12 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0

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é <f4bug@amsat.org>
>> ---
>>   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 <richard.henderson@linaro.org>
> 

Thanks!

Phil.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]