Aw: Re: [PATCH] pci: mediatek: fix warning in msi.h

Marc Zyngier maz at kernel.org
Tue Nov 3 04:54:23 EST 2020


On 2020-11-02 22:18, Thomas Gleixner wrote:
> On Mon, Nov 02 2020 at 17:16, Thomas Gleixner wrote:
>> On Mon, Nov 02 2020 at 11:30, Marc Zyngier wrote:
>>> --- a/drivers/pci/probe.c
>>> +++ b/drivers/pci/probe.c
>>> @@ -871,6 +871,8 @@ static void pci_set_bus_msi_domain(struct pci_bus
>>> *bus)
>>>   		d = pci_host_bridge_msi_domain(b);
>>> 
>>>   	dev_set_msi_domain(&bus->dev, d);
>>> +	if (!d)
>>> +		bus->bus_flags |= PCI_BUS_FLAGS_NO_MSI;
>> 
>> Hrm, that might break legacy setups (no irqdomain support). I'd rather
>> prefer to explicitly tell the pci core at host registration time.
> 
> s/might break/ breaks /     Just validated :)

For my own edification, can you point me to the failing case?

> So we really need some other solution and removing the warning is not 
> an
> option. If MSI is enabled then we want to get a warning when a PCI
> device has no MSI domain associated. Explicitly expressing the PCIE
> brigde misfeature of not supporting MSI is way better than silently
> returning an error code which is swallowed anyway.

I don't disagree here, though the PCI_MSI_ARCH_FALLBACKS mechanism
makes it more difficult to establish.

> Whatever the preferred way is via flags at host probe time or flagging
> it post probe I don't care much as long as it is consistent.

Host probe time is going to require some changes in the core PCI api,
as everything that checks for a MSI domain is based on the pci_bus
structure, which is only allocated much later.

I'll have a think.

         M.
-- 
Jazz is not dead. It just smells funny...



More information about the Linux-mediatek mailing list