Linux Perf Users
 help / color / mirror / Atom feed
From: Richard Cheng <icheng@nvidia.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: jic23@kernel.org, will@kernel.org, mark.rutland@arm.com,
	 harshal.t@samsung.com, linux-cxl@vger.kernel.org,
	linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v3 1/3] perf/cxlpmu: Fix 64-bit write to 32-bit HDM filter register
Date: Tue, 14 Jul 2026 14:40:29 +0800	[thread overview]
Message-ID: <alXZx8VlmC5RRofg@MWDK4CY14F> (raw)
In-Reply-To: <20260713061112.105419-2-dave@stgolabs.net>

On Sun, Jul 12, 2026 at 11:11:10PM +0800, Davidlohr Bueso wrote:
> The HDM decoder filter configuration register is 32 bits wide, but the
> driver programs it with a 64-bit writeq(). 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: 5d7107c72796 ("perf: CXL Performance Monitoring Unit driver")
> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
> ---
>  drivers/perf/cxl_pmu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/perf/cxl_pmu.c b/drivers/perf/cxl_pmu.c
> index 68a54d97d2a8..39b46550a510 100644
> --- a/drivers/perf/cxl_pmu.c
> +++ b/drivers/perf/cxl_pmu.c
> @@ -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));
> -- 
> 2.39.5
>

Reviewed-by: Richard Cheng <icheng@nvidia.com> 

  reply	other threads:[~2026-07-14  6:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-13  6:11 [PATCH v3 0/3] perf/cxlpmu: Misc updates Davidlohr Bueso
2026-07-13  6:11 ` [PATCH v3 1/3] perf/cxlpmu: Fix 64-bit write to 32-bit HDM filter register Davidlohr Bueso
2026-07-14  6:40   ` Richard Cheng [this message]
2026-07-13  6:11 ` [PATCH v3 2/3] perf/cxlpmu: Add missing CXL 4.0 events Davidlohr Bueso
2026-07-13  6:11 ` [PATCH v3 3/3] perf/cxlpmu: Support Channel/Rank/Bank filter Davidlohr Bueso
2026-07-14  6:35   ` Richard Cheng
2026-07-15 16:53     ` Davidlohr Bueso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alXZx8VlmC5RRofg@MWDK4CY14F \
    --to=icheng@nvidia.com \
    --cc=dave@stgolabs.net \
    --cc=harshal.t@samsung.com \
    --cc=jic23@kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox