cxl/component_regs: Fix offset
PATCH 1/1 cxl/component_regs: Fix offset
The CXL.cache and CXL.mem registers begin after the CXL.io registers which occupy the first 0x1000 bytes. The current code wasn't setting this up properly for future users of the component registers. It was correct for the probing code however.
Cc Jonathan Cameron <[email protected]>
Cc Ira Weiny <[email protected]>
Signed-off-by Ben Widawsky <[email protected]>
--- drivers/cxl/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cxl/core.c +1 -1
@@ -671,7 +671,7 @@ void cxl_probe_component_regs(struct device *dev, void __iomem *base, length =0x20 * decoder_cnt +0x10 ; map->hdm_decoder.valid = true; - map->hdm_decoder.offset = offset; + map->hdm_decoder.offset =CXL_CM_OFFSET + offset; map->hdm_decoder.size = length;break ;default :
Signature · 1 line
2.32.0
Quoted 8 lines · On Thu, 10 Jun 2021 22:11:13 -0700 Ben Widawsky <[email protected]> wrote:
The CXL.cache and CXL.mem registers begin after the CXL.io registers which occupy the first
0x1000bytes. The current code wasn't setting this up properly for future users of the component registers. It was correct for the probing code however.Cc Jonathan Cameron <[email protected]>Cc Ira Weiny <[email protected]>Signed-off-by Ben Widawsky <[email protected]>
I guess we could have assumed that this offset was always form CXL_CM_OFFSET but as that's a bit odd, this change makes sense.
Acked-by Jonathan Cameron <[email protected]>
Quoted 17 lines
--- drivers/cxl/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/cxl/core.c +1
-1@@ -671,7 +671,7 @@ void cxl_probe_component_regs(struct device *dev, void __iomem *base, length =0x20 * decoder_cnt +0x10 ; map->hdm_decoder.valid = true; - map->hdm_decoder.offset = offset; + map->hdm_decoder.offset =CXL_CM_OFFSET + offset; map->hdm_decoder.size = length;break ;default :