mbox series

[v3,0/3] Add sanity check for interleave setup

Message ID 166058698949.1520730.1888371264289688061.stgit@djiang5-desk4.jf.intel.com
Headers show
Series Add sanity check for interleave setup | expand

Message

Dave Jiang Aug. 15, 2022, 6:11 p.m. UTC
The small series adds sanity check for the combination of interleave ways
and interleave granularity during region and port configuration. The
calculation references CXL spec 3.0 8.2.4.19.13 implementation note #3. The
checks also added HDM CAP retrieval for the support of new interleave ways
where 3, 6, and 12 ways support as well as 16 ways support.

v3:
- Move cxl_interleave_capable() to core/region.c. (Dan)
- Open code verify of interleave ways against cap mask. (Dan)

v2:
- Change cxl_interleave_verify() to cxl_interleave_capable(). (Dan)
- Move error output inside verify function. (Dan)
- Remove unneeded enums. (Dan)
- Use is_power_of_2() to detect encoded interleave ways. (Dan)
- Change iw to eiw and ig to eig for encoded values. (Alison)
- Change interleave capabilities to mask for easier comparison. (Dan)
- Change valid_interleave() to valid_interleave_ways()
- Add setting fo interleave_cap to cxl_test. (Dan)

---

Dave Jiang (3):
      cxl: Add check for result of interleave ways plus granularity combo
      cxl: Add CXL spec v3.0 interleave support
      tools/testing/cxl: Add interleave check support to mock cxl port device


 drivers/cxl/core/hdm.c       |  6 +++++
 drivers/cxl/core/region.c    | 50 +++++++++++++++++++++++++++++++++++-
 drivers/cxl/cxl.h            |  2 ++
 drivers/cxl/cxlmem.h         |  5 ++++
 tools/testing/cxl/test/cxl.c |  3 +++
 5 files changed, 65 insertions(+), 1 deletion(-)

--