]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cxl/acpi: Make the XOR calculations available for testing
authorAlison Schofield <alison.schofield@intel.com>
Tue, 14 Oct 2025 08:24:31 +0000 (01:24 -0700)
committerDave Jiang <dave.jiang@intel.com>
Mon, 3 Nov 2025 16:27:32 +0000 (09:27 -0700)
commit4fe516d2ad1a6b827694db134fa2a0af97917b41
tree39cb21f0541f4454b857dc4caeb6554638be044d
parentb78b9e7b7979f86c7838f1ab7d084ca35a17702d
cxl/acpi: Make the XOR calculations available for testing

In preparation for adding a test module that can exercise the address
translation functions performed by the CXL Driver, refactor the XOR
implementation like this:

- Extract the core calculation into a standalone helper function,
- Export the new function for use by test module cxl_translate only,
- Enhance the parameter validation since this new function will be
  called from a test module with no guarantee of valid parameters,
- Move the define of struct cxl_cxims_data to cxl.h so the test module
  can build xormaps.

Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/acpi.c
drivers/cxl/cxl.h