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 3C31819AD72 for ; Tue, 30 Jul 2024 09:28:53 +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=1722331734; cv=none; b=byEz6HCqvysTgC8ISA6poKSydeph6F0cvPe+Qc4gkDpDFvm/zzj5SNrpknI1h2hRtOT9e/AQ2rbFvyH1S75PmZwp29TQOnjDhI5fKDlAtqpybzisBLY+dsBtuZq0bGwjHb9jzow99eB08EWiyvnMish3/7kcC9FiOvQhTA5DXCo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722331734; c=relaxed/simple; bh=eRqd1G8ulhwvs5I18Wdf38lm2t7DkSETg/FVEHfYhrs=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=cHDxB0Ph1ismgBcic3qjyoI4ZdZYJDfGnIqOfRI/UW9My6pvWnUuOzdNDnTP8A5fY+JRDvsFr0TI46wk0eKc9D0CPQoZNwwosC8UQtINNUprXoIHTztUvmVDLttTZgCShfZM7NFf7tFRyUKiBx18jDA8mJVvIdgQS+zmrxm8lwY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Mw0fW6vh; 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="Mw0fW6vh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74F43C32782; Tue, 30 Jul 2024 09:28:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1722331733; bh=eRqd1G8ulhwvs5I18Wdf38lm2t7DkSETg/FVEHfYhrs=; h=Subject:To:Cc:From:Date:From; b=Mw0fW6vhN3lhCfRuBYP7fga8bSeO5I/DL3UVTcPmSg5fQ6vXiaGTPGWqtHRVXUC76 ojXKVAeOaQDql9ZIyUynAUtO6hZyxRKull8Xl8d1LGg7CbJvhtyUbo/ASa01/S6YzT +lrcya3v0RtZ1lPUXp11M8v/rrwJPNJJ9RxD86a4= Subject: FAILED: patch "[PATCH] perf/x86/intel: Add a distinct name for Granite Rapids" failed to apply to 6.6-stable tree To: kan.liang@linux.intel.com,ahmad.yasin@intel.com,peterz@infradead.org Cc: From: Date: Tue, 30 Jul 2024 11:28:43 +0200 Message-ID: <2024073043-shortlist-silica-557d@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.6-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y git checkout FETCH_HEAD git cherry-pick -x fa0c1c9d283b37fdb7fc1dcccbb88fc8f48a4aa4 # git commit -s git send-email --to '' --in-reply-to '2024073043-shortlist-silica-557d@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^.. Possible dependencies: fa0c1c9d283b ("perf/x86/intel: Add a distinct name for Granite Rapids") d142df13f357 ("perf/x86/intel: Switch to new Intel CPU model defines") 97588df87b56 ("perf/x86/intel: Add common intel_pmu_init_hybrid()") b0560bfd4b70 ("perf/x86/intel: Clean up the hybrid CPU type handling code") 299a5fc8e783 ("perf/x86/intel: Apply the common initialization code for ADL") d87d221f854b ("perf/x86/intel: Factor out the initialization code for ADL e-core") 0ba0c03528e9 ("perf/x86/intel: Factor out the initialization code for SPR") d4b5694c75d4 ("perf/x86/intel: Use the common uarch name for the shared functions") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From fa0c1c9d283b37fdb7fc1dcccbb88fc8f48a4aa4 Mon Sep 17 00:00:00 2001 From: Kan Liang Date: Mon, 8 Jul 2024 12:33:35 -0700 Subject: [PATCH] perf/x86/intel: Add a distinct name for Granite Rapids MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, the Sapphire Rapids and Granite Rapids share the same PMU name, sapphire_rapids. Because from the kernel’s perspective, GNR is similar to SPR. The only key difference is that they support different extra MSRs. The code path and the PMU name are shared. However, from end users' perspective, they are quite different. Besides the extra MSRs, GNR has a newer PEBS format, supports Retire Latency, supports new CPUID enumeration architecture, doesn't required the load-latency AUX event, has additional TMA Level 1 Architectural Events, etc. The differences can be enumerated by CPUID or the PERF_CAPABILITIES MSR. They weren't reflected in the model-specific kernel setup. But it is worth to have a distinct PMU name for GNR. Fixes: a6742cb90b56 ("perf/x86/intel: Fix the FRONTEND encoding on GNR and MTL") Suggested-by: Ahmad Yasin Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20240708193336.1192217-3-kan.liang@linux.intel.com diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index b61367991a16..0c9c2706d4ec 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -6943,12 +6943,18 @@ __init int intel_pmu_init(void) case INTEL_EMERALDRAPIDS_X: x86_pmu.flags |= PMU_FL_MEM_LOADS_AUX; x86_pmu.extra_regs = intel_glc_extra_regs; - fallthrough; + pr_cont("Sapphire Rapids events, "); + name = "sapphire_rapids"; + goto glc_common; + case INTEL_GRANITERAPIDS_X: case INTEL_GRANITERAPIDS_D: + x86_pmu.extra_regs = intel_rwc_extra_regs; + pr_cont("Granite Rapids events, "); + name = "granite_rapids"; + + glc_common: intel_pmu_init_glc(NULL); - if (!x86_pmu.extra_regs) - x86_pmu.extra_regs = intel_rwc_extra_regs; x86_pmu.pebs_ept = 1; x86_pmu.hw_config = hsw_hw_config; x86_pmu.get_event_constraints = glc_get_event_constraints; @@ -6959,8 +6965,6 @@ __init int intel_pmu_init(void) td_attr = glc_td_events_attrs; tsx_attr = glc_tsx_events_attrs; intel_pmu_pebs_data_source_skl(true); - pr_cont("Sapphire Rapids events, "); - name = "sapphire_rapids"; break; case INTEL_ALDERLAKE: