Re: [PATCH 2/6] PCI/MSI: add hooks to populate the msi_domain field

From: Marc Zyngier
Date: Tue Dec 09 2014 - 05:02:55 EST


Hi Yijing,

On 09/12/14 02:03, Yijing Wang wrote:
> On 2014/12/9 4:12, Marc Zyngier wrote:
>> In order to be able to populate the device msi_domain field,
>> add the necesary hooks to propagate the PHB msi_domain across
>> secondary busses to devices.
>>
>> So far, nobody populates the initial msi_domain.
>>
>> Signed-off-by: Marc Zyngier <marc.zyngier@xxxxxxx>
>> ---
>> drivers/pci/probe.c | 24 ++++++++++++++++++++++++
>> include/linux/pci.h | 1 +
>> 2 files changed, 25 insertions(+)
>>
>> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
>> index c8ca98c..d1009a2 100644
>> --- a/drivers/pci/probe.c
>> +++ b/drivers/pci/probe.c
>> @@ -670,6 +670,20 @@ static void pci_set_bus_speed(struct pci_bus *bus)
>> }
>> }
>>
>> +void __weak pcibios_set_phb_msi_domain(struct pci_bus *bus)
>> +{
>> +}
>> +
>> +static void pci_set_bus_msi_domain(struct pci_bus *bus)
>> +{
>> + struct pci_dev *bridge = bus->self;
>> +
>> + if (!bridge)
>> + pcibios_set_phb_msi_domain(bus);
>> + else
>> + dev_set_msi_domain(&bus->dev, dev_get_msi_domain(&bridge->dev));
>> +}
>
>
> Hi Marc, we can not assume pci devices under same phb share the same msi irq domain,
> now in x86, pci devices under the same phb may associate different msi irq domain.

Well, this is not supposed to be a perfect solution yet, but instead a
basis for discussion. What I'd like to find out is:

- What is the minimum granularity for associating a device with its MSI
domain in existing platforms?
- What topology data structures do you use to find out what MSI
controller a device should be matched with?
- What in-tree platform already has this requirements?

Thanks,

M.
--
Jazz is not dead. It just smells funny...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/