mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 03:35:32 -04:00
perf/cxlpmu: Fix 64-bit write to 32-bit HDM filter register
The HDM decoder filter configuration register is 32 bits wide, but the
driver programs it with a 64-bit writeq(). The filter value never
exceeds 32 bits, so the upper half of the write is always zero and
lands in the adjacent Filter ID 1 (Channel/Rank/Bank) configuration
register at offset+4.
Fixes: 5d7107c727 ("perf: CXL Performance Monitoring Unit driver")
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Reviewed-by: Richard Cheng <icheng@nvidia.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
committed by
Will Deacon
parent
18ec1f543a
commit
ea434e8fd3
@@ -635,7 +635,7 @@ static void cxl_pmu_event_start(struct perf_event *event, int flags)
|
||||
cfg = cxl_pmu_config2_get_hdm_decoder(event);
|
||||
else
|
||||
cfg = GENMASK(31, 0); /* No filtering if 0xFFFF_FFFF */
|
||||
writeq(cfg, base + CXL_PMU_FILTER_CFG_REG(hwc->idx, 0));
|
||||
writel(cfg, base + CXL_PMU_FILTER_CFG_REG(hwc->idx, 0));
|
||||
}
|
||||
|
||||
cfg = readq(base + CXL_PMU_COUNTER_CFG_REG(hwc->idx));
|
||||
|
||||
Reference in New Issue
Block a user