cxl: Allow a default context to be associated with an external pci_dev
authorIan Munsie <imunsie@au1.ibm.com>
Wed, 13 Jul 2016 21:17:04 +0000 (07:17 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 14 Jul 2016 10:26:52 +0000 (20:26 +1000)
commita19bd79e31769626d288cc016e21a31b6f47bf6f
treeda10b02e662c4541f75db8ded6ca65bc76efe3c5
parent62ccf2d2efefa01d0eb92cd6ecbb45ea0499fb1c
cxl: Allow a default context to be associated with an external pci_dev

The cxl kernel API has a concept of a default context associated with
each PCI device under the virtual PHB. The Mellanox CX4 will also use
the cxl kernel API, but it does not use a virtual PHB - rather, the AFU
appears as a physical function as a peer to the networking functions.

In order to allow the kernel API to work with those networking
functions, we will need to associate a default context with them as
well. To this end, refactor the corresponding code to do this in vphb.c
and export it so that it can be called from the PHB code.

Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/misc/cxl/Makefile
drivers/misc/cxl/base.c
drivers/misc/cxl/cxl.h
drivers/misc/cxl/main.c
drivers/misc/cxl/phb.c [new file with mode: 0644]
drivers/misc/cxl/vphb.c
include/misc/cxl-base.h