diff options
author | Dan Williams <dan.j.williams@intel.com> | 2023-02-07 11:04:30 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-14 19:11:52 +0100 |
commit | 15f9f8eb3b8b1d1831899b4ffb816a0ecc57f044 (patch) | |
tree | 54f6a2aa00b95d737ad2a4c9c07015232d694a85 | |
parent | a04c7d062b537ff787d00da95bdfe343260d4beb (diff) | |
download | linux-15f9f8eb3b8b1d1831899b4ffb816a0ecc57f044.tar.gz |
cxl/region: Fix passthrough-decoder detection
commit 711442e29f16f0d39dd0e2460c9baacfccb9d5a7 upstream. 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: e4f6dfa9ef75 ("cxl/region: Fix 'distance' calculation with passthrough ports") Cc: <stable@vger.kernel.org> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/167564540422.847146.13816934143225777888.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/cxl/core/region.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c index 36962d1c2351..9709bbf773b7 100644 --- a/drivers/cxl/core/region.c +++ b/drivers/cxl/core/region.c @@ -993,10 +993,10 @@ static int cxl_port_setup_targets(struct cxl_port *port, int i, distance; /* - * Passthrough ports impose no distance requirements between + * Passthrough decoders impose no distance requirements between * peers */ - if (port->nr_dports == 1) + if (cxl_rr->nr_targets == 1) distance = 0; else distance = p->nr_targets / cxl_rr->nr_targets; |