Skip to content

Commit

Permalink
cxl/component_regs: Fix offset
Browse files Browse the repository at this point in the history
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 <Jonathan.Cameron@huawei.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Fixes: 0842237 ("cxl/pci: Add HDM decoder capabilities")
Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20210611051113.224328-1-ben.widawsky@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
  • Loading branch information
Ben Widawsky authored and Dan Williams committed Jun 12, 2021
1 parent 6423035 commit ba26864
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/cxl/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,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:
Expand Down

0 comments on commit ba26864

Please sign in to comment.