On 26/3/21 8:59 pm, Samuel Thibault wrote: > Damien Zammit, le ven. 26 mars 2021 20:48:45 +1100, a ecrit: >> As discussed, this should be done via a new pci-arbiter RPC that >> requests the IRQ id for a particular device. > > Mmm, AIUI a driver can already read the PCI IRQ information with > pci_conf_read, and lookup in acpi for the irq line, I don't think > pci-arbiter itself needs an additional RPC? That could rather be on the > acpi server.
As I understand it, the PCI IRQ information is incorrect in the config space, the only way to know the APIC pin for a specific device is via ACPI. So you have to pass in the B/D/F of the device to an acpi RPC and discover its pin. You can't use a pci device without the arbiter and ACPI is just one specific implementation of the lookup. We could, for example, fall back to guessing the pin if ACPI is not available. Why should every user of a pci device have specific logic to discover its pin? Wouldn't this be better to be centralised in a pci RPC? Also, in the future if we use IOMMU the irq would need to be remapped by the arbiter. Damien