cxl/region: Fix decoder interleave programming
authorDan Williams <dan.j.williams@intel.com>
Tue, 2 Aug 2022 17:34:35 +0000 (10:34 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 5 Aug 2022 15:41:19 +0000 (08:41 -0700)
commit2901c8bdedca19e5efdab2ea55b465102231b315
tree8362b0ecfa8f7db7278ab32f173bdee1160e25cb
parent8732947b75a826519ef33b92dbebaa3fa83e5e0b
cxl/region: Fix decoder interleave programming

Jonathan notes:

"Curiously interleave ways = 1 for the EPs which is obviously wrong"

...while testing the latest CXL development branch on QEMU.

It turns out the region creation process failed to program the endpoint
decoders. This was missed because the default settings of x1 at 4K
intereleave still results in the region appearing to function. Jonathan
caught the bug by reverse mapping the translations that need to happen
for the QEMU support.

Link: https://lore.kernel.org/r/62e95fdf9f6e2_30440294e4@dwillia2-xfh.jf.intel.com.notmuch
Fixes: 384e624bb211 ("cxl/region: Attach endpoint decoders")
Reported-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/165951146336.967013.11160153960900111443.stgit@dwillia2-xfh.jf.intel.com
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/core/region.c