aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
authorMark Brown <broonie@kernel.org>2026-05-29 23:14:32 +0100
committerMark Brown <broonie@kernel.org>2026-05-29 23:14:32 +0100
commitff207cd659f8ea635f3f77fceb51cad3ebacb513 (patch)
treec64f65c5ed21c16b476b69d98fca52b79cb40c8f /tools
parent49bf47149d56f7e634c3afbe6f83c16bc79f105e (diff)
parent809ccef5385fa1779c7db3de43272f3fc6a87a45 (diff)
downloadlinux-next-history-ff207cd659f8ea635f3f77fceb51cad3ebacb513.tar.gz
Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/cxl/test/cxl.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c
index 296516eecfd6a..4281d34cd0e74 100644
--- a/tools/testing/cxl/test/cxl.c
+++ b/tools/testing/cxl/test/cxl.c
@@ -318,7 +318,7 @@ static struct {
.restrictions = ACPI_CEDT_CFMWS_RESTRICT_HOSTONLYMEM |
ACPI_CEDT_CFMWS_RESTRICT_VOLATILE,
.qtg_id = FAKE_QTG_ID,
- .window_size = SZ_256M,
+ .window_size = SZ_256M > PMD_SIZE ? SZ_256M : PMD_SIZE,
},
.target = { 3 },
},
@@ -495,9 +495,12 @@ static int populate_cedt(void)
for (i = cfmws_start; i <= cfmws_end; i++) {
struct acpi_cedt_cfmws *window = mock_cfmws[i];
+ int align = SZ_256M;
cfmws_elc_update(window, i);
- res = alloc_mock_res(window->window_size, SZ_256M);
+ if (window->restrictions & ACPI_CEDT_CFMWS_RESTRICT_VOLATILE)
+ align = max_t(int, SZ_256M, PMD_SIZE);
+ res = alloc_mock_res(window->window_size, align);
if (!res)
return -ENOMEM;
window->base_hpa = res->range.start;
@@ -1819,6 +1822,12 @@ static __init int cxl_test_init(void)
int rc, i;
struct range mappable;
+ if (!IS_ALIGNED(mock_auto_region_size, PMD_SIZE)) {
+ pr_err_once("mock_auto_region_size %d must be PMD-aligned\n",
+ mock_auto_region_size);
+ return -EINVAL;
+ }
+
cxl_acpi_test();
cxl_core_test();
cxl_mem_test();