RFC Initial CXL.cache device support
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 RFC Latest17 patches 16 repliesIn review
- v1 RFC18 patches 59 repliesSuperseded
Changes in v2 from the cover letter
- Reworked cache id patches
- Reordered several patches for flow
- Add/delete cxl_cachedev in cxl/core/cachedev.c (Jonathan)
- Add doc for struct cxl_cachedev (Jonathan)
- Updated switch port and endpoint port set up to mesh with new delayed dport set up
- Added comment about why cxl_cache probe is synchronous (Jonathan)
- Bug fixes, cleanups, and renames in snoop filter patch (Jonathan & Dave)
- Removed serial attribute from cxl_cachedev (Jonathan)
- Added NULLs and removed commas from attribute groups (Jonathan)
- Bug fixes for cache management attributes (Dave)
- Added documentation for new cachedev attributes under Documentation/ABI (Dave)
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/17 | cxl/port: Arrange for always synchronous endpoint attachdrivers/ drivers/ drivers/ | +57 | 1 reply | |
| 2/17 | cxl: Move struct cxl_dev_state definitiondrivers/ drivers/ | +110 | 0 replies | |
| 3/17 | cxl/core: Add function for getting CXL cache infodrivers/ drivers/ drivers/ +1 more | +77 | 2 replies | |
| 4/17 | cxl/core: Add CXL.cache device structdrivers/ drivers/ drivers/ +3 more | +131 | 1 reply | |
| 5/17 | cxl/cache: Add cxl_cache driverdrivers/ drivers/ drivers/ +1 more | +98 | 2 replies | |
| 6/17 | cxl: Replace cxl_mem_find_port() with cxl_dev_find_port()drivers/ drivers/ drivers/ +1 more | +9 | 2 replies | |
| 7/17 | cxl: Change cxl_ep_load() to use struct device * parameterdrivers/ drivers/ drivers/ +1 more | +18 | 0 replies | |
| 8/17 | cxl/core: Update devm_cxl_enumerate_ports()drivers/ drivers/ drivers/ +2 more | +94 | 0 replies | |
| 9/17 | cxl/port: Split endpoint port probe on device typedrivers/ | +18 | 0 replies | |
| 10/17 | cxl/cache, mem: Prevent RAS register mapping racedrivers/ drivers/ | +14 | 2 replies | |
| 11/17 | cxl/core, port: Update devm_cxl_add_endpoint()drivers/ drivers/ drivers/ +3 more | +51 | 0 replies | |
| 12/17 | cxl/core: Add CXL snoop filter setup and allocationdrivers/ drivers/ drivers/ +1 more | +234 | 2 replies | |
| 13/17 | cxl/core: Add cache id verificationdrivers/ drivers/ drivers/ +4 more | +344 | 2 replies | |
| 14/17 | cxl/port: Add cache id programmingdrivers/ drivers/ drivers/ | +310 | 0 replies | |
| 15/17 | cxl/port: Bypass cache id for singleton cache devicesdrivers/ drivers/ | +33 | 0 replies | |
| 16/17 | cxl/core: Add cache device attributesdrivers/ | +85 | 2 replies | |
| 17/17 | cxl/core: Add cache device cache management attributesDocumentation/ drivers/ drivers/ +2 more | +224 | 0 replies |
Reviews trailers per patch
2 of 17 patches have a Reviewed-by or Acked-by.
| Patch | Jonathan Cameron |
|---|---|
| 1/17 | |
| 2/17 | |
| 3/17 | |
| 4/17 | R-b |
| 5/17 | |
| 6/17 | R-b |
| 7/17 | |
| 8/17 | |
| 9/17 | |
| 10/17 | |
| 11/17 | |
| 12/17 | |
| 13/17 | |
| 14/17 | |
| 15/17 | |
| 16/17 | |
| 17/17 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC v2 PATCH 00/17] Initial CXL.cache device support
v2 Change log:
- Reworked cache id patches
- Reordered several patches for flow
- Add/delete cxl_cachedev in cxl/core/cachedev.c (Jonathan)
- Add doc for struct cxl_cachedev (Jonathan)
- Updated switch port and endpoint port set up to mesh with new delayed dport set up
- Added comment about why cxl_cache probe is synchronous (Jonathan)
- Bug fixes, cleanups, and renames in snoop filter patch (Jonathan & Dave)
- Removed serial attribute from cxl_cachedev (Jonathan)
- Added NULLs and removed commas from attribute groups (Jonathan)
- Bug fixes for cache management attributes (Dave)
- Added documentation for new cachedev attributes under Documentation/ABI (Dave)
This patch series adds initial CXL.cache support. What I have here only allows for adding a cache device to the system, programming/validating the system configuration with respect to cache devices, and some basic cache reporting/management.
The general philosophy is to have an endpoint/vendor-specific driver that runs through the same steps of adding a cxl_memdev, but for the cache portion of the device (both type 1 & 2). Getting cache support for a CXL device should be as simple as: get cache information, set up the memory region (see below), and then calling devm_cxl_add_cachedev().
There's a couple of things missing from this set:
1) Missing an endpoint driver
2) RAS Support
3) Mapping/Reserving host memory used for CXL cache(s)
I'm thinking the way it will work is the endpoint driver requests a DMA region for the cache, but I haven't looked into it. Any thoughts/ideas are appreciated!
*Important Note*: The first patch is only there for context. It's required for the set to work, but it should be picked up as part of Smita's soft reserved set.
Ben Cheatham (16):
cxl: Move struct cxl_dev_state definition cxl/core: Add function for getting CXL cache info cxl/core: Add CXL.cache device struct
cxl/cache: Add cxl_cache driver
cxl: Replace cxl_mem_find_port() with cxl_dev_find_port()
cxl: Change cxl_ep_load() to use struct device * parameter cxl/core: Update devm_cxl_enumerate_ports() cxl/port: Split endpoint port probe on device type cxl/cache, mem: Prevent RAS register mapping race cxl/core, port: Update devm_cxl_add_endpoint() cxl/core: Add CXL snoop filter setup and allocation cxl/core: Add cache id verification
cxl/port: Add cache id programming
cxl/port: Bypass cache id for singleton cache devices cxl/core: Add cache device attributes
cxl/core: Add cache device cache management attributes
Dan Williams (1):
cxl/port: Arrange for always synchronous endpoint attach
Documentation/ABI/testing/sysfs-bus-cxl | 31 + drivers/cxl/Kconfig | 14 + drivers/cxl/Makefile | 2 + drivers/cxl/cache.c | 152 +++++ drivers/cxl/core/Makefile | 1 + drivers/cxl/core/cachedev.c | 289 ++++++++ drivers/cxl/core/pci.c | 140 ++++ drivers/cxl/core/port.c | 842 ++++++++++++++++++++++-- drivers/cxl/core/region.c | 25 +- drivers/cxl/core/regs.c | 27 + drivers/cxl/cxl.h | 204 +++++- drivers/cxl/cxlcache.h | 48 ++ drivers/cxl/cxlmem.h | 113 +--- drivers/cxl/cxlpci.h | 10 + drivers/cxl/mem.c | 55 +- drivers/cxl/pci.c | 2 +- drivers/cxl/port.c | 129 +++- drivers/cxl/private.h | 19 + 18 files changed, 1877 insertions(+), 226 deletions(-) create mode 100644 drivers/cxl/cache.c create mode 100644 drivers/cxl/core/cachedev.c create mode 100644 drivers/cxl/cxlcache.h create mode 100644 drivers/cxl/private.h
Signature · 1 line
2.51.1