Rework register enumeration for later reuse
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 6 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | cxl/pci: Ignore unknown register block typesdrivers/ | +12 | 1 reply | |
| 2/3 | cxl/pci: Simplify register setupdrivers/ drivers/ drivers/ | +13 | 1 reply | |
| 3/3 | cxl/pci: Retain map information in cxl_mem_probedrivers/ | +6 | 4 replies |
Reviews trailers per patch
2 of 3 patches have a Reviewed-by or Acked-by.
| Patch | Jonathan Cameron |
|---|---|
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] Rework register enumeration for later reuse
In order to plug a cxl_memdev into cxl_core for the purpose of enumerating HDM decoders, the physical address of the component registers must be known and retained at the time of cxl_memdev creation. The cxl_mem driver already enumerates and maps these registers. The main goal of the series is to be able to reuse that logic for the upcoming cxl_memdev driver.
This patch series is based upon the core-reorg patches I submitted yesterday, but it could be merged independently. With core-reorg [1] series, and the expand-decoders [2] patch, everything is in place to implement the region and memdev drivers.
A few other options were discussed/pursued:
1. Passing around the mapped addresses instead of physical. This caused more churn in the existing code. It also causes a somewhat undesirable combination of having one entity "own" the mapping and another one using it.
2. Don't map component registers in cxl_pci, and instead map it when needed in the port driver. I actually believe this would have been the right thing to do except certain register sets (like IDE) may be needed by the cxl_pci driver anyway.
3. Export functionality to obtain component register mapping in cxl_core and let the cxl_pci driver and memdev driver use that. This solution might be the eventual solution, but it's not yet necessary.
3b. Copy the enumeration code from pci.c into the new memdev driver.
4. Obtaining the register mapping from cxl_mem at driver probe since the cxl_memdev and cxl_mem are connected. Like #1, this mixes "ownership" of the mapping.
[1]: https://lore.kernel.org/linux-cxl/[email protected]/
[2]: https://lore.kernel.org/linux-cxl/[email protected]/
Ben Widawsky (3):
cxl/pci: Ignore unknown register block types cxl/pci: Simplify register setup cxl/pci: Retain map information in cxl_mem_probe
drivers/cxl/cxl.h | 1 - drivers/cxl/pci.c | 50 ++++++++++++++++++++--------------------------- drivers/cxl/pci.h | 1 + 3 files changed, 22 insertions(+), 30 deletions(-)
Signature · 1 line
2.32.0