+142
−60
+6
−0
Loading
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>