Compare
bd22f7e63509fa758cf500d9af3e88a3d3df96be..cf1f186e08dadb5abc4410d10fe3ada7ebf801ae
perf/x86/intel/uncore: Fix DMR CXL CM invert filter
The DMR CXL CM PMU places its invert filter at config bit 21 and its
9-bit threshold at bits 23-31. However, dmr_uncore_cxlcm uses
GENERIC_PMON_RAW_EVENT_MASK, which covers the threshold through the
generic bit 23 invert field and bits 24-31 threshold field, but does not
include the relocated invert bit. As a result, uncore_pmu_event_init()
silently clears bit 21 and inv=1 programs the same configuration as
inv=0.
Add bit 21 to a DMR CXL CM-specific event mask so the requested invert
filter reaches hardware.
Fixes: 6daf2c35b835 ("perf/x86/intel/uncore: Add IMH PMON support for Diamond Rapids")
Signed-off-by: Guixiong Wei <weiguixiong@bytedance.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Zide Chen <zide.chen@intel.com>
Link: https://patch.msgid.link/20261008051953.6293-2-weiguixiong@bytedance.com
Guixiong Wei <weiguixiong@bytedance.com> · 2026-10-08 05:19 UTC · committed by Peter Zijlstra
4 files changed,
+9
−16
- arch/x86/events/intel/uncore_snbep.c
- drivers/gpio/gpio-nct6694.c
- drivers/gpio/gpiolib-shared.c
- tools/gpio/Makefile
modified arch/x86/events/intel/uncore_snbep.c
| @@ -474,6 +474,9 @@ | |||
| 474 | 474 | /* DMR */ | |
| 475 | 475 | #define DMR_IMH1_HIOP_MMIO_BASE 0x1ffff6ae7000 | |
| 476 | 476 | #define DMR_HIOP_MMIO_SIZE 0x8000 | |
| 477 | + | #define DMR_CXLCM_PMON_CTL_INVERT BIT(21) | |
| 478 | + | #define DMR_CXLCM_PMON_RAW_EVENT_MASK (GENERIC_PMON_RAW_EVENT_MASK | \ | |
| 479 | + | DMR_CXLCM_PMON_CTL_INVERT) | |
| 477 | 480 | #define DMR_CXLCM_EVENT_MASK_EXT 0xf | |
| 478 | 481 | #define DMR_HAMVF_EVENT_MASK_EXT 0xffffffff | |
| 479 | 482 | #define DMR_PCIE4_EVENT_MASK_EXT 0xffffff | |
| @@ -6696,7 +6699,7 @@ static struct event_constraint dmr_uncore_cxlcm_constraints[] = { | |||
| 6696 | 6699 | ||
| 6697 | 6700 | static struct intel_uncore_type dmr_uncore_cxlcm = { | |
| 6698 | 6701 | .name = "cxlcm", | |
| 6699 | - | .event_mask = GENERIC_PMON_RAW_EVENT_MASK, | |
| 6702 | + | .event_mask = DMR_CXLCM_PMON_RAW_EVENT_MASK, | |
| 6700 | 6703 | .event_mask_ext = DMR_CXLCM_EVENT_MASK_EXT, | |
| 6701 | 6704 | .constraints = dmr_uncore_cxlcm_constraints, | |
| 6702 | 6705 | .format_group = &dmr_cxlcm_uncore_format_group, | |
modified drivers/gpio/gpio-nct6694.c
| @@ -444,7 +444,7 @@ static int nct6694_gpio_probe(struct platform_device *pdev) | |||
| 444 | 444 | data->gpio.set_config = nct6694_set_config; | |
| 445 | 445 | data->gpio.init_valid_mask = nct6694_init_valid_mask; | |
| 446 | 446 | data->gpio.base = -1; | |
| 447 | - | data->gpio.can_sleep = true; | |
| 447 | + | data->gpio.can_sleep = false; | |
| 448 | 448 | data->gpio.owner = THIS_MODULE; | |
| 449 | 449 | data->gpio.ngpio = NCT6694_NR_GPIO; | |
| 450 | 450 | ||
modified tools/gpio/Makefile
| @@ -7,13 +7,7 @@ bindir ?= /usr/bin | |||
| 7 | 7 | # isn't set and when invoked from selftests build, where srctree | |
| 8 | 8 | # is set to ".". building_out_of_srctree is undefined for in srctree | |
| 9 | 9 | # builds | |
| 10 | - | ifeq ($(srctree),) | |
| 11 | - | update_srctree := 1 | |
| 12 | - | endif | |
| 13 | 10 | ifndef building_out_of_srctree | |
| 14 | - | update_srctree := 1 | |
| 15 | - | endif | |
| 16 | - | ifeq ($(update_srctree),1) | |
| 17 | 11 | srctree := $(patsubst %/,%,$(dir $(CURDIR))) | |
| 18 | 12 | srctree := $(patsubst %/,%,$(dir $(srctree))) | |
| 19 | 13 | endif | |