]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
cxl: Do not create vPHB if there are no AFU configuration records
authorIan Munsie <imunsie@au1.ibm.com>
Wed, 13 Jul 2016 21:17:05 +0000 (07:17 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 14 Jul 2016 10:26:53 +0000 (20:26 +1000)
commite4f5fc001a6cb82bef910372457ca7754defa84d
treecf0fa8037d37686329c0cef5ae8d7f5b5643bf65
parenta19bd79e31769626d288cc016e21a31b6f47bf6f
cxl: Do not create vPHB if there are no AFU configuration records

The vPHB model of the cxl kernel API is a hierarchy where the AFU is
represented by the vPHB, and it's AFU configuration records are exposed
as functions under that vPHB. If there are no AFU configuration records
we will create a vPHB with nothing under it, which is a waste of
resources and will opt us into EEH handling despite not having anything
special to handle.

This also does not make sense for cards using the peer model of the cxl
kernel API, where the other functions of the device are exposed via
additional peer physical functions rather than AFU configuration
records. This model will also not work with the existing EEH handling in
the cxl driver, as that is designed around the vPHB model.

Skip creating the vPHB for AFUs without any AFU configuration records,
and opt out of EEH handling for them.

Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/misc/cxl/pci.c
drivers/misc/cxl/vphb.c