alistair23-linux/drivers/misc/cxl
Frederic Barrat d601ea918b cxl: Support the cxl kernel API from a guest
Like on bare-metal, the cxl driver creates a virtual PHB and a pci
device for the AFU. The configuration space of the device is mapped to
the configuration record of the AFU.

Reuse the code defined in afu_cr_read8|16|32() when reading the
configuration space of the AFU device.

Even though the (virtual) AFU device is a pci device, the adapter is
not. So a driver using the cxl kernel API cannot read the VPD of the
adapter through the usual PCI interface. Therefore, we add a call to
the cxl kernel API:
ssize_t cxl_read_adapter_vpd(struct pci_dev *dev, void *buf, size_t count);

Co-authored-by: Christophe Lombard <clombard@linux.vnet.ibm.com>
Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com>
Reviewed-by: Manoj Kumar <manoj@linux.vnet.ibm.com>
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2016-03-09 23:40:00 +11:00
..
api.c cxl: Support the cxl kernel API from a guest 2016-03-09 23:40:00 +11:00
base.c cxl: Parse device tree and create cxl device(s) at boot 2016-03-09 23:39:59 +11:00
context.c cxl: Add guest-specific code 2016-03-09 23:36:52 +11:00
cxl.h cxl: Support the cxl kernel API from a guest 2016-03-09 23:40:00 +11:00
debugfs.c cxl: Isolate a few bare-metal-specific calls 2016-03-09 13:05:47 +11:00
fault.c cxl: Isolate a few bare-metal-specific calls 2016-03-09 13:05:47 +11:00
file.c cxl: Support to flash a new image on the adapter from a guest 2016-03-09 23:39:56 +11:00
flash.c cxl: Support to flash a new image on the adapter from a guest 2016-03-09 23:39:56 +11:00
guest.c cxl: Support the cxl kernel API from a guest 2016-03-09 23:40:00 +11:00
hcalls.c cxl: Add guest-specific code 2016-03-09 23:36:52 +11:00
hcalls.h cxl: Add guest-specific code 2016-03-09 23:36:52 +11:00
irq.c cxl: Separate bare-metal fields in adapter and AFU data structures 2016-03-09 13:05:54 +11:00
Kconfig cxl: Add CONFIG_CXL_EEH symbol 2015-08-17 13:56:29 +10:00
main.c cxl: Add guest-specific code 2016-03-09 23:36:52 +11:00
Makefile cxl: Support to flash a new image on the adapter from a guest 2016-03-09 23:39:56 +11:00
native.c cxl: Support the cxl kernel API from a guest 2016-03-09 23:40:00 +11:00
of.c cxl: Add guest-specific code 2016-03-09 23:36:52 +11:00
pci.c cxl: Support the cxl kernel API from a guest 2016-03-09 23:40:00 +11:00
sysfs.c cxl: sysfs support for guests 2016-03-09 23:39:40 +11:00
trace.c cxl: Add tracepoints 2015-01-22 17:31:51 +11:00
trace.h cxl: use more common format specifier 2015-07-13 10:10:54 +10:00
vphb.c cxl: Support the cxl kernel API from a guest 2016-03-09 23:40:00 +11:00