[PATCH v3 2/2] pseries/eeh: Add Pseries pcibios_bus_add_device

Bjorn Helgaas helgaas at kernel.org
Sat Oct 28 08:30:39 AEDT 2017


On Tue, Oct 17, 2017 at 06:13:35PM -0500, Juan Alvarez wrote:
> On 10/17/17 1:52 PM, Bjorn Helgaas wrote:
> > I'm suggesting that maybe there should be a generic way to prevent
> > binding to VF devices that works for everybody and doesn't require any
> > arch-specific code at all.
> 
> The patch that you have suggested in kernel 4.12 is also a generic way.
> 
> https://marc.info/?l=linux-kernel&m=149002335105804&w=2

The patch mentioned above is now upstream:

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=0e7df22401a3

> Perhaps we can use the same constructs that this patch uses at our level.
> Nonetheless, that will take a rework to this patch and possibly an export
> of a function to set drivers_autoprobe globally. I know that was frowned
> upon on first email thread. Let me know if this is an acceptable
> solution.

I would definitely like to see you use a solution that is somehow
connected with the sriov->drivers_autoprobe mechanism added by
0e7df22401a3.

0e7df22401a3 is a per-PF solution, and you're looking for a
system-wide switch.  I could imagine a system-wide flag exposed in
sysfs and used by pci_device_can_probe().  Or maybe some arch hook in
the pci_device_add() path that clears sriov->drivers_autoprobe for
every PF.

I think the important thing is that it is coordinated as much as
possible with other driver binding controls and not unnecessarily
arch-dependent.

Bjorn


More information about the Linuxppc-dev mailing list