From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7575D221721; Thu, 22 Jan 2026 06:48:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769064536; cv=none; b=jDYvvRjjkAKkvDvO2kCN7P1J8sChU1Qig++VIvmo51YUHs/255vHrThOay01ACfnvxfGfdIFX+7MkRsOoL16NG3W3hNkXID51Lt2H3gigZDJXVkC4e5whpTQ4syN/wXRu82eA2HW0EMfg59E3+1QWlm7lREgz/ieGk75PO+7Or8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769064536; c=relaxed/simple; bh=qwNoa7aIuLdLhgsBIJT8FObNDoDVllGzZQLQKAW+5/8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Rgk44DgA3sc3zgG6VlRX4ITwx1K/ayORWJmuZe6UH7eO4YUtVnwyq1y6+d/D+rlUtepie5BsfjuX2vdEHNhKWfycV0PMcYUhlNcKp8W8Vq/fgAtr9xekpQwa3/AWwRz+ilYFSIA2gAfKvKyoPmtW2SSQ+AjOqGLscptYhQS/Mds= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WetCRo7q; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="WetCRo7q" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72518C116C6; Thu, 22 Jan 2026 06:48:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1769064536; bh=qwNoa7aIuLdLhgsBIJT8FObNDoDVllGzZQLQKAW+5/8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WetCRo7q5qMHfPTpCXrxhfsVfOLMhgZxo6PVbL16x+iVyUpopXWxHuiZjbmhAVevY X6LMYkzhxzY73i0r/t3hPzIlIsxJ6N6jz6wxgtfiTsZPqbSEyG/1nHupb5ERv9ibuf lpl1QKoDmZ0flSoT4282CRFAFHNIKlIJJdZ1YzGk= Date: Thu, 22 Jan 2026 07:48:53 +0100 From: Greg KH To: Sandipan Das Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , James Clark , Thomas Gleixner , Borislav Petkov , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , stable@vger.kernel.org, Ravi Bangoria , Ananth Narayan Subject: Re: [PATCH] perf/x86/amd/uncore: Use Node ID to identify DF and UMC domains Message-ID: <2026012245-endless-botanist-207d@gregkh> References: Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Jan 22, 2026 at 12:15:05PM +0530, Sandipan Das wrote: > For DF and UMC PMUs, a single context is shared across all CPUs that are > connected to the same Data Fabric (DF) instance. Currently, Socket ID is > used to identify DF instances. This approach works for configurations > having a single IO Die (IOD) but fails in the following cases. > * Older Zen 1 processors, where each chiplet has its own DF instance > instead of a single IOD. > * Any configurations with multiple IODs in a single socket. > > Address this by using the Node ID available in ECX[7:0] of CPUID leaf > 0x8000001e which is already provided by topology_amd_node_id(). Replace > the use of topology_logical_package_id() with topology_amd_node_id() in > order to correctly identify domains for context sharing. > > Fixes: 07888daa056e ("perf/x86/amd/uncore: Move discovery and registration") > Signed-off-by: Sandipan Das > --- > arch/x86/events/amd/uncore.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/x86/events/amd/uncore.c b/arch/x86/events/amd/uncore.c > index 9293ce50574d..9a13a9f21d2f 100644 > --- a/arch/x86/events/amd/uncore.c > +++ b/arch/x86/events/amd/uncore.c > @@ -700,7 +700,7 @@ void amd_uncore_df_ctx_scan(struct amd_uncore *uncore, unsigned int cpu) > info.split.aux_data = 0; > info.split.num_pmcs = NUM_COUNTERS_NB; > info.split.gid = 0; > - info.split.cid = topology_logical_package_id(cpu); > + info.split.cid = topology_amd_node_id(cpu); > > if (pmu_version >= 2) { > ebx.full = cpuid_ebx(EXT_PERFMON_DEBUG_FEATURES); > @@ -999,8 +999,8 @@ void amd_uncore_umc_ctx_scan(struct amd_uncore *uncore, unsigned int cpu) > cpuid(EXT_PERFMON_DEBUG_FEATURES, &eax, &ebx.full, &ecx, &edx); > info.split.aux_data = ecx; /* stash active mask */ > info.split.num_pmcs = ebx.split.num_umc_pmc; > - info.split.gid = topology_logical_package_id(cpu); > - info.split.cid = topology_logical_package_id(cpu); > + info.split.gid = topology_amd_node_id(cpu); > + info.split.cid = topology_amd_node_id(cpu); > *per_cpu_ptr(uncore->info, cpu) = info; > } > > -- > 2.43.0 > > This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly.