summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlison Schofield <alison.schofield@intel.com>2025-10-14 01:24:30 -0700
committerDave Jiang <dave.jiang@intel.com>2025-11-03 09:27:32 -0700
commitb78b9e7b7979f86c7838f1ab7d084ca35a17702d (patch)
treef41ba989397b3d7dad9fedbcea4d9f09a5fa81fa /lib
parent6146a0f1dfae5d37442a9ddcba012add260bceb0 (diff)
cxl/region: Refactor address translation funcs for testing
In preparation for adding a test module that exercises the address translation calculations, extract the core calculations into stand- alone functions that operate on base parameters without dependencies on struct cxl_region. Perform additional parameter validation to protect against a test module sending bad parameters. Export the validation function, as well as the three core translation functions for use by test module cxl_translate only. This refactoring enables unit testing of the address translation logic with controlled inputs, while preserving identical functionality in the existing code paths. Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Alison Schofield <alison.schofield@intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions