summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorIan Munsie <imunsie@au1.ibm.com>2016-07-13 21:17:06 (GMT)
committerMichael Ellerman <mpe@ellerman.id.au>2016-07-14 10:26:54 (GMT)
commit4361b03430d685610e5feea3ec7846e8b9ae795f (patch)
treefb7022f5da20d4c8cf1c0ea6c21aa0bc9e2485d2 /drivers
parente4f5fc001a6cb82bef910372457ca7754defa84d (diff)
downloadlinux-4361b03430d685610e5feea3ec7846e8b9ae795f.tar.xz
powerpc/powernv: Add support for the cxl kernel api on the real phb
This adds support for the peer model of the cxl kernel api to the PowerNV PHB, in which physical function 0 represents the cxl function on the card (an XSL in the case of the CX4), which other physical functions will use for memory access and interrupt services. It is referred to as the peer model as these functions are peers of one another, as opposed to the Virtual PHB model which forms a hierarchy. This patch exports APIs to enable the peer mode, check if a PCI device is attached to a PHB in this mode, and to set and get the peer AFU for this mode. The cxl driver will enable this mode for supported cards by calling pnv_cxl_enable_phb_kernel_api(). This will set a flag in the PHB to note that this mode is enabled, and switch out it's controller_ops for the cxl version. The cxl version of the controller_ops struct implements it's own versions of the enable_device_hook and release_device to handle refcounting on the peer AFU and to allocate a default context for the device. Once enabled, the cxl kernel API may not be disabled on a PHB. Currently there is no safe way to disable cxl mode short of a reboot, so until that changes there is no reason to support the disable path. 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>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions