mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] cxl/acpi: Fix using extra xormaps for address translation
@ 2026-01-15 13:16 Li Ming
  2026-01-15 16:12 ` Dave Jiang
  2026-01-15 17:56 ` Alison Schofield
  0 siblings, 2 replies; 4+ messages in thread
From: Li Ming @ 2026-01-15 13:16 UTC (permalink / raw)
  To: dave, jonathan.cameron, dave.jiang, alison.schofield,
	vishal.l.verma, ira.weiny, dan.j.williams
  Cc: linux-cxl, linux-kernel, Li Ming

CXL r3.1 Table 9-22 defines a fixed number of XOR maps for interleave
arithmetic based on the number of interleave ways, as reflected by
hbiw_to_nr_maps[].

The current implementation applies all XOR maps during address
translation, but it should use the spec-defined number of XOR maps
derived from the number of interleave ways.

Fixes: 3b2fedcd75e3 ("cxl: Restore XOR'd position bits during address translation")
Signed-off-by: Li Ming <ming.li@zohomail.com>
---
 drivers/cxl/acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
index 77ac940e3013..5f84d01e7d39 100644
--- a/drivers/cxl/acpi.c
+++ b/drivers/cxl/acpi.c
@@ -61,7 +61,7 @@ u64 cxl_do_xormap_calc(struct cxl_cxims_data *cximsd, u64 addr, int hbiw)
 	 * bits results in val==0, if odd the XOR result is val==1.
 	 */
 
-	for (int i = 0; i < cximsd->nr_maps; i++) {
+	for (int i = 0; i < nr_maps_to_apply; i++) {
 		if (!cximsd->xormaps[i])
 			continue;
 		pos = __ffs(cximsd->xormaps[i]);
-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-01-16  9:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-15 13:16 [PATCH 1/1] cxl/acpi: Fix using extra xormaps for address translation Li Ming
2026-01-15 16:12 ` Dave Jiang
2026-01-15 17:56 ` Alison Schofield
2026-01-16  9:54   ` Li Ming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®