Skip to content

Commit 711442e

Browse files
committed
cxl/region: Fix passthrough-decoder detection
A passthrough decoder is a decoder that maps only 1 target. It is a special case because it does not impose any constraints on the interleave-math as compared to a decoder with multiple targets. Extend the passthrough case to multi-target-capable decoders that only have one target selected. I.e. the current code was only considering passthrough *ports* which are only a subset of the potential passthrough decoder scenarios. Fixes: e4f6dfa ("cxl/region: Fix 'distance' calculation with passthrough ports") Cc: <[email protected]> Reviewed-by: Dave Jiang <[email protected]> Link: https://lore.kernel.org/r/167564540422.847146.13816934143225777888.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams <[email protected]>
1 parent 4fa4302 commit 711442e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/cxl/core/region.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -993,10 +993,10 @@ static int cxl_port_setup_targets(struct cxl_port *port,
993993
int i, distance;
994994

995995
/*
996-
* Passthrough ports impose no distance requirements between
996+
* Passthrough decoders impose no distance requirements between
997997
* peers
998998
*/
999-
if (port->nr_dports == 1)
999+
if (cxl_rr->nr_targets == 1)
10001000
distance = 0;
10011001
else
10021002
distance = p->nr_targets / cxl_rr->nr_targets;

0 commit comments

Comments
 (0)