aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc/ocxl/pci.c
AgeCommit message (Collapse)AuthorFilesLines
2019-05-28ocxl: Make ocxl_remove() staticYueHaibing1-1/+1
Fix sparse warning: drivers/misc/ocxl/pci.c:44:6: warning: symbol 'ocxl_remove' was not declared. Should it be static? Reported-by: Hulk Robot <[email protected]> Signed-off-by: YueHaibing <[email protected]> Acked-by: Andrew Donnellan <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2019-05-03ocxl: Create a clear delineation between ocxl backend & frontendAlastair D'Silva1-29/+27
The OCXL driver contains both frontend code for interacting with userspace, as well as backend code for interacting with the hardware. This patch separates the backend code from the frontend so that it can be used by other device drivers that communicate via OpenCAPI. Relocate dev, cdev & sysfs files to the frontend code to allow external drivers to maintain their own devices. Reference counting on the device in the backend is replaced with kref counting. Move file & sysfs layer initialisation from core.c (backend) to pci.c (frontend). Create an ocxl_function oriented interface for initing devices & enumerating AFUs. Signed-off-by: Alastair D'Silva <[email protected]> Acked-by: Frederic Barrat <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2019-05-03ocxl: Split pci.cAlastair D'Silva1-518/+1
In preparation for making core code available for external drivers, move the core code out of pci.c and into core.c Signed-off-by: Alastair D'Silva <[email protected]> Acked-by: Frederic Barrat <[email protected]> Acked-by: Andrew Donnellan <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2018-03-15misc: ocxl: use put_device() instead of device_unregister()Arvind Yadav1-1/+1
if device_register() returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav <[email protected]> Reviewed-by: Uwe Kleine-König <[email protected]> Acked-by: Andrew Donnellan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-24ocxl: Driver code for 'generic' opencapi devicesFrederic Barrat1-0/+585
Add an ocxl driver to handle generic opencapi devices. Of course, it's not meant to be the only opencapi driver, any device is free to implement its own. But if a host application only needs basic services like attaching to an opencapi adapter, have translation faults handled or allocate AFU interrupts, it should suffice. The AFU config space must follow the opencapi specification and use the expected vendor/device ID to be seen by the generic driver. The driver exposes the device AFUs as a char device in /dev/ocxl/ Note that the driver currently doesn't handle memory attached to the opencapi device. Signed-off-by: Frederic Barrat <[email protected]> Signed-off-by: Andrew Donnellan <[email protected]> Signed-off-by: Alastair D'Silva <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>