Remove cxl and cxlflash drivers
Subsystems (5)
cover Remove cxl and cxlflash drivers
This series removes the cxl and cxlflash drivers for IBM CAPI devices.
CAPI devices have been out of production for some time, and we're not aware of any remaining users who are likely to want a modern kernel. There's almost certainly some remaining driver bugs and we don't have much hardware available to properly test the drivers any more. Removing these drivers will also mean we can get rid of a non-trivial amount of support code in arch/powerpc.
Thanks to everyone who's worked on these drivers over the last decade.
This series applies on top of [0].
[0] https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=436003&state=*
Andrew Donnellan (2):
cxlflash: Remove driver
cxl: Remove driver
.../ABI/{obsolete => removed}/sysfs-class-cxl | 55 +-
Documentation/arch/powerpc/cxl.rst | 469 --
Documentation/arch/powerpc/cxlflash.rst | 433 --
Documentation/arch/powerpc/index.rst | 2 -
.../userspace-api/ioctl/ioctl-number.rst | 4 +-
MAINTAINERS | 21 -
arch/powerpc/configs/skiroot_defconfig | 1 -
arch/powerpc/include/asm/copro.h | 6 -
arch/powerpc/include/asm/device.h | 3 -
arch/powerpc/include/asm/pnv-pci.h | 17 -
arch/powerpc/mm/book3s64/hash_native.c | 13 +-
arch/powerpc/mm/book3s64/hash_utils.c | 10 +-
arch/powerpc/mm/book3s64/pgtable.c | 1 -
arch/powerpc/mm/book3s64/slice.c | 6 +-
arch/powerpc/mm/copro_fault.c | 12 -
arch/powerpc/platforms/powernv/Makefile | 1 -
arch/powerpc/platforms/powernv/pci-cxl.c | 153 -
arch/powerpc/platforms/powernv/pci-ioda.c | 43 -
arch/powerpc/platforms/powernv/pci.c | 61 -
arch/powerpc/platforms/powernv/pci.h | 2 -
drivers/misc/Kconfig | 1 -
drivers/misc/Makefile | 1 -
drivers/misc/cxl/Kconfig | 28 -
drivers/misc/cxl/Makefile | 14 -
drivers/misc/cxl/api.c | 532 ---
drivers/misc/cxl/base.c | 126 -
drivers/misc/cxl/context.c | 362 --
drivers/misc/cxl/cxl.h | 1135 -----
drivers/misc/cxl/cxllib.c | 271 --
drivers/misc/cxl/debugfs.c | 134 -
drivers/misc/cxl/fault.c | 341 --
drivers/misc/cxl/file.c | 699 ---
drivers/misc/cxl/flash.c | 538 ---
drivers/misc/cxl/guest.c | 1208 -----
drivers/misc/cxl/hcalls.c | 643 ---
drivers/misc/cxl/hcalls.h | 200 -
drivers/misc/cxl/irq.c | 450 --
drivers/misc/cxl/main.c | 383 --
drivers/misc/cxl/native.c | 1592 -------
drivers/misc/cxl/of.c | 346 --
drivers/misc/cxl/pci.c | 2103 ---------
drivers/misc/cxl/sysfs.c | 771 ----
drivers/misc/cxl/trace.c | 9 -
drivers/misc/cxl/trace.h | 691 ---
drivers/misc/cxl/vphb.c | 309 --
drivers/scsi/Kconfig | 1 -
drivers/scsi/Makefile | 1 -
drivers/scsi/cxlflash/Kconfig | 15 -
drivers/scsi/cxlflash/Makefile | 5 -
drivers/scsi/cxlflash/backend.h | 48 -
drivers/scsi/cxlflash/common.h | 340 --
drivers/scsi/cxlflash/cxl_hw.c | 177 -
drivers/scsi/cxlflash/lunmgt.c | 278 --
drivers/scsi/cxlflash/main.c | 3970 -----------------
drivers/scsi/cxlflash/main.h | 129 -
drivers/scsi/cxlflash/ocxl_hw.c | 1399 ------
drivers/scsi/cxlflash/ocxl_hw.h | 72 -
drivers/scsi/cxlflash/sislite.h | 560 ---
drivers/scsi/cxlflash/superpipe.c | 2218 ---------
drivers/scsi/cxlflash/superpipe.h | 150 -
drivers/scsi/cxlflash/vlun.c | 1336 ------
drivers/scsi/cxlflash/vlun.h | 82 -
include/misc/cxl-base.h | 48 -
include/misc/cxl.h | 265 --
include/misc/cxllib.h | 129 -
include/uapi/misc/cxl.h | 156 -
include/uapi/scsi/cxlflash_ioctl.h | 276 --
.../filesystems/statmount/statmount_test.c | 13 +-
68 files changed, 49 insertions(+), 25819 deletions(-)
rename Documentation/ABI/{obsolete => removed}/sysfs-class-cxl (87%)
delete mode 100644 Documentation/arch/powerpc/cxl.rst
delete mode 100644 Documentation/arch/powerpc/cxlflash.rst
delete mode 100644 arch/powerpc/platforms/powernv/pci-cxl.c
delete mode 100644 drivers/misc/cxl/Kconfig
delete mode 100644 drivers/misc/cxl/Makefile
delete mode 100644 drivers/misc/cxl/api.c
delete mode 100644 drivers/misc/cxl/base.c
delete mode 100644 drivers/misc/cxl/context.c
delete mode 100644 drivers/misc/cxl/cxl.h
delete mode 100644 drivers/misc/cxl/cxllib.c
delete mode 100644 drivers/misc/cxl/debugfs.c
delete mode 100644 drivers/misc/cxl/fault.c
delete mode 100644 drivers/misc/cxl/file.c
delete mode 100644 drivers/misc/cxl/flash.c
delete mode 100644 drivers/misc/cxl/guest.c
delete mode 100644 drivers/misc/cxl/hcalls.c
delete mode 100644 drivers/misc/cxl/hcalls.h
delete mode 100644 drivers/misc/cxl/irq.c
delete mode 100644 drivers/misc/cxl/main.c
delete mode 100644 drivers/misc/cxl/native.c
delete mode 100644 drivers/misc/cxl/of.c
delete mode 100644 drivers/misc/cxl/pci.c
delete mode 100644 drivers/misc/cxl/sysfs.c
delete mode 100644 drivers/misc/cxl/trace.c
delete mode 100644 drivers/misc/cxl/trace.h
delete mode 100644 drivers/misc/cxl/vphb.c
delete mode 100644 drivers/scsi/cxlflash/Kconfig
delete mode 100644 drivers/scsi/cxlflash/Makefile
delete mode 100644 drivers/scsi/cxlflash/backend.h
delete mode 100644 drivers/scsi/cxlflash/common.h
delete mode 100644 drivers/scsi/cxlflash/cxl_hw.c
delete mode 100644 drivers/scsi/cxlflash/lunmgt.c
delete mode 100644 drivers/scsi/cxlflash/main.c
delete mode 100644 drivers/scsi/cxlflash/main.h
delete mode 100644 drivers/scsi/cxlflash/ocxl_hw.c
delete mode 100644 drivers/scsi/cxlflash/ocxl_hw.h
delete mode 100644 drivers/scsi/cxlflash/sislite.h
delete mode 100644 drivers/scsi/cxlflash/superpipe.c
delete mode 100644 drivers/scsi/cxlflash/superpipe.h
delete mode 100644 drivers/scsi/cxlflash/vlun.c
delete mode 100644 drivers/scsi/cxlflash/vlun.h
delete mode 100644 include/misc/cxl-base.h
delete mode 100644 include/misc/cxl.h
delete mode 100644 include/misc/cxllib.h
delete mode 100644 include/uapi/misc/cxl.h
delete mode 100644 include/uapi/scsi/cxlflash_ioctl.hSignature · 1 line
2.47.1
PATCH 1/2 cxlflash: Remove driver
Remove the cxlflash driver for IBM CAPI Flash devices.
The cxlflash driver has received minimal maintenance for some time, and the CAPI Flash hardware that uses it is no longer commercially available.
Thanks to Uma Krishnan, Matthew Ochs and Manoj Kumar for their work on this driver over the years.
--- Documentation/arch/powerpc/cxlflash.rst | 433 -- Documentation/arch/powerpc/index.rst | 1 - .../userspace-api/ioctl/ioctl-number.rst | 2 +- MAINTAINERS | 9 - drivers/scsi/Kconfig | 1 - drivers/scsi/Makefile | 1 - drivers/scsi/cxlflash/Kconfig | 15 - drivers/scsi/cxlflash/Makefile | 5 - drivers/scsi/cxlflash/backend.h | 48 - drivers/scsi/cxlflash/common.h | 340 -- drivers/scsi/cxlflash/cxl_hw.c | 177 - drivers/scsi/cxlflash/lunmgt.c | 278 -- drivers/scsi/cxlflash/main.c | 3970 ----------------- drivers/scsi/cxlflash/main.h | 129 - drivers/scsi/cxlflash/ocxl_hw.c | 1399 ------ drivers/scsi/cxlflash/ocxl_hw.h | 72 - drivers/scsi/cxlflash/sislite.h | 560 --- drivers/scsi/cxlflash/superpipe.c | 2218 --------- drivers/scsi/cxlflash/superpipe.h | 150 - drivers/scsi/cxlflash/vlun.c | 1336 ------ drivers/scsi/cxlflash/vlun.h | 82 - include/uapi/scsi/cxlflash_ioctl.h | 276 -- .../filesystems/statmount/statmount_test.c | 13 +- 23 files changed, 7 insertions(+), 11508 deletions(-) delete mode 100644 Documentation/arch/powerpc/cxlflash.rst delete mode 100644 drivers/scsi/cxlflash/Kconfig delete mode 100644 drivers/scsi/cxlflash/Makefile delete mode 100644 drivers/scsi/cxlflash/backend.h delete mode 100644 drivers/scsi/cxlflash/common.h delete mode 100644 drivers/scsi/cxlflash/cxl_hw.c delete mode 100644 drivers/scsi/cxlflash/lunmgt.c delete mode 100644 drivers/scsi/cxlflash/main.c delete mode 100644 drivers/scsi/cxlflash/main.h delete mode 100644 drivers/scsi/cxlflash/ocxl_hw.c delete mode 100644 drivers/scsi/cxlflash/ocxl_hw.h delete mode 100644 drivers/scsi/cxlflash/sislite.h delete mode 100644 drivers/scsi/cxlflash/superpipe.c delete mode 100644 drivers/scsi/cxlflash/superpipe.h delete mode 100644 drivers/scsi/cxlflash/vlun.c delete mode 100644 drivers/scsi/cxlflash/vlun.h delete mode 100644 include/uapi/scsi/cxlflash_ioctl.h
Documentation/arch/powerpc/cxlflash.rst deleted +0 -433
@@ -1,433 +0,0 @@ -================================ -Coherent Accelerator (CXL) Flash -================================ - -Introduction -============ - - The IBM Power architecture provides support for CAPI (Coherent - Accelerator Power Interface), which is available to certain PCIe slots - on Power 8 systems. CAPI can be thought of as a special tunneling - protocol through PCIe that allow PCIe adapters to look like special - purpose co-processors which can read or write an application's - memory and generate page faults. As a result, the host interface to - an adapter running in CAPI mode does not require the data buffers to - be mapped to the device's memory (IOMMU bypass) nor does it require - memory to be pinned. - - On Linux, Coherent Accelerator (CXL) kernel services present CAPI - devices as a PCI device by implementing a virtual PCI host bridge. - This abstraction simplifies the infrastructure and programming - model, allowing for drivers to look similar to other native PCI - device drivers. - - CXL provides a mechanism by which user space applications can - directly talk to a device (network or storage) bypassing the typical - kernel/device driver stack. The CXL Flash Adapter Driver enables a - user space application direct access to Flash storage. - - The CXL Flash Adapter Driver is a kernel module that sits in the - SCSI stack as a low level device driver (below the SCSI disk and - protocol drivers) for the IBM CXL Flash Adapter. This driver is - responsible for the initialization of the adapter, setting up the - special path for user space access, and performing error recovery. It - communicates directly the Flash Accelerator Functional Unit (AFU) - as described in Documentation/arch/powerpc/cxl.rst. - - The cxlflash driver supports two, mutually exclusive, modes of - operation at the device (LUN) level: - - - Any flash device (LUN) can be configured to be accessed as a - regular disk device (i.e.: /dev/sdc). This is the default mode. - - - Any flash device (LUN) can be configured to be accessed from - user space with a special block library. This mode further - specifies the means of accessing the device and provides for - either raw access to the entire LUN (referred to as direct - or physical LUN access) or access to a kernel/AFU-mediated - partition of the LUN (referred to as virtual LUN access). The - segmentation of a disk device into virtual LUNs is assisted - by special translation services provided by the Flash AFU. - -Overview -======== - - The Coherent Accelerator Interface Architecture (CAIA) introduces a - concept of a master context. A master typically has special privileges - granted to it by the kernel or hypervisor allowing it to perform AFU - wide management and control. The master may or may not be involved - directly in each user I/O, but at the minimum is involved in the - initial setup before the user application is allowed to send requests - directly to the AFU. - - The CXL Flash Adapter Driver establishes a master context with the - AFU. It uses memory mapped I/O (MMIO) for this control and setup. The - Adapter Problem Space Memory Map looks like this:: - - +-------------------------------+ - | 512 * 64 KB User MMIO | - | (per context) | - | User Accessible | - +-------------------------------+ - | 512 * 128 B per context | - | Provisioning and Control | - | Trusted Process accessible | - +-------------------------------+ - | 64 KB Global | - | Trusted Process accessible | - +-------------------------------+ - - This driver configures itself into the SCSI software stack as an - adapter driver. The driver is the only entity that is considered a - Trusted Process to program the Provisioning and Control and Global - areas in the MMIO Space shown above. The master context driver - discovers all LUNs attached to the CXL Flash adapter and instantiates - scsi block devices (/dev/sdb, /dev/sdc etc.) for each unique LUN - seen from each path. - - Once these scsi block devices are instantiated, an application - written to a specification provided by the block library may get - access to the Flash from user space (without requiring a system call). - - This master context driver also provides a series of ioctls for this - block library to enable this user space access. The driver supports - two modes for accessing the block device. - - The first mode is called a virtual mode. In this mode a single scsi - block device (/dev/sdb) may be carved up into any number of distinct - virtual LUNs. The virtual LUNs may be resized as long as the sum of - the sizes of all the virtual LUNs, along with the meta-data associated - with it does not exceed the physical capacity. - - The second mode is called the physical mode. In this mode a single - block device (/dev/sdb) may be opened directly by the block library - and the entire space for the LUN is available to the application. - - Only the physical mode provides persistence of the data. i.e. The - data written to the block device will survive application exit and - restart and also reboot. The virtual LUNs do not persist (i.e. do - not survive after the application terminates or the system reboots). - - -Block library API -================= - - Applications intending to get access to the CXL Flash from user - space should use the block library, as it abstracts the details of - interfacing directly with the cxlflash driver that are necessary for - performing administrative actions (i.e.: setup, tear down, resize). - The block library can be thought of as a 'user' of services, - implemented as IOCTLs, that are provided by the cxlflash driver - specifically for devices (LUNs) operating in user space access - mode. While it is not a requirement that applications understand - the interface between the block library and the cxlflash driver, - a high-level overview of each supported service (IOCTL) is provided - below. - - The block library can be found on GitHub: - http://github.com/open-power/capiflash - - -CXL Flash Driver LUN IOCTLs -=========================== - - Users, such as the block library, that wish to interface with a flash - device (LUN) via user space access need to use the services provided - by the cxlflash driver. As these services are implemented as ioctls, - a file descriptor handle must first be obtained in order to establish - the communication channel between a user and the kernel. This file - descriptor is obtained by opening the device special file associated - with the scsi disk device (/dev/sdb) that was created during LUN - discovery. As per the location of the cxlflash driver within the - SCSI protocol stack, this open is actually not seen by the cxlflash - driver. Upon successful open, the user receives a file descriptor - (herein referred to as fd1) that should be used for issuing the - subsequent ioctls listed below. - - The structure definitions for these IOCTLs are available in: - uapi/scsi/cxlflash_ioctl.h - -DK_CXLFLASH_ATTACH ------------------- - - This ioctl obtains, initializes, and starts a context using the CXL - kernel services. These services specify a context id (u16) by which - to uniquely identify the context and its allocated resources. The - services additionally provide a second file descriptor (herein - referred to as fd2) that is used by the block library to initiate - memory mapped I/O (via mmap()) to the CXL flash device and poll for - completion events. This file descriptor is intentionally installed by - this driver and not the CXL kernel services to allow for intermediary - notification and access in the event of a non-user-initiated close(), - such as a killed process. This design point is described in further - detail in the description for the DK_CXLFLASH_DETACH ioctl. - - There are a few important aspects regarding the "tokens" (context id - and fd2) that are provided back to the user: - - - These tokens are only valid for the process under which they - were created. The child of a forked process cannot continue - to use the context id or file descriptor created by its parent - (see DK_CXLFLASH_VLUN_CLONE for further details). - - - These tokens are only valid for the lifetime of the context and - the process under which they were created. Once either is - destroyed, the tokens are to be considered stale and subsequent - usage will result in errors. - - - A valid adapter file descriptor (fd2 >= 0) is only returned on - the initial attach for a context. Subsequent attaches to an - existing context (DK_CXLFLASH_ATTACH_REUSE_CONTEXT flag present) - do not provide the adapter file descriptor as it was previously - made known to the application. - - - When a context is no longer needed, the user shall detach from - the context via the DK_CXLFLASH_DETACH ioctl. When this ioctl - returns with a valid adapter file descriptor and the return flag - DK_CXLFLASH_APP_CLOSE_ADAP_FD is present, the application _must_ - close the adapter file descriptor following a successful detach. - - - When this ioctl returns with a valid fd2 and the return flag - DK_CXLFLASH_APP_CLOSE_ADAP_FD is present, the application _must_ - close fd2 in the following circumstances: - - + Following a successful detach of the last user of the context - + Following a successful recovery on the context's original fd2 - + In the child process of a fork(), following a clone ioctl, - on the fd2 associated with the source context - - - At any time, a close on fd2 will invalidate the tokens. Applications - should exercise caution to only close fd2 when appropriate (outlined - in the previous bullet) to avoid premature loss of I/O. - -DK_CXLFLASH_USER_DIRECT ------------------------ - This ioctl is responsible for transitioning the LUN to direct - (physical) mode access and configuring the AFU for direct access from - user space on a per-context basis. Additionally, the block size and - last logical block address (LBA) are returned to the user. - - As mentioned previously, when operating in user space access mode, - LUNs may be accessed in whole or in part. Only one mode is allowed - at a time and if one mode is active (outstanding references exist), - requests to use the LUN in a different mode are denied. - - The AFU is configured for direct access from user space by adding an - entry to the AFU's resource handle table. The index of the entry is - treated as a resource handle that is returned to the user. The user - is then able to use the handle to reference the LUN during I/O. - -DK_CXLFLASH_USER_VIRTUAL ------------------------- - This ioctl is responsible for transitioning the LUN to virtual mode - of access and configuring the AFU for virtual access from user space - on a per-context basis. Additionally, the block size and last logical - block address (LBA) are returned to the user. - - As mentioned previously, when operating in user space access mode, - LUNs may be accessed in whole or in part. Only one mode is allowed - at a time and if one mode is active (outstanding references exist), - requests to use the LUN in a different mode are denied. - - The AFU is configured for virtual access from user space by adding - an entry to the AFU's resource handle table. The index of the entry - is treated as a resource handle that is returned to the user. The - user is then able to use the handle to reference the LUN during I/O. - - By default, the virtual LUN is created with a size of 0. The user - would need to use the DK_CXLFLASH_VLUN_RESIZE ioctl to adjust the grow - the virtual LUN to a desired size. To avoid having to perform this - resize for the initial creation of the virtual LUN, the user has the - option of specifying a size as part of the DK_CXLFLASH_USER_VIRTUAL - ioctl, such that when success is returned to the user, the - resource handle that is provided is already referencing provisioned - storage. This is reflected by the last LBA being a non-zero value. - - When a LUN is accessible from more than one port, this ioctl will - return with the DK_CXLFLASH_ALL_PORTS_ACTIVE return flag set. This - provides the user with a hint that I/O can be retried in the event - of an I/O error as the LUN can be reached over multiple paths. - -DK_CXLFLASH_VLUN_RESIZE ------------------------ - This ioctl is responsible for resizing a previously created virtual - LUN and will fail if invoked upon a LUN that is not in virtual - mode. Upon success, an updated last LBA is returned to the user - indicating the new size of the virtual LUN associated with the - resource handle. - - The partitioning of virtual LUNs is jointly mediated by the cxlflash - driver and the AFU. An allocation table is kept for each LUN that is - operating in the virtual mode and used to program a LUN translation - table that the AFU references when provided with a resource handle. - - This ioctl can return -EAGAIN if an AFU sync operation takes too long. - In addition to returning a failure to user, cxlflash will also schedule - an asynchronous AFU reset. Should the user choose to retry the operation, - it is expected to succeed. If this ioctl fails with -EAGAIN, the user - can either retry the operation or treat it as a failure. - -DK_CXLFLASH_RELEASE -------------------- - This ioctl is responsible for releasing a previously obtained - reference to either a physical or virtual LUN. This can be - thought of as the inverse of the DK_CXLFLASH_USER_DIRECT or - DK_CXLFLASH_USER_VIRTUAL ioctls. Upon success, the resource handle - is no longer valid and the entry in the resource handle table is - made available to be used again. - - As part of the release process for virtual LUNs, the virtual LUN - is first resized to 0 to clear out and free the translation tables - associated with the virtual LUN reference. - -DK_CXLFLASH_DETACH ------------------- - This ioctl is responsible for unregistering a context with the - cxlflash driver and release outstanding resources that were - not explicitly released via the DK_CXLFLASH_RELEASE ioctl. Upon - success, all "tokens" which had been provided to the user from the - DK_CXLFLASH_ATTACH onward are no longer valid. - - When the DK_CXLFLASH_APP_CLOSE_ADAP_FD flag was returned on a successful - attach, the application _must_ close the fd2 associated with the context - following the detach of the final user of the context. - -DK_CXLFLASH_VLUN_CLONE ----------------------- - This ioctl is responsible for cloning a previously created - context to a more recently created context. It exists solely to - support maintaining user space access to storage after a process - forks. Upon success, the child process (which invoked the ioctl) - will have access to the same LUNs via the same resource handle(s) - as the parent, but under a different context. - - Context sharing across processes is not supported with CXL and - therefore each fork must be met with establishing a new context - for the child process. This ioctl simplifies the state management - and playback required by a user in such a scenario. When a process - forks, child process can clone the parents context by first creating - a context (via DK_CXLFLASH_ATTACH) and then using this ioctl to - perform the clone from the parent to the child. - - The clone itself is fairly simple. The resource handle and lun - translation tables are copied from the parent context to the child's - and then synced with the AFU. - - When the DK_CXLFLASH_APP_CLOSE_ADAP_FD flag was returned on a successful - attach, the application _must_ close the fd2 associated with the source - context (still resident/accessible in the parent process) following the - clone. This is to avoid a stale entry in the file descriptor table of the - child process. - - This ioctl can return -EAGAIN if an AFU sync operation takes too long. - In addition to returning a failure to user, cxlflash will also schedule - an asynchronous AFU reset. Should the user choose to retry the operation, - it is expected to succeed. If this ioctl fails with -EAGAIN, the user - can either retry the operation or treat it as a failure. - -DK_CXLFLASH_VERIFY ------------------- - This ioctl is used to detect various changes such as the capacity of - the disk changing, the number of LUNs visible changing, etc. In cases - where the changes affect the application (such as a LUN resize), the - cxlflash driver will report the changed state to the application. - - The user calls in when they want to validate that a LUN hasn't been - changed in response to a check condition. As the user is operating out - of band from the kernel, they will see these types of events without - the kernel's knowledge. When encountered, the user's architected - behavior is to call in to this ioctl, indicating what they want to - verify and passing along any appropriate information. For now, only - verifying a LUN change (ie: size different) with sense data is - supported. - -DK_CXLFLASH_RECOVER_AFU ------------------------ - This ioctl is used to drive recovery (if such an action is warranted) - of a specified user context. Any state associated with the user context - is re-established upon successful recovery. - - User contexts are put into an error condition when the device needs to - be reset or is terminating. Users are notified of this error condition - by seeing all 0xF's on an MMIO read. Upon encountering this, the - architected behavior for a user is to call into this ioctl to recover - their context. A user may also call into this ioctl at any time to - check if the device is operating normally. If a failure is returned - from this ioctl, the user is expected to gracefully clean up their - context via release/detach ioctls. Until they do, the context they - hold is not relinquished. The user may also optionally exit the process - at which time the context/resources they held will be freed as part of - the release fop. - - When the DK_CXLFLASH_APP_CLOSE_ADAP_FD flag was returned on a successful - attach, the application _must_ unmap and close the fd2 associated with the - original context following this ioctl returning success and indicating that - the context was recovered (DK_CXLFLASH_RECOVER_AFU_CONTEXT_RESET). - -DK_CXLFLASH_MANAGE_LUN ----------------------- - This ioctl is used to switch a LUN from a mode where it is available - for file-system access (legacy), to a mode where it is set aside for - exclusive user space access (superpipe). In case a LUN is visible - across multiple ports and adapters, this ioctl is used to uniquely - identify each LUN by its World Wide Node Name (WWNN). - - -CXL Flash Driver Host IOCTLs -============================ - - Each host adapter instance that is supported by the cxlflash driver - has a special character device associated with it to enable a set of - host management function. These character devices are hosted in a - class dedicated for cxlflash and can be accessed via `/dev/cxlflash/*`. - - Applications can be written to perform various functions using the - host ioctl APIs below. - - The structure definitions for these IOCTLs are available in: - uapi/scsi/cxlflash_ioctl.h - -HT_CXLFLASH_LUN_PROVISION -------------------------- - This ioctl is used to create and delete persistent LUNs on cxlflash - devices that lack an external LUN management interface. It is only - valid when used with AFUs that support the LUN provision capability. - - When sufficient space is available, LUNs can be created by specifying - the target port to host the LUN and a desired size in 4K blocks. Upon - success, the LUN ID and WWID of the created LUN will be returned and - the SCSI bus can be scanned to detect the change in LUN topology. Note - that partial allocations are not supported. Should a creation fail due - to a space issue, the target port can be queried for its current LUN - geometry. - - To remove a LUN, the device must first be disassociated from the Linux - SCSI subsystem. The LUN deletion can then be initiated by specifying a - target port and LUN ID. Upon success, the LUN geometry associated with - the port will be updated to reflect new number of provisioned LUNs and - available capacity. - - To query the LUN geometry of a port, the target port is specified and - upon success, the following information is presented: - - - Maximum number of provisioned LUNs allowed for the port - - Current number of provisioned LUNs for the port - - Maximum total capacity of provisioned LUNs for the port (4K blocks) - - Current total capacity of provisioned LUNs for the port (4K blocks) - - With this information, the number of available LUNs and capacity can be - can be calculated. - -HT_CXLFLASH_AFU_DEBUG ---------------------- - This ioctl is used to debug AFUs by supporting a command pass-through - interface. It is only valid when used with AFUs that support the AFU - debug capability. - - With exception of buffer management, AFU debug commands are opaque to - cxlflash and treated as pass-through. For debug commands that do require - data transfer, the user supplies an adequately sized data buffer and must - specify the data transfer direction with respect to the host. There is a - maximum transfer size of 256K imposed. Note that partial read completions - are not supported - when errors are experienced with a host read data - transfer, the data buffer is not copied back to the user.
Documentation/arch/powerpc/index.rst +0 -1
@@ -13,7 +13,6 @@ powerpc cpu_families cpu_features cxl - cxlflash dawr-power9 dexcr dscr
Documentation/userspace-api/ioctl/ioctl-number.rst +1 -1
@@ -371,7 +371,7 @@ Code Seq# Include File Comments 0xC0 00-0F linux/usb/iowarrior.h 0xCA 00-0F uapi/misc/cxl.h 0xCA 10-2F uapi/misc/ocxl.h -0xCA 80-BF uapi/scsi/cxlflash_ioctl.h +0xCA 80-BF uapi/scsi/cxlflash_ioctl.h Dead since 6.14 0xCB 00-1F CBM serial IEC bus in development: <mailto:[email protected]> 0xCC 00-0F drivers/misc/ibmvmc.h pseries VMC driver
MAINTAINERS +0 -9
@@ -6236,15 +6236,6 @@ F: drivers/misc/cxl/ F: include/misc/cxl* F: include/uapi/misc/cxl.h -CXLFLASH (IBM Coherent Accelerator Processor Interface CAPI Flash) SCSI DRIVER -M: Manoj N. Kumar <[email protected]> -M: Uma Krishnan <[email protected]> -L: [email protected] -S: Obsolete -F: Documentation/arch/powerpc/cxlflash.rst -F: drivers/scsi/cxlflash/ -F: include/uapi/scsi/cxlflash_ioctl.h - CYBERPRO FB DRIVER M: Russell King <[email protected]> L: [email protected] (moderated for non-subscribers)
drivers/scsi/Kconfig +0 -1
@@ -336,7 +336,6 @@ source "drivers/scsi/cxgbi/Kconfig" source "drivers/scsi/bnx2i/Kconfig" source "drivers/scsi/bnx2fc/Kconfig" source "drivers/scsi/be2iscsi/Kconfig" -source "drivers/scsi/cxlflash/Kconfig" config SGIWD93_SCSI tristate "SGI WD93C93 SCSI Driver"
drivers/scsi/Makefile +0 -1
@@ -96,7 +96,6 @@ obj-$(CONFIG_SCSI_SYM53C8XX_2) += sym53c8xx_2/ obj-$(CONFIG_SCSI_ZALON) += zalon7xx.o obj-$(CONFIG_SCSI_DC395x) += dc395x.o obj-$(CONFIG_SCSI_AM53C974) += esp_scsi.o am53c974.o -obj-$(CONFIG_CXLFLASH) += cxlflash/ obj-$(CONFIG_MEGARAID_LEGACY) += megaraid.o obj-$(CONFIG_MEGARAID_NEWGEN) += megaraid/ obj-$(CONFIG_MEGARAID_SAS) += megaraid/
drivers/scsi/cxlflash/Kconfig deleted +0 -15
@@ -1,15 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# -# IBM CXL-attached Flash Accelerator SCSI Driver -# - -config CXLFLASH - tristate "Support for IBM CAPI Flash (DEPRECATED)" - depends on PCI && SCSI && (CXL || OCXL) && EEH - select IRQ_POLL - help - The cxlflash driver is deprecated and will be removed in a future - kernel release. - - Allows CAPI Accelerated IO to Flash - If unsure, say N.
drivers/scsi/cxlflash/Makefile deleted +0 -5
@@ -1,5 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -obj-$(CONFIG_CXLFLASH) += cxlflash.o -cxlflash-y += main.o superpipe.o lunmgt.o vlun.o -cxlflash-$(CONFIG_CXL) += cxl_hw.o -cxlflash-$(CONFIG_OCXL) += ocxl_hw.o
drivers/scsi/cxlflash/backend.h deleted +0 -48
48 lines not on this page · raw message
drivers/scsi/cxlflash/common.h deleted +0 -340
340 lines not on this page · raw message
drivers/scsi/cxlflash/cxl_hw.c deleted +0 -177
177 lines not on this page · raw message
drivers/scsi/cxlflash/lunmgt.c deleted +0 -278
278 lines not on this page · raw message
drivers/scsi/cxlflash/main.c deleted +0 -3970
1,660 lines not on this page · raw message
drivers/scsi/cxlflash/main.h deleted +0 -129
129 lines not on this page · raw message
drivers/scsi/cxlflash/ocxl_hw.c deleted +0 -1399
1,399 lines not on this page · raw message
drivers/scsi/cxlflash/ocxl_hw.h deleted +0 -72
72 lines not on this page · raw message
drivers/scsi/cxlflash/sislite.h deleted +0 -560
560 lines not on this page · raw message
drivers/scsi/cxlflash/superpipe.c deleted +0 -2218
2,218 lines not on this page · raw message
drivers/scsi/cxlflash/superpipe.h deleted +0 -150
150 lines not on this page · raw message
drivers/scsi/cxlflash/vlun.c deleted +0 -1336
1,336 lines not on this page · raw message
drivers/scsi/cxlflash/vlun.h deleted +0 -82
82 lines not on this page · raw message
include/uapi/scsi/cxlflash_ioctl.h deleted +0 -276
276 lines not on this page · raw message
tools/testing/selftests/filesystems/statmount/statmount_test.c +6 -7
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.47.1
Part of the diff is not shown here. View the raw message.
Re: [PATCH 1/2] cxlflash: Remove driver
Quoted 9 lines · Andrew Donnellan
Remove the cxlflash driver for IBM CAPI Flash devices.
The cxlflash driver has received minimal maintenance for some time, and the CAPI Flash hardware that uses it is no longer commercially available.
Thanks to Uma Krishnan, Matthew Ochs and Manoj Kumar for their work on this driver over the years.
Signed-off-by Andrew Donnellan <[email protected]>
Fred
PATCH 2/2 cxl: Remove driver
In reply to Andrew DonnellanRemove the cxl driver that provides support for the IBM Coherent Accelerator Processor Interface. Revert or clean up associated code in arch/powerpc that is no longer necessary.
cxl has received minimal maintenance for several years, and is not supported on the Power10 processor. We aren't aware of any users who are likely to be using recent kernels.
Thanks to Mikey Neuling, Ian Munsie, Daniel Axtens, Frederic Barrat, Christophe Lombard, Philippe Bergheaud, Vaibhav Jain and Alastair D'Silva for their work on this driver over the years.
---
.../ABI/{obsolete => removed}/sysfs-class-cxl | 55 +-
Documentation/arch/powerpc/cxl.rst | 469 ----
Documentation/arch/powerpc/index.rst | 1 -
.../userspace-api/ioctl/ioctl-number.rst | 2 +-
MAINTAINERS | 12 -
arch/powerpc/configs/skiroot_defconfig | 1 -
arch/powerpc/include/asm/copro.h | 6 -
arch/powerpc/include/asm/device.h | 3 -
arch/powerpc/include/asm/pnv-pci.h | 17 -
arch/powerpc/mm/book3s64/hash_native.c | 13 +-
arch/powerpc/mm/book3s64/hash_utils.c | 10 +-
arch/powerpc/mm/book3s64/pgtable.c | 1 -
arch/powerpc/mm/book3s64/slice.c | 6 +-
arch/powerpc/mm/copro_fault.c | 12 -
arch/powerpc/platforms/powernv/Makefile | 1 -
arch/powerpc/platforms/powernv/pci-cxl.c | 153 --
arch/powerpc/platforms/powernv/pci-ioda.c | 43 -
arch/powerpc/platforms/powernv/pci.c | 61 -
arch/powerpc/platforms/powernv/pci.h | 2 -
drivers/misc/Kconfig | 1 -
drivers/misc/Makefile | 1 -
drivers/misc/cxl/Kconfig | 28 -
drivers/misc/cxl/Makefile | 14 -
drivers/misc/cxl/api.c | 532 -----
drivers/misc/cxl/base.c | 126 -
drivers/misc/cxl/context.c | 362 ---
drivers/misc/cxl/cxl.h | 1135 ---------
drivers/misc/cxl/cxllib.c | 271 ---
drivers/misc/cxl/debugfs.c | 134 --
drivers/misc/cxl/fault.c | 341 ---
drivers/misc/cxl/file.c | 699 ------
drivers/misc/cxl/flash.c | 538 -----
drivers/misc/cxl/guest.c | 1208 ----------
drivers/misc/cxl/hcalls.c | 643 -----
drivers/misc/cxl/hcalls.h | 200 --
drivers/misc/cxl/irq.c | 450 ----
drivers/misc/cxl/main.c | 383 ---
drivers/misc/cxl/native.c | 1592 -------------
drivers/misc/cxl/of.c | 346 ---
drivers/misc/cxl/pci.c | 2103 -----------------
drivers/misc/cxl/sysfs.c | 771 ------
drivers/misc/cxl/trace.c | 9 -
drivers/misc/cxl/trace.h | 691 ------
drivers/misc/cxl/vphb.c | 309 ---
include/misc/cxl-base.h | 48 -
include/misc/cxl.h | 265 ---
include/misc/cxllib.h | 129 -
include/uapi/misc/cxl.h | 156 --
48 files changed, 42 insertions(+), 14311 deletions(-)
rename Documentation/ABI/{obsolete => removed}/sysfs-class-cxl (87%)
delete mode 100644 Documentation/arch/powerpc/cxl.rst
delete mode 100644 arch/powerpc/platforms/powernv/pci-cxl.c
delete mode 100644 drivers/misc/cxl/Kconfig
delete mode 100644 drivers/misc/cxl/Makefile
delete mode 100644 drivers/misc/cxl/api.c
delete mode 100644 drivers/misc/cxl/base.c
delete mode 100644 drivers/misc/cxl/context.c
delete mode 100644 drivers/misc/cxl/cxl.h
delete mode 100644 drivers/misc/cxl/cxllib.c
delete mode 100644 drivers/misc/cxl/debugfs.c
delete mode 100644 drivers/misc/cxl/fault.c
delete mode 100644 drivers/misc/cxl/file.c
delete mode 100644 drivers/misc/cxl/flash.c
delete mode 100644 drivers/misc/cxl/guest.c
delete mode 100644 drivers/misc/cxl/hcalls.c
delete mode 100644 drivers/misc/cxl/hcalls.h
delete mode 100644 drivers/misc/cxl/irq.c
delete mode 100644 drivers/misc/cxl/main.c
delete mode 100644 drivers/misc/cxl/native.c
delete mode 100644 drivers/misc/cxl/of.c
delete mode 100644 drivers/misc/cxl/pci.c
delete mode 100644 drivers/misc/cxl/sysfs.c
delete mode 100644 drivers/misc/cxl/trace.c
delete mode 100644 drivers/misc/cxl/trace.h
delete mode 100644 drivers/misc/cxl/vphb.c
delete mode 100644 include/misc/cxl-base.h
delete mode 100644 include/misc/cxl.h
delete mode 100644 include/misc/cxllib.h
delete mode 100644 include/uapi/misc/cxl.hDocumentation/ABI/removed/sysfs-class-cxl renamed from Documentation/ABI/obsolete/sysfs-class-cxl +27 -28
@@ -1,5 +1,4 @@ -The cxl driver is no longer maintained, and will be removed from the kernel in -the near future. +The cxl driver was removed in 6.13. Please note that attributes that are shared between devices are stored in the directory pointed to by the symlink device/.
@@ -10,7 +9,7 @@ For example, the real path of the attribute /sys/class/cxl/afu0.0s/irqs_max is Slave contexts (eg. /sys/class/cxl/afu0.0s): What: /sys/class/cxl/<afu>/afu_err_buf -Date: September 2014 +Date: September 2014, removed December 2024 Contact: [email protected] Description: read only AFU Error Buffer contents. The contents of this file are
@@ -21,7 +20,7 @@ Description: read only What: /sys/class/cxl/<afu>/irqs_max -Date: September 2014 +Date: September 2014, removed December 2024 Contact: [email protected] Description: read/write Decimal value of maximum number of interrupts that can be
@@ -32,7 +31,7 @@ Description: read/write Users: https://github.com/ibm-capi/libcxl What: /sys/class/cxl/<afu>/irqs_min -Date: September 2014 +Date: September 2014, removed December 2024 Contact: [email protected] Description: read only Decimal value of the minimum number of interrupts that
@@ -42,7 +41,7 @@ Description: read only Users: https://github.com/ibm-capi/libcxl What: /sys/class/cxl/<afu>/mmio_size -Date: September 2014 +Date: September 2014, removed December 2024 Contact: [email protected] Description: read only Decimal value of the size of the MMIO space that may be mmapped
@@ -50,7 +49,7 @@ Description: read only Users: https://github.com/ibm-capi/libcxl What: /sys/class/cxl/<afu>/modes_supported -Date: September 2014 +Date: September 2014, removed December 2024 Contact: [email protected] Description: read only List of the modes this AFU supports. One per line.
@@ -58,7 +57,7 @@ Description: read only Users: https://github.com/ibm-capi/libcxl What: /sys/class/cxl/<afu>/mode -Date: September 2014 +Date: September 2014, removed December 2024 Contact: [email protected] Description: read/write The current mode the AFU is using. Will be one of the modes
@@ -68,7 +67,7 @@ Users: https://github.com/ibm-capi/libcxl What: /sys/class/cxl/<afu>/prefault_mode -Date: September 2014 +Date: September 2014, removed December 2024 Contact: [email protected] Description: read/write Set the mode for prefaulting in segments into the segment table
@@ -88,7 +87,7 @@ Description: read/write Users: https://github.com/ibm-capi/libcxl What: /sys/class/cxl/<afu>/reset -Date: September 2014 +Date: September 2014, removed December 2024 Contact: [email protected] Description: write only Writing 1 here will reset the AFU provided there are not
@@ -96,14 +95,14 @@ Description: write only Users: https://github.com/ibm-capi/libcxl What: /sys/class/cxl/<afu>/api_version -Date: September 2014 +Date: September 2014, removed December 2024 Contact: [email protected] Description: read only Decimal value of the current version of the kernel/user API. Users: https://github.com/ibm-capi/libcxl What: /sys/class/cxl/<afu>/api_version_compatible -Date: September 2014 +Date: September 2014, removed December 2024 Contact: [email protected] Description: read only Decimal value of the lowest version of the userspace API
@@ -117,7 +116,7 @@ An AFU may optionally export one or more PCIe like configuration records, known as AFU configuration records, which will show up here (if present). What: /sys/class/cxl/<afu>/cr<config num>/vendor -Date: February 2015 +Date: February 2015, removed December 2024 Contact: [email protected] Description: read only Hexadecimal value of the vendor ID found in this AFU
@@ -125,7 +124,7 @@ Description: read only Users: https://github.com/ibm-capi/libcxl What: /sys/class/cxl/<afu>/cr<config num>/device -Date: February 2015 +Date: February 2015, removed December 2024 Contact: [email protected] Description: read only Hexadecimal value of the device ID found in this AFU
@@ -133,7 +132,7 @@ Description: read only Users: https://github.com/ibm-capi/libcxl What: /sys/class/cxl/<afu>/cr<config num>/class -Date: February 2015 +Date: February 2015, removed December 2024 Contact: [email protected] Description: read only Hexadecimal value of the class code found in this AFU
@@ -141,7 +140,7 @@ Description: read only Users: https://github.com/ibm-capi/libcxl What: /sys/class/cxl/<afu>/cr<config num>/config -Date: February 2015 +Date: February 2015, removed December 2024 Contact: [email protected] Description: read only This binary file provides raw access to the AFU configuration
@@ -155,7 +154,7 @@ Users: https://github.com/ibm-capi/libcxl Master contexts (eg. /sys/class/cxl/afu0.0m) What: /sys/class/cxl/<afu>m/mmio_size -Date: September 2014 +Date: September 2014, removed December 2024 Contact: [email protected] Description: read only Decimal value of the size of the MMIO space that may be mmapped
@@ -163,14 +162,14 @@ Description: read only Users: https://github.com/ibm-capi/libcxl What: /sys/class/cxl/<afu>m/pp_mmio_len -Date: September 2014 +Date: September 2014, removed December 2024 Contact: [email protected] Description: read only Decimal value of the Per Process MMIO space length. Users: https://github.com/ibm-capi/libcxl What: /sys/class/cxl/<afu>m/pp_mmio_off -Date: September 2014 +Date: September 2014, removed December 2024 Contact: [email protected] Description: read only (not in a guest)
@@ -181,21 +180,21 @@ Users: https://github.com/ibm-capi/libcxl Card info (eg. /sys/class/cxl/card0) What: /sys/class/cxl/<card>/caia_version -Date: September 2014 +Date: September 2014, removed December 2024 Contact: [email protected] Description: read only Identifies the CAIA Version the card implements. Users: https://github.com/ibm-capi/libcxl What: /sys/class/cxl/<card>/psl_revision -Date: September 2014 +Date: September 2014, removed December 2024 Contact: [email protected] Description: read only Identifies the revision level of the PSL. Users: https://github.com/ibm-capi/libcxl What: /sys/class/cxl/<card>/base_image -Date: September 2014 +Date: September 2014, removed December 2024 Contact: [email protected] Description: read only (not in a guest)
@@ -206,7 +205,7 @@ Description: read only Users: https://github.com/ibm-capi/libcxl What: /sys/class/cxl/<card>/image_loaded -Date: September 2014 +Date: September 2014, removed December 2024 Contact: [email protected] Description: read only (not in a guest)
@@ -215,7 +214,7 @@ Description: read only Users: https://github.com/ibm-capi/libcxl What: /sys/class/cxl/<card>/load_image_on_perst -Date: December 2014 +Date: December 2014, removed December 2024 Contact: [email protected] Description: read/write (not in a guest)
@@ -232,7 +231,7 @@ Description: read/write Users: https://github.com/ibm-capi/libcxl What: /sys/class/cxl/<card>/reset -Date: October 2014 +Date: October 2014, removed December 2024 Contact: [email protected] Description: write only Writing 1 will issue a PERST to card provided there are no
@@ -243,7 +242,7 @@ Description: write only Users: https://github.com/ibm-capi/libcxl What: /sys/class/cxl/<card>/perst_reloads_same_image -Date: July 2015 +Date: July 2015, removed December 2024 Contact: [email protected] Description: read/write (not in a guest)
@@ -257,7 +256,7 @@ Description: read/write Users: https://github.com/ibm-capi/libcxl What: /sys/class/cxl/<card>/psl_timebase_synced -Date: March 2016 +Date: March 2016, removed December 2024 Contact: [email protected] Description: read only Returns 1 if the psl timebase register is synchronized
@@ -265,7 +264,7 @@ Description: read only Users: https://github.com/ibm-capi/libcxl What: /sys/class/cxl/<card>/tunneled_ops_supported -Date: May 2018 +Date: May 2018, removed December 2024 Contact: [email protected] Description: read only Returns 1 if tunneled operations are supported in capi mode,
Documentation/arch/powerpc/cxl.rst deleted +0 -469
469 lines not on this page · raw message
Documentation/arch/powerpc/index.rst +0 -1
@@ -12,7 +12,6 @@ powerpc bootwrapper cpu_families cpu_features - cxl dawr-power9 dexcr dscr
Documentation/userspace-api/ioctl/ioctl-number.rst +1 -1
@@ -369,7 +369,7 @@ Code Seq# Include File Comments 0xB7 all uapi/linux/nsfs.h <mailto:Andrei Vagin <[email protected]>> 0xB8 01-02 uapi/misc/mrvl_cn10k_dpi.h Marvell CN10K DPI driver 0xC0 00-0F linux/usb/iowarrior.h -0xCA 00-0F uapi/misc/cxl.h +0xCA 00-0F uapi/misc/cxl.h Dead since 6.14 0xCA 10-2F uapi/misc/ocxl.h 0xCA 80-BF uapi/scsi/cxlflash_ioctl.h Dead since 6.14 0xCB 00-1F CBM serial IEC bus in development:
MAINTAINERS +0 -12
@@ -6224,18 +6224,6 @@ S: Supported W: http://www.chelsio.com F: drivers/net/ethernet/chelsio/cxgb4vf/ -CXL (IBM Coherent Accelerator Processor Interface CAPI) DRIVER -M: Frederic Barrat <[email protected]> -M: Andrew Donnellan <[email protected]> -L: [email protected] -S: Obsolete -F: Documentation/ABI/obsolete/sysfs-class-cxl -F: Documentation/arch/powerpc/cxl.rst -F: arch/powerpc/platforms/powernv/pci-cxl.c -F: drivers/misc/cxl/ -F: include/misc/cxl* -F: include/uapi/misc/cxl.h - CYBERPRO FB DRIVER M: Russell King <[email protected]> L: [email protected] (moderated for non-subscribers)
arch/powerpc/configs/skiroot_defconfig +0 -1
@@ -78,7 +78,6 @@ CONFIG_VIRTIO_BLK=m CONFIG_BLK_DEV_NVME=m CONFIG_NVME_MULTIPATH=y CONFIG_EEPROM_AT24=m -# CONFIG_CXL is not set # CONFIG_OCXL is not set CONFIG_BLK_DEV_SD=m CONFIG_BLK_DEV_SR=m
arch/powerpc/include/asm/copro.h +0 -6
@@ -18,10 +18,4 @@ int copro_handle_mm_fault(struct mm_struct *mm, unsigned long ea,int copro_calculate_slb (struct mm_struct *mm,u64 ea,struct copro_slb *slb); - -#ifdef CONFIG_PPC_COPRO_BASE -void copro_flush_all_slbs (struct mm_struct *mm); -#else -static inline void copro_flush_all_slbs (struct mm_struct *mm) {} -#endif #endif /* _ASM_POWERPC_COPRO_H */
arch/powerpc/include/asm/device.h +0 -3
@@ -38,9 +38,6 @@ struct dev_archdata {#ifdef CONFIG_FAIL_IOMMU int fail_iommu;#endif -#ifdef CONFIG_CXL_BASE -struct cxl_context *cxl_ctx; -#endif #ifdef CONFIG_PCI_IOV void *iov_data;#endif
arch/powerpc/include/asm/pnv-pci.h +0 -17
@@ -10,7 +10,6 @@#include <linux/pci_hotplug.h> #include <linux/irq.h> #include <linux/of.h> -#include <misc/cxl-base.h> #include <asm/opal-api.h> #define PCI_SLOT_ID_PREFIX (1UL << 63)
@@ -25,25 +24,9 @@ extern int pnv_pci_get_power_state(uint64_t id, uint8_t *state);extern int pnv_pci_set_power_state (uint64_t id,uint8_t state,struct opal_msg *msg); -extern int pnv_pci_set_tunnel_bar (struct pci_dev *dev,uint64_t addr, -int enable); -int pnv_phb_to_cxl_mode (struct pci_dev *dev,uint64_t mode); -int pnv_cxl_ioda_msi_setup (struct pci_dev *dev,unsigned int hwirq, -unsigned int virq); -int pnv_cxl_alloc_hwirqs (struct pci_dev *dev,int num); -void pnv_cxl_release_hwirqs (struct pci_dev *dev,int hwirq,int num); -int pnv_cxl_get_irq_count (struct pci_dev *dev); -struct device_node *pnv_pci_get_phb_node (struct pci_dev *dev);int64_t pnv_opal_pci_msi_eoi (struct irq_data *d);bool is_pnv_opal_msi (struct irq_chip *chip); -#ifdef CONFIG_CXL_BASE -int pnv_cxl_alloc_hwirq_ranges (struct cxl_irq_ranges *irqs, -struct pci_dev *dev,int num); -void pnv_cxl_release_hwirq_ranges (struct cxl_irq_ranges *irqs, -struct pci_dev *dev); -#endif -struct pnv_php_slot {struct hotplug_slot slot;uint64_t id;
arch/powerpc/mm/book3s64/hash_native.c +3 -10
@@ -27,8 +27,6 @@#include <asm/ppc-opcode.h> #include <asm/feature-fixups.h> -#include <misc/cxl-base.h> -#ifdef DEBUG_LOW #define DBG_LOW(fmt...) udbg_printf(fmt)#else
@@ -217,11 +215,9 @@ static inline void __tlbiel(unsigned long vpn, int psize, int apsize, int ssize)static inline void tlbie (unsigned long vpn,int psize,int apsize,int ssize,int local) { -unsigned int use_local; +unsigned int use_local = local &&mmu_has_feature (MMU_FTR_TLBIEL );int lock_tlbie = !mmu_has_feature (MMU_FTR_LOCKLESS_TLBIE ); - use_local = local &&mmu_has_feature (MMU_FTR_TLBIEL ) && !cxl_ctx_in_use (); -if (use_local) use_local = mmu_psize_defs[psize].tlbiel;if (lock_tlbie && !use_local)
@@ -789,10 +785,6 @@ static void native_flush_hash_range(unsigned long number, int local)unsigned long psize = batch->psize;int ssize = batch->ssize;int i; -unsigned int use_local; - - use_local = local &&mmu_has_feature (MMU_FTR_TLBIEL ) && - mmu_psize_defs[psize].tlbiel && !cxl_ctx_in_use ();local_irq_save (flags);
@@ -827,7 +819,8 @@ static void native_flush_hash_range(unsigned long number, int local) }pte_iterate_hashed_end (); } -if (use_local) { +if (mmu_has_feature (MMU_FTR_TLBIEL ) && + mmu_psize_defs[psize].tlbiel && local) { asmvolatile ("ptesync" :::"memory" );for (i =0 ; i < number; i++) { vpn = batch->vpn[i];
arch/powerpc/mm/book3s64/hash_utils.c +7 -3
@@ -56,7 +56,7 @@#include <asm/cacheflush.h> #include <asm/cputable.h> #include <asm/sections.h> -#include <asm/copro.h> +#include <asm/spu.h> #include <asm/udbg.h> #include <asm/text-patching.h> #include <asm/fadump.h>
@@ -1612,7 +1612,9 @@ void demote_segment_4k(struct mm_struct *mm, unsigned long addr)if (get_slice_psize (mm, addr) ==MMU_PAGE_4K )return ;slice_set_range_psize (mm, addr,1 ,MMU_PAGE_4K ); -copro_flush_all_slbs (mm); +#ifdef CONFIG_SPU_BASE +spu_flush_all_slbs (mm); +#endif if ((get_paca_psize (addr) !=MMU_PAGE_4K ) && (current->mm == mm)) {copy_mm_to_paca (mm);
@@ -1881,7 +1883,9 @@ int hash_page_mm(struct mm_struct *mm, unsigned long ea,"to 4kB pages because of " "non-cacheable mapping\n"); psize = mmu_vmalloc_psize =MMU_PAGE_4K ; -copro_flush_all_slbs (mm); +#ifdef CONFIG_SPU_BASE +spu_flush_all_slbs (mm); +#endif } }
arch/powerpc/mm/book3s64/pgtable.c +0 -1
@@ -10,7 +10,6 @@#include <linux/pkeys.h> #include <linux/debugfs.h> #include <linux/proc_fs.h> -#include <misc/cxl-base.h> #include <asm/pgalloc.h> #include <asm/tlb.h>
arch/powerpc/mm/book3s64/slice.c +4 -2
@@ -22,7 +22,7 @@#include <linux/security.h> #include <asm/mman.h> #include <asm/mmu.h> -#include <asm/copro.h> +#include <asm/spu.h> #include <asm/hugetlb.h> #include <asm/mmu_context.h>
@@ -248,7 +248,9 @@ static void slice_convert(struct mm_struct *mm,spin_unlock_irqrestore (&slice_convert_lock, flags); -copro_flush_all_slbs (mm); +#ifdef CONFIG_SPU_BASE +spu_flush_all_slbs (mm); +#endif }/*
arch/powerpc/mm/copro_fault.c +0 -12
@@ -12,8 +12,6 @@#include <linux/export.h> #include <asm/reg.h> #include <asm/copro.h> -#include <asm/spu.h> -#include <misc/cxl-base.h> /* * This ought to be kept in sync with the powerpc specific do_page_fault
@@ -135,13 +133,3 @@ int copro_calculate_slb(struct mm_struct *mm, u64 ea, struct copro_slb *slb)return 0 ; }EXPORT_SYMBOL_GPL (copro_calculate_slb); - -void copro_flush_all_slbs (struct mm_struct *mm) -{ -#ifdef CONFIG_SPU_BASE -spu_flush_all_slbs (mm); -#endif -cxl_slbia (mm); -} -EXPORT_SYMBOL_GPL (copro_flush_all_slbs); -#endif
arch/powerpc/platforms/powernv/Makefile +0 -1
@@ -21,7 +21,6 @@ obj-$(CONFIG_PRESERVE_FA_DUMP) += opal-fadump.o obj-$(CONFIG_OPAL_CORE) += opal-core.o obj-$(CONFIG_PCI) += pci.o pci-ioda.o pci-ioda-tce.o obj-$(CONFIG_PCI_IOV) += pci-sriov.o -obj-$(CONFIG_CXL_BASE) += pci-cxl.o obj-$(CONFIG_EEH) += eeh-powernv.o obj-$(CONFIG_MEMORY_FAILURE) += opal-memory-errors.o obj-$(CONFIG_OPAL_PRD) += opal-prd.o
arch/powerpc/platforms/powernv/pci-cxl.c deleted +0 -153
153 lines not on this page · raw message
arch/powerpc/platforms/powernv/pci-ioda.c +0 -43
55 lines not on this page · raw message
arch/powerpc/platforms/powernv/pci.c +0 -61
79 lines not on this page · raw message
arch/powerpc/platforms/powernv/pci.h +0 -2
@@ -163,7 +163,6 @@ struct pnv_phb {unsigned int *io_segmap;/* IRQ chip */ -int irq_chip_init;struct irq_chip irq_chip;/* Sorted list of used PE's based
@@ -281,7 +280,6 @@ extern int pnv_eeh_phb_reset(struct pci_controller *hose, int option);extern struct pnv_ioda_pe *pnv_pci_bdfn_to_pe (struct pnv_phb *phb,u16 bdfn);extern struct pnv_ioda_pe *pnv_ioda_get_pe (struct pci_dev *dev); -extern void pnv_set_msi_irq_chip (struct pnv_phb *phb,unsigned int virq);extern unsigned long pnv_pci_ioda2_get_table_size (__u32 page_shift,__u64 window_size,__u32 levels);extern int pnv_eeh_post_init (void );
drivers/misc/Kconfig +0 -1
@@ -643,7 +643,6 @@ source "drivers/misc/mei/Kconfig" source "drivers/misc/vmw_vmci/Kconfig" source "drivers/misc/genwqe/Kconfig" source "drivers/misc/echo/Kconfig" -source "drivers/misc/cxl/Kconfig" source "drivers/misc/ocxl/Kconfig" source "drivers/misc/bcm-vk/Kconfig" source "drivers/misc/cardreader/Kconfig"
drivers/misc/Makefile +0 -1
@@ -49,7 +49,6 @@ obj-$(CONFIG_SRAM) += sram.o obj-$(CONFIG_SRAM_EXEC) += sram-exec.o obj-$(CONFIG_GENWQE) += genwqe/ obj-$(CONFIG_ECHO) += echo/ -obj-$(CONFIG_CXL_BASE) += cxl/ obj-$(CONFIG_DW_XDATA_PCIE) += dw-xdata-pcie.o obj-$(CONFIG_PCI_ENDPOINT_TEST) += pci_endpoint_test.o obj-$(CONFIG_OCXL) += ocxl/
drivers/misc/cxl/Kconfig deleted +0 -28
@@ -1,28 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# -# IBM Coherent Accelerator (CXL) compatible devices -# - -config CXL_BASE - bool - select PPC_COPRO_BASE - select PPC_64S_HASH_MMU - -config CXL - tristate "Support for IBM Coherent Accelerators (CXL) (DEPRECATED)" - depends on PPC_POWERNV && PCI_MSI && EEH - select CXL_BASE - help - The cxl driver is deprecated and will be removed in a future - kernel release. - - Select this option to enable driver support for IBM Coherent - Accelerators (CXL). CXL is otherwise known as Coherent Accelerator - Processor Interface (CAPI). CAPI allows accelerators in FPGAs to be - coherently attached to a CPU via an MMU. This driver enables - userspace programs to access these accelerators via /dev/cxl/afuM.N - devices. - - CAPI adapters are found in POWER8 based systems. - - If unsure, say N.
drivers/misc/cxl/Makefile deleted +0 -14
@@ -1,14 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -ccflags-y := $(call cc-disable-warning, unused-const-variable) -ccflags-$(CONFIG_PPC_WERROR) += -Werror - -cxl-y += main.o file.o irq.o fault.o native.o -cxl-y += context.o sysfs.o pci.o trace.o -cxl-y += vphb.o api.o cxllib.o -cxl-$(CONFIG_PPC_PSERIES) += flash.o guest.o of.o hcalls.o -cxl-$(CONFIG_DEBUG_FS) += debugfs.o -obj-$(CONFIG_CXL) += cxl.o -obj-$(CONFIG_CXL_BASE) += base.o - -# For tracepoints to include our trace.h from tracepoint infrastructure: -CFLAGS_trace.o := -I$(src)
drivers/misc/cxl/api.c deleted +0 -532
532 lines not on this page · raw message
drivers/misc/cxl/base.c deleted +0 -126
126 lines not on this page · raw message
drivers/misc/cxl/context.c deleted +0 -362
362 lines not on this page · raw message
drivers/misc/cxl/cxl.h deleted +0 -1135
729 lines not on this page · raw message
drivers/misc/cxl/cxllib.c deleted +0 -271
271 lines not on this page · raw message
drivers/misc/cxl/debugfs.c deleted +0 -134
134 lines not on this page · raw message
drivers/misc/cxl/fault.c deleted +0 -341
341 lines not on this page · raw message
drivers/misc/cxl/file.c deleted +0 -699
699 lines not on this page · raw message
drivers/misc/cxl/flash.c deleted +0 -538
538 lines not on this page · raw message
drivers/misc/cxl/guest.c deleted +0 -1208
1,208 lines not on this page · raw message
drivers/misc/cxl/hcalls.c deleted +0 -643
643 lines not on this page · raw message
drivers/misc/cxl/hcalls.h deleted +0 -200
200 lines not on this page · raw message
drivers/misc/cxl/irq.c deleted +0 -450
450 lines not on this page · raw message
drivers/misc/cxl/main.c deleted +0 -383
383 lines not on this page · raw message
drivers/misc/cxl/native.c deleted +0 -1592
1,592 lines not on this page · raw message
drivers/misc/cxl/of.c deleted +0 -346
346 lines not on this page · raw message
drivers/misc/cxl/pci.c deleted +0 -2103
2,103 lines not on this page · raw message
drivers/misc/cxl/sysfs.c deleted +0 -771
771 lines not on this page · raw message
drivers/misc/cxl/trace.h deleted +0 -691
691 lines not on this page · raw message
drivers/misc/cxl/vphb.c deleted +0 -309
309 lines not on this page · raw message
include/misc/cxl-base.h deleted +0 -48
48 lines not on this page · raw message
include/misc/cxl.h deleted +0 -265
265 lines not on this page · raw message
include/misc/cxllib.h deleted +0 -129
129 lines not on this page · raw message
include/uapi/misc/cxl.h deleted +0 -156
156 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.47.1
Part of the diff is not shown here. View the raw message.
Re: [PATCH 2/2] cxl: Remove driver
Quoted 8 lines · Andrew Donnellan
Remove the cxl driver that provides support for the IBM Coherent Accelerator Processor Interface. Revert or clean up associated code in
arch/powerpcthat is no longer necessary.cxl has received minimal maintenance for several years, and is not supported on the Power10 processor. We aren't aware of any users who are likely to be using recent kernels.
Quoted 5 lines
Thanks to Mikey Neuling, Ian Munsie, Daniel Axtens, Frederic Barrat, Christophe Lombard, Philippe Bergheaud, Vaibhav Jain and Alastair D'Silva for their work on this driver over the years.
Signed-off-by Andrew Donnellan <[email protected]>
With the understanding that it would be merged (at least) one release cycle after https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=436003&state=* :
And many thanks for doing it!
Fred
Quoted 10 lines · Andrew Donnellan
This series removes the cxl and cxlflash drivers for IBM CAPI devices.
CAPI devices have been out of production for some time, and we're not aware of any remaining users who are likely to want a modern kernel. There's almost certainly some remaining driver bugs and we don't have much hardware available to properly test the drivers any more. Removing these drivers will also mean we can get rid of a non-trivial amount of support code in
arch/powerpc.Thanks to everyone who's worked on these drivers over the last decade.
It would be good to explain that this only removes support for the original CAPI interface - not the Power9 "OpenCAPI", which is still supported by drivers/misc/ocxl.
cheers
Quoted 3 lines · Michael Ellerman
It would be good to explain that this only removes support for the original CAPI interface - not the Power9 "OpenCAPI", which is still supported by
drivers/misc/ocxl.
Agreed, will mention if/when I respin this
Signature · 2 lines
Andrew Donnellan OzLabs, ADL Canberra [email protected] IBM Australia Limited