+ Marc
On 21/07/2021 08:24, Christoph Hellwig wrote:
On Wed, Jul 21, 2021 at 09:20:00AM +0200, Thomas Gleixner wrote:
Just walking the list seems fine to me given that this is not a
performance criticial path. But what are the locking implications?
At the moment there are none because the list is initialized in the
setup path and never modified afterwards. Though that might change
sooner than later to fix the virtio wreckage vs. MSI-X.
What is the issue there? Either way, if we keep the helper in the
IRQ code it should be easy to spot for anyone adding the locking.
Also does the above imply this won't work for your platform MSI case?
The msi descriptors are attached to struct device and independent of
platform/PCI/whatever.
That's what I assumed, but this text from John suggested there is
something odd about the platform case:
"Did you consider that for PCI .."
.
For this special platform MSI case there is a secondary interrupt
controller (called mbigen) which generates the MSI on behalf of the
device, which I think the MSI belongs to (and not the device, itself).
See "latter case" mentioned in commit 91f90daa4fb2.
I think Marc and Thomas can explain this much better than I could.
Anyway, as I mentioned earlier, I think that this specific problem is
unique and can be solved without using a function which examines the
struct device.msi_list .
Thanks,
John