From patchwork Fri Jan 12 09:25:25 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Meng Li
X-Patchwork-Id: 187623
Return-Path:
Delivered-To: ouuuleilei@gmail.com
Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp58010dyc;
Fri, 12 Jan 2024 01:29:45 -0800 (PST)
X-Google-Smtp-Source:
AGHT+IFjkfP7AG46RoUd2Op4jAeLmmIV94ud9OYGoJUmOJ+en5iaj0JvLhvc7deTyUnC2OqkGsOd
X-Received: by 2002:a05:6a20:7484:b0:19a:392e:3626 with SMTP id
p4-20020a056a20748400b0019a392e3626mr815212pzd.75.1705051785691;
Fri, 12 Jan 2024 01:29:45 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1705051785; cv=pass;
d=google.com; s=arc-20160816;
b=FKDUpmZefRkL7mDZ0fMKW9ThBRvcvwMOWGfoTsQ9D3nDPfHRc+bTH54mDLRStJHiEf
YrqEwbJqAq6N5ypVAa/v5I08ipUqkMJW1irJYa8E6tht0Nd5Te7MAwGlnrFh0YWuENyM
3iQFKpXO9t874XXLLDtAwC8LXMPvwXxvfnVrNu4evNhdlhHLZx2CIzK/aSo6lMXAp+I6
ZkD2CMBOUTJ/fvsj+Nbh3+30y+fFjTt4MMwcils4fya6c1BrDfM6jXX88A2kSk5cqAth
7XzQ2pHyyj0LLv8miImjNJih4r5JwU9DJ39BRtg1O1kf6wsYP6EoSd+ufNOB6p2uBhJ4
ZQKw==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20160816;
h=content-transfer-encoding:mime-version:list-unsubscribe
:list-subscribe:list-id:precedence:references:in-reply-to:message-id
:date:subject:cc:to:from:dkim-signature;
bh=LlSxPWdyV/EtEqLn7HLp6u5EkidVnG0biRkzCBeMMkc=;
fh=PfhR5ZB3IHZD1uvzuazx5UXTOhnwF6WV/gS/oOi5eYk=;
b=jKVkFIgB81IvOpgUfsJBYsPkDYb3kw1CFouzx7aX7uT5uLhQza+aWbu7COac5RysaS
gg0swlEn+bDfjjwolrhbj6H3p13fCgPruo4nkD6hrmM/2meT2R4WbNse/25QjDiqurLf
ilt9t/rgACBK2cxyQSBLNqWvbpzBbHej/JTwe+7vAStUmDX1BieR0AR3CgPAjck9yMIF
2tLiGVHKdeoFw9PO/yrGZb+8lI9AX2MBT+8caFsct5lL74xFoRYJMRgVAanViJPFpseG
gA/WgF1w/1Jl5XkY8vEH+t+spExlRWxsgpbo+DuTGTvhoCItVaNqZNn3DSIAOlF3SJyY
LUXA==
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@amd.com header.s=selector1 header.b=Iaef2Im1;
arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass
fromdomain=amd.com);
spf=pass (google.com: domain of
linux-kernel+bounces-24474-ouuuleilei=gmail.com@vger.kernel.org designates
2604:1380:40f1:3f00::1 as permitted sender)
smtp.mailfrom="linux-kernel+bounces-24474-ouuuleilei=gmail.com@vger.kernel.org";
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org.
[2604:1380:40f1:3f00::1])
by mx.google.com with ESMTPS id
em22-20020a17090b015600b0028d9b8af4d4si2845124pjb.29.2024.01.12.01.29.45
for
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Fri, 12 Jan 2024 01:29:45 -0800 (PST)
Received-SPF: pass (google.com: domain of
linux-kernel+bounces-24474-ouuuleilei=gmail.com@vger.kernel.org designates
2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1;
Authentication-Results: mx.google.com;
dkim=pass header.i=@amd.com header.s=selector1 header.b=Iaef2Im1;
arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass
fromdomain=amd.com);
spf=pass (google.com: domain of
linux-kernel+bounces-24474-ouuuleilei=gmail.com@vger.kernel.org designates
2604:1380:40f1:3f00::1 as permitted sender)
smtp.mailfrom="linux-kernel+bounces-24474-ouuuleilei=gmail.com@vger.kernel.org";
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com
Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org
[52.25.139.140])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 4B35FB26669
for ; Fri, 12 Jan 2024 09:27:08 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D6D8F5D8F7;
Fri, 12 Jan 2024 09:26:02 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com
header.b="Iaef2Im1"
Received: from NAM11-DM6-obe.outbound.protection.outlook.com
(mail-dm6nam11on2084.outbound.protection.outlook.com [40.107.223.84])
(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 50B2356B9A;
Fri, 12 Jan 2024 09:25:58 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org;
spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=WSr0qTE+mGD3l68XQPc/FdFFuao1qLNptcAibk5i0xHjd8BazIWLaHOekL8BkBdx/TnsCuHIzsgZXKXK5+iecciJ5/xgAMQa/Sc4Z7EjyJfNi51So+BLgFd3kIsE/HFULTUGaiHdRmN3OVJaUjpgpjdq3DhgIs2hUA/msd/WvkV73cbYvZbird9uXrPlVI12uU3226Od4E5YH0/WjGDiIRRkBTLOpw3tCaTKCOtQkyELkdXc1kgcQvQoz+gjMINF+uGCqjLwZGCfSLwXxW9yB3qR+o3haeEBUo8gQJXdRIUtQUpXEQKqF+jQRXiz33R7csSzFSsqNNDOG9K9oMcfjg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=LlSxPWdyV/EtEqLn7HLp6u5EkidVnG0biRkzCBeMMkc=;
b=I3W6VZytydGQLT6QlIGoenPF55mGLiZEnWM6wsVzPmQwXaK0A/2u5BA7NiN1E+0h2juLTeYo8s/l25aIPWDNW+9Dws8y0xFJwMH78LpW1Zo855XNRfp1gECMCY9gA0hHYNf1aD2RwRqvkJnpxCc+v1GQyMaSGjof+8Eu9Jhw1iK0CdOduRITqwOgZ5TQY0M95XbUUdN+uvVgCQtT0JsuimEfyDrHKHBRpoSclV2bAFU/GvVpyCFm75is/ZAjTpWzKsI1Vi3MKQJngU82xRWibfoU+/Vrnv3+h2+44d+xLn6HENVVb8LPO0bGDps3FD2rttKITwm75UXTfowv5IbHRQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is
165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass
(p=quarantine sp=quarantine pct=100) action=none header.from=amd.com;
dkim=none (message not signed); arc=none (0)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=LlSxPWdyV/EtEqLn7HLp6u5EkidVnG0biRkzCBeMMkc=;
b=Iaef2Im17u2sKqHKkUTXth6U6153w3kF4KDTeuUJwxAkzIjjq3woORAFBVhQBbLVMS0jLL9Oi9MbK/eGECTmpI+qbz6TL4sDoB7sGzCrcq2uxA08lijo0lWGhcN14Nw0TlPWf0mC7hSAofrSVv9iAPow2W+Q341dYDNTgf53gbk=
Received: from DM6PR03CA0016.namprd03.prod.outlook.com (2603:10b6:5:40::29) by
DM6PR12MB4203.namprd12.prod.outlook.com (2603:10b6:5:21f::21) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.7181.21; Fri, 12 Jan 2024 09:25:56 +0000
Received: from DS1PEPF00017091.namprd03.prod.outlook.com
(2603:10b6:5:40:cafe::33) by DM6PR03CA0016.outlook.office365.com
(2603:10b6:5:40::29) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.21 via Frontend
Transport; Fri, 12 Jan 2024 09:25:56 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17)
smtp.mailfrom=amd.com; dkim=none (message not signed)
header.d=none;dmarc=pass action=none header.from=amd.com;
Received-SPF: Pass (protection.outlook.com: domain of amd.com designates
165.204.84.17 as permitted sender) receiver=protection.outlook.com;
client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C
Received: from SATLEXMB04.amd.com (165.204.84.17) by
DS1PEPF00017091.mail.protection.outlook.com (10.167.17.133) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.7181.14 via Frontend Transport; Fri, 12 Jan 2024 09:25:56 +0000
Received: from jasmine-meng.amd.com (10.180.168.240) by SATLEXMB04.amd.com
(10.181.40.145) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 12 Jan
2024 03:25:51 -0600
From: Meng Li
To: "Rafael J . Wysocki" , Borislav Petkov
, Huang Rui
CC: , ,
, , Shuah Khan
, , "Nathan
Fontenot" , Deepak Sharma ,
Alex Deucher , Mario Limonciello
, Shimmer Huang , "Perry
Yuan" , Xiaojian Du , Viresh Kumar
, Borislav Petkov , "Oleksandr
Natalenko" , Meng Li , Perry Yuan
Subject: [PATCH V13 1/7] x86: Drop CPU_SUP_INTEL from SCHED_MC_PRIO for the
expansion.
Date: Fri, 12 Jan 2024 17:25:25 +0800
Message-ID: <20240112092531.789841-2-li.meng@amd.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20240112092531.789841-1-li.meng@amd.com>
References: <20240112092531.789841-1-li.meng@amd.com>
Precedence: bulk
X-Mailing-List: linux-kernel@vger.kernel.org
List-Id:
List-Subscribe:
List-Unsubscribe:
MIME-Version: 1.0
X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DS1PEPF00017091:EE_|DM6PR12MB4203:EE_
X-MS-Office365-Filtering-Correlation-Id: f75cd735-1aa6-43a2-c5b6-08dc13507b13
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info:
bDODV6dgr+tgI+rOXPYLix7b2ZWEVZ8PEXqb2/v3g2KHtYyNegiVaEcEJz6zdmi+m+Sjddq62L1JekE71zRBKdblVjABAmB5n0AyVKijjlIwj0T2KK5fAS033OBG17ihX400+H5V/AuexXEMqAfikSj8dylXC+a/+idDX1zIA/ecO/nBSOtDsOKAj3ctwFvvujSVfxPP/p28mUh+ksPYQmhhw/I9zXWfo18BwHLdFzhDBkUrx7KIS24v7iWX22zh+lK+lFHx8IA6JsFmLMnmsl4XV7zjwmGaeJM4EkTbQkcnzMIc2vc9sqZ6Ts/TWC70gZ9M4i+HegN1aV0ELLvb6XzHInQ42rgWEbNVdYT50k3xHb1sakHu5FhTQ6YgzKTSJiZfFTF3ZdZ5AWOOGq7UJ9o+dDVR2Z7YmtXbRLoUNw4WUdtZIqw3H+IZmxENZU3I9E8551qxdrC+4RSAXn8JaZOs8d9htr4SXWmEy4rnlk8OzCjfjhsVQtkAoxQ6BX34utXB9ID69wZiRHEohhRrZovkMj/Tdr/rzdoR5lFhcmrtVNqm/4fuM0jfIz/91O5DWIv5Kp1xeYbgg1zZnL3sSPIesn9gOwRnNBR+/d3KvuHyN4HezBmXUVGbW+OvmgT1//Za/roh+jIUPugzPc81fYJWiM2V2FHWJIptpO7L5X2LS/LhDOTk6WkcotrfUQjWb61H8IZPuOP+O6ZORpHYfk284CuvOYtbL3TOXkfmFpwSrKgvaskFVblofOaAELKAYFiz2wQBcAffmgz9/mCWIw==
X-Forefront-Antispam-Report:
CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(136003)(396003)(346002)(39860400002)(376002)(230922051799003)(1800799012)(451199024)(186009)(64100799003)(82310400011)(46966006)(36840700001)(40470700004)(426003)(16526019)(336012)(86362001)(83380400001)(41300700001)(6666004)(7696005)(478600001)(2616005)(1076003)(26005)(6636002)(47076005)(4326008)(40480700001)(82740400003)(36756003)(70586007)(70206006)(8936002)(8676002)(54906003)(110136005)(316002)(81166007)(40460700003)(7416002)(2906002)(4744005)(356005)(5660300002)(36860700001)(36900700001);DIR:OUT;SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2024 09:25:56.2191
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
f75cd735-1aa6-43a2-c5b6-08dc13507b13
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com]
X-MS-Exchange-CrossTenant-AuthSource:
DS1PEPF00017091.namprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4203
X-getmail-retrieved-from-mailbox: INBOX
X-GMAIL-THRID: 1787876381202481520
X-GMAIL-MSGID: 1787876381202481520
amd-pstate driver also uses SCHED_MC_PRIO, so decouple the requirement
of CPU_SUP_INTEL from the dependencies to allow compilation in kernels
without Intel CPU support.
Tested-by: Oleksandr Natalenko
Reviewed-by: Mario Limonciello
Reviewed-by: Huang Rui
Reviewed-by: Perry Yuan
Signed-off-by: Meng Li
Acked-by: Borislav Petkov (AMD)
---
arch/x86/Kconfig | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 1566748f16c4..4fd69cd4241a 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1054,8 +1054,9 @@ config SCHED_MC
config SCHED_MC_PRIO
bool "CPU core priorities scheduler support"
- depends on SCHED_MC && CPU_SUP_INTEL
- select X86_INTEL_PSTATE
+ depends on SCHED_MC
+ select X86_INTEL_PSTATE if CPU_SUP_INTEL
+ select X86_AMD_PSTATE if CPU_SUP_AMD && ACPI
select CPU_FREQ
default y
help
From patchwork Fri Jan 12 09:25:26 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Meng Li
X-Patchwork-Id: 187617
Return-Path:
Delivered-To: ouuuleilei@gmail.com
Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp57233dyc;
Fri, 12 Jan 2024 01:27:31 -0800 (PST)
X-Google-Smtp-Source:
AGHT+IF3vl9uXSISmflKAYScqV7tNe83fANyEZ4WnpzFYkvryIJH9H8ga2a3QS4vIQly4vjKP0ul
X-Received: by 2002:a2e:b614:0:b0:2cc:7d32:5e5e with SMTP id
r20-20020a2eb614000000b002cc7d325e5emr514120ljn.24.1705051650764;
Fri, 12 Jan 2024 01:27:30 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1705051650; cv=pass;
d=google.com; s=arc-20160816;
b=yvA7W3vOZKqXWtAA64k4ikWvCSi4aaMLSu+GGMVcLIOLMvDduCZvJrj66kpiP7U5Yw
0i5z7+ug2AX//m/npvzzAbRuNePQxRP7grVl8hoQuYHcsozCvS96lwWhhkqBka3Qiqd5
QMnImOLcRB7kkKY0lHiyKqCfohsWrz9xdNjY1SOpl8lythb4z7exeSovGrCykzfJzZ//
CFMi0r6T9sgawC8+FukXcSCsnvP0n+rkjClUR8p1TGsHOdb5Hqj+CMZu0Soj8H7mAVht
LOWJ4OfctMpJ3w4uVgxKzRNOCpFzwzxt7scnvVUrSzjOMAmk+r7PzNiM/Ges1D1Vh9NP
Fq+g==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20160816;
h=content-transfer-encoding:mime-version:list-unsubscribe
:list-subscribe:list-id:precedence:references:in-reply-to:message-id
:date:subject:cc:to:from:dkim-signature;
bh=rhAG+etjlvt9pFUINrcsqVSFIZOqQVdlYf2BbLl182M=;
fh=pdjV0NPE8OZoZBx2M8aim9FZCatuc1gLLlAf1G+JhNs=;
b=qTCiGCc8KgD6no9Q+duBeZOnNPiCLnTRdcNMrl6f2fY10CeHQjKBXrYuefG67jq+NK
AtghQHFnyuIaHBNyHshki9T21MYBAfNmZtfAPYfpTCOXCHlBlV6eSMlWR9V4eFgTOchg
V0axgMDbZ0pD8CiHQL0JMWCQ4gTQkUoZp3qG0FRNoTT7EXa0mTEYL77KehtIebMSW9t4
w/C8e278Myy9ejZhPkz7iqxnpt3RIbVyO97Pc+CHLSC5+YIyO1k+/tbTXML4OnD9rz1i
xYqnLw2GKDH8X5rHjtRUWFUwFNLVCih/AtajYJYH4OToYiRFGqucQvAHbGXpfT6nx/Hh
4UcQ==
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@amd.com header.s=selector1 header.b=MmcxIbpg;
arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass
fromdomain=amd.com);
spf=pass (google.com: domain of
linux-kernel+bounces-24475-ouuuleilei=gmail.com@vger.kernel.org designates
147.75.80.249 as permitted sender)
smtp.mailfrom="linux-kernel+bounces-24475-ouuuleilei=gmail.com@vger.kernel.org";
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249])
by mx.google.com with ESMTPS id
x26-20020aa7cd9a000000b0055753dc792bsi1259488edv.563.2024.01.12.01.27.30
for
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Fri, 12 Jan 2024 01:27:30 -0800 (PST)
Received-SPF: pass (google.com: domain of
linux-kernel+bounces-24475-ouuuleilei=gmail.com@vger.kernel.org designates
147.75.80.249 as permitted sender) client-ip=147.75.80.249;
Authentication-Results: mx.google.com;
dkim=pass header.i=@amd.com header.s=selector1 header.b=MmcxIbpg;
arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass
fromdomain=amd.com);
spf=pass (google.com: domain of
linux-kernel+bounces-24475-ouuuleilei=gmail.com@vger.kernel.org designates
147.75.80.249 as permitted sender)
smtp.mailfrom="linux-kernel+bounces-24475-ouuuleilei=gmail.com@vger.kernel.org";
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com
Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org
[52.25.139.140])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id DF0541F22375
for ; Fri, 12 Jan 2024 09:27:29 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id F411B5D90E;
Fri, 12 Jan 2024 09:26:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com
header.b="MmcxIbpg"
Received: from NAM10-MW2-obe.outbound.protection.outlook.com
(mail-mw2nam10on2056.outbound.protection.outlook.com [40.107.94.56])
(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 2AB895D8FA;
Fri, 12 Jan 2024 09:26:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org;
spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=TpZYEyMJQ+fF/BqBErpIWDHo/iEVRqDGMWai5rjohKgUDf3oZWICbTxF2ylRFbZMBf/Qfota17ZH/Or33WV8eDGFKLJxcHnxXrhCoMsf80H4vf9oBeE7fG0ousD9ITYZUixm+6yiSReJzAScT6e7DfUdHHuMdn9dq7re1iTB/g6zW9mMxLS2G+HlkCVyTghtFrqsb0qSWClHlWuIhXQycOGK8yEayD/1NLXSQYD39WP/VlUsCVuOOL5pqk4OXZsNFyrCQzW5Lv7nVO3mhaJsF+70E7OYQxwKQW3YWKciP3nPmJOFlJZcsfctzLjmFQqN97LxGn7BRwVc8aB4wkV6nA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=rhAG+etjlvt9pFUINrcsqVSFIZOqQVdlYf2BbLl182M=;
b=hY6dHSkF90EZcpUT3g0XRyX/edJYtxIKK108xi0SwSHWB5P/wnmvH8/H/NitYXn3YI+uWrLibL0bsfMtXdJ/M9I+5hEfdpUwI/BgB+ZCNs9qC7Az9TBK2axQKVaT4YiS8V8IyaZxndvK4c7MCVXEA6HbG9dJUtZ4UXNpYy4/JNpPlkX9p+CcXYxbs0FizQ1HlEtp58JJUWaTGD1sBPDSbz4K9oy3y3KzcJMJsEHt2L4yxr5MdyiL5Ci6Lnx+O6wJX8YXUZTtaIRbVwLn0zyxT0/28PqUusYe20kwLKxap2DqTLQV+WNoOBK5e3DMrFpjuKSXFMhQINBswI7Ita+zgQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is
165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass
(p=quarantine sp=quarantine pct=100) action=none header.from=amd.com;
dkim=none (message not signed); arc=none (0)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=rhAG+etjlvt9pFUINrcsqVSFIZOqQVdlYf2BbLl182M=;
b=MmcxIbpgRjstQmzClW1JWsa6hZypx52SxSRQ3QZi5oeBOzJxMhSqkAdVl7FEpzZ8q/Mc+hEpUK9HXF6EqznsE88dEbt9GLhIdIPvnGqssxgA0ehOUXyFEOfQynsskV5HHi9dCBwEj9nkZ5ZfosuvX9lJiYgrmp/fkp8dL65Kiso=
Received: from DM6PR03CA0022.namprd03.prod.outlook.com (2603:10b6:5:40::35) by
MN0PR12MB6295.namprd12.prod.outlook.com (2603:10b6:208:3c0::17) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.21; Fri, 12 Jan
2024 09:26:01 +0000
Received: from DS1PEPF00017091.namprd03.prod.outlook.com
(2603:10b6:5:40:cafe::a9) by DM6PR03CA0022.outlook.office365.com
(2603:10b6:5:40::35) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.19 via Frontend
Transport; Fri, 12 Jan 2024 09:26:01 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17)
smtp.mailfrom=amd.com; dkim=none (message not signed)
header.d=none;dmarc=pass action=none header.from=amd.com;
Received-SPF: Pass (protection.outlook.com: domain of amd.com designates
165.204.84.17 as permitted sender) receiver=protection.outlook.com;
client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C
Received: from SATLEXMB04.amd.com (165.204.84.17) by
DS1PEPF00017091.mail.protection.outlook.com (10.167.17.133) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.7181.14 via Frontend Transport; Fri, 12 Jan 2024 09:26:01 +0000
Received: from jasmine-meng.amd.com (10.180.168.240) by SATLEXMB04.amd.com
(10.181.40.145) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 12 Jan
2024 03:25:56 -0600
From: Meng Li
To: "Rafael J . Wysocki" , Borislav Petkov
, Huang Rui
CC: , ,
, , Shuah Khan
, , "Nathan
Fontenot" , Deepak Sharma ,
Alex Deucher , Mario Limonciello
, Shimmer Huang , "Perry
Yuan" , Xiaojian Du , Viresh Kumar
, Borislav Petkov , "Oleksandr
Natalenko" , Meng Li , Wyes Karny
, Perry Yuan
Subject: [PATCH V13 2/7] ACPI: CPPC: Add get the highest performance cppc
control
Date: Fri, 12 Jan 2024 17:25:26 +0800
Message-ID: <20240112092531.789841-3-li.meng@amd.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20240112092531.789841-1-li.meng@amd.com>
References: <20240112092531.789841-1-li.meng@amd.com>
Precedence: bulk
X-Mailing-List: linux-kernel@vger.kernel.org
List-Id:
List-Subscribe:
List-Unsubscribe:
MIME-Version: 1.0
X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DS1PEPF00017091:EE_|MN0PR12MB6295:EE_
X-MS-Office365-Filtering-Correlation-Id: 99c6799b-fefd-4736-2b35-08dc13507e43
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info:
ehNQefelvG43YL2ne//PgVJG+vSRvzEwlbzT8PDWQqd4kqUtfxQ9YOtJQr5hw37+MX1qTZB0KaTPgH2qEhf34ZQsTskIUlnrdFqXN7zrpUka69vXTicPqg6DhERoO/WylMzifoIR8jdr5D/Ll5sqcOdxQ4mskmm7fQ3EH0xR/5+/OCaEHmtABnbcsSUxtYBAp4GiGa9fkLpQenn+biz/o6j667A1f7DO1deDkwMyu1O2R6vzs11baUBegdQsSxM59Lquf78Twqwqcgd/d0nBaG5FAfVH4n8F8AvVRq2iYcuM5anccyZtvT5piMac1R8HDxgq82M7iPUkr1S4xfw34Sm+IRRGfPyEOF0AUqtCVvvfUA93UsRQeu/Rv03qUOXkUmIfPHchcNxpThAnoc9M0d7pahDHJ8SBDu3cCL2WjCdWwFzH5f3ebq98Q/wLk1rwGlVk2BLa/32KCDb+0f84uKv5e450hWzbksJLf+7TwfXQJffvoYmG46uyP+86x6s3rpFS6b2djQWu6ufqSjU2UV4cj853aQcM3GYrtRl92pj1tQ5Lqu+sUO8sGUejTJJ2zL5E+s9y3lQVY4ZGer6AkvEHGw0sgXPS+9n4H2cWw4nrFCphxqdyvkphc1s3jXQZDoszdsKr+JyulO7qz+txlhld1n8zXznWzs3VE55e5ICnNSZQZUObAX+QNMwSiS7jE/KD44TT9jxs8Qo3GOzopOYfeviOv5sWfaxOLnL4V6ECPqsJZfAreS9zPM3cUi73LYkwamGz4XMN8ffyfLBR8Q==
X-Forefront-Antispam-Report:
CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(376002)(136003)(396003)(346002)(39860400002)(230922051799003)(82310400011)(186009)(64100799003)(451199024)(1800799012)(40470700004)(46966006)(36840700001)(36860700001)(5660300002)(8676002)(36756003)(54906003)(41300700001)(70206006)(6636002)(316002)(8936002)(70586007)(2906002)(110136005)(356005)(2616005)(81166007)(4326008)(336012)(86362001)(16526019)(7416002)(47076005)(82740400003)(966005)(426003)(1076003)(7696005)(6666004)(26005)(478600001)(40460700003)(40480700001)(15583001)(36900700001);DIR:OUT;SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2024 09:26:01.5316
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
99c6799b-fefd-4736-2b35-08dc13507e43
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com]
X-MS-Exchange-CrossTenant-AuthSource:
DS1PEPF00017091.namprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6295
X-getmail-retrieved-from-mailbox: INBOX
X-GMAIL-THRID: 1787876239775628043
X-GMAIL-MSGID: 1787876239775628043
Add support for getting the highest performance to the
generic CPPC driver. This enables downstream drivers
such as amd-pstate to discover and use these values.
Please refer to Chapter 8.4.6.1.1.1. Highest Performance
of ACPI Specification 6.5 for details on continuous
performance control of CPPC. Also see the Link below.
Tested-by: Oleksandr Natalenko
Reviewed-by: Mario Limonciello
Reviewed-by: Wyes Karny
Reviewed-by: Perry Yuan
Acked-by: Huang Rui
Signed-off-by: Meng Li
Link: https://uefi.org/specs/ACPI/6.5/08_Processor_Configuration_and_Control.html?highlight=cppc#highest-performance
---
drivers/acpi/cppc_acpi.c | 13 +++++++++++++
include/acpi/cppc_acpi.h | 5 +++++
2 files changed, 18 insertions(+)
diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
index 7ff269a78c20..ad388a0e8484 100644
--- a/drivers/acpi/cppc_acpi.c
+++ b/drivers/acpi/cppc_acpi.c
@@ -1154,6 +1154,19 @@ int cppc_get_nominal_perf(int cpunum, u64 *nominal_perf)
return cppc_get_perf(cpunum, NOMINAL_PERF, nominal_perf);
}
+/**
+ * cppc_get_highest_perf - Get the highest performance register value.
+ * @cpunum: CPU from which to get highest performance.
+ * @highest_perf: Return address.
+ *
+ * Return: 0 for success, -EIO otherwise.
+ */
+int cppc_get_highest_perf(int cpunum, u64 *highest_perf)
+{
+ return cppc_get_perf(cpunum, HIGHEST_PERF, highest_perf);
+}
+EXPORT_SYMBOL_GPL(cppc_get_highest_perf);
+
/**
* cppc_get_epp_perf - Get the epp register value.
* @cpunum: CPU from which to get epp preference value.
diff --git a/include/acpi/cppc_acpi.h b/include/acpi/cppc_acpi.h
index 6126c977ece0..c0b69ffe7bdb 100644
--- a/include/acpi/cppc_acpi.h
+++ b/include/acpi/cppc_acpi.h
@@ -139,6 +139,7 @@ struct cppc_cpudata {
#ifdef CONFIG_ACPI_CPPC_LIB
extern int cppc_get_desired_perf(int cpunum, u64 *desired_perf);
extern int cppc_get_nominal_perf(int cpunum, u64 *nominal_perf);
+extern int cppc_get_highest_perf(int cpunum, u64 *highest_perf);
extern int cppc_get_perf_ctrs(int cpu, struct cppc_perf_fb_ctrs *perf_fb_ctrs);
extern int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls);
extern int cppc_set_enable(int cpu, bool enable);
@@ -165,6 +166,10 @@ static inline int cppc_get_nominal_perf(int cpunum, u64 *nominal_perf)
{
return -ENOTSUPP;
}
+static inline int cppc_get_highest_perf(int cpunum, u64 *highest_perf)
+{
+ return -ENOTSUPP;
+}
static inline int cppc_get_perf_ctrs(int cpu, struct cppc_perf_fb_ctrs *perf_fb_ctrs)
{
return -ENOTSUPP;
From patchwork Fri Jan 12 09:25:27 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Meng Li
X-Patchwork-Id: 187624
Return-Path:
Delivered-To: ouuuleilei@gmail.com
Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp58358dyc;
Fri, 12 Jan 2024 01:30:36 -0800 (PST)
X-Google-Smtp-Source:
AGHT+IGY6w35i6yfR/pG0WanEDvQ1humDyeODN2ARYMVdjTd1iJuN+HCmYEWC2jobV5d1g60DAPJ
X-Received: by 2002:a9d:5e9a:0:b0:6dd:d5c4:fb02 with SMTP id
f26-20020a9d5e9a000000b006ddd5c4fb02mr1216885otl.68.1705051836017;
Fri, 12 Jan 2024 01:30:36 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1705051835; cv=pass;
d=google.com; s=arc-20160816;
b=Cu46To9BsM3Hh4tB96lnWw4gfhjbG96FMpR2VeSRbsZGGTWo9/y1fOHeyEXg35NN/S
Vmx/HzQwCjZdzi+cfV3o7XA76MVvznXgMFrawUmEgwM3skwlttb0ZAAkkwI8DoL2oTyz
1UUKV0G45WJDANrLbJ67XkSxau3Fz7OTxe2vyExO01AiVD+H1M7vYCP/CWOKHxf7V6Kq
06rW4Mkw9Yk+4O6tdAJi1jFdB0ZpSKx9xNakc2j1tNRuMiAG+BDskTF3375c/W6dymK8
4KYZzBjLt0z8v5RRGqpwWtuOaEPvOWkTVAwlC6kywCLIuCEVlakUOjOhshu7mNZrGTcp
/Iyw==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20160816;
h=content-transfer-encoding:mime-version:list-unsubscribe
:list-subscribe:list-id:precedence:references:in-reply-to:message-id
:date:subject:cc:to:from:dkim-signature;
bh=XmBnlY6CcyhnNSPEQizfeQBw6AAo8AGdk2azpcvOOtI=;
fh=nN2m0xaI798KLC/uADbefK8m1UDDBgJzymhQTjzbuLw=;
b=vC3H0wvPNPbQTmwa4H84Is61JhkvpNtXq+oqu2uVu8U8dYkGryKzdbvgLQro709sPR
9W/F9zEk+hcJ/wmtDiwUFBRQ3r5OKjqSbXOF6INUmMzsrn9CDTeUALdEzsCqS2F0wjUq
otKDWLnKh9d7YeEC+M7o5w4f40cy3cBzwvYsQ6HJQ5uaGffYWWa1X8mYhUlzcXdel7+f
1ppe3XpMzHSwSGPE1gyuvNlDOvnqMCT//E1h4uUqzYAL6VbmmgQfcxKRQN/r+2m2Zp8X
oHVUIqMIf7TntsLVCKBxk11grxjriQlxXQ3nmEb4FfBD2nIv3XG2LsDERU5Ko6uF2o/z
lFZA==
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@amd.com header.s=selector1 header.b=3uas+V3m;
arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass
fromdomain=amd.com);
spf=pass (google.com: domain of
linux-kernel+bounces-24476-ouuuleilei=gmail.com@vger.kernel.org designates
2604:1380:40f1:3f00::1 as permitted sender)
smtp.mailfrom="linux-kernel+bounces-24476-ouuuleilei=gmail.com@vger.kernel.org";
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org.
[2604:1380:40f1:3f00::1])
by mx.google.com with ESMTPS id
k65-20020a632444000000b005c67196cbf5si2954623pgk.330.2024.01.12.01.30.35
for
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Fri, 12 Jan 2024 01:30:35 -0800 (PST)
Received-SPF: pass (google.com: domain of
linux-kernel+bounces-24476-ouuuleilei=gmail.com@vger.kernel.org designates
2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1;
Authentication-Results: mx.google.com;
dkim=pass header.i=@amd.com header.s=selector1 header.b=3uas+V3m;
arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass
fromdomain=amd.com);
spf=pass (google.com: domain of
linux-kernel+bounces-24476-ouuuleilei=gmail.com@vger.kernel.org designates
2604:1380:40f1:3f00::1 as permitted sender)
smtp.mailfrom="linux-kernel+bounces-24476-ouuuleilei=gmail.com@vger.kernel.org";
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com
Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org
[52.25.139.140])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id B9B20B23292
for ; Fri, 12 Jan 2024 09:27:57 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A4515DF1B;
Fri, 12 Jan 2024 09:26:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com
header.b="3uas+V3m"
Received: from NAM12-DM6-obe.outbound.protection.outlook.com
(mail-dm6nam12on2050.outbound.protection.outlook.com [40.107.243.50])
(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 D003A5D916;
Fri, 12 Jan 2024 09:26:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org;
spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=nk01hgNrSUr41e46Lerpb2JB0Rv8Fi8zQgjVha82mnRwfa+DXslZEpBuCBScfO7eMfBXcRTVmaa4CXG9lU/GYAsi2fevVMLNMcEhnGy6/3DDf/C15ZppszWIVfxlAoynnjqCKsmf396aMh18MjPXIdaKyhV4Q6g56MXnH0KWmVfGMcYKjIquVfE65fLhSk8Bjs+9oQStpiD1UB1WOY5EedRNQCTFaK2L0nlfVWorbwxHZP0E7Fpt44nq4kxkcx+OtvAsK5v/DUCUm8w9cEtt2fPIQCnbQT3PxQBXmwHIfiP9fiIkiB0iAguGNgZpr1v19ugQfKpJO6PaRW9reXheQQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=XmBnlY6CcyhnNSPEQizfeQBw6AAo8AGdk2azpcvOOtI=;
b=eA9pqmwfAIOGmCDF+Y42qCTSyH6kDURTaRE4Mw6VO1LDlI6+UAvMc3E7Hf7/XuIp4sC4hrYifg/xTrNGNAstbmAvZB5i7OBZ5P9r2GXg6ggNKyFsA3iV2Nu1iVXsqRT3p6NRBmOV094p2WK3ES3LYR5I7cgmi2kKgpcS3kch3WX3jHOCDhJ9ao7DtCccs56cPiF5c6i8uObAZ5Cg5PZbp2DEAfGrYVTKZe7+D+wpPCgqYHrujIuu7oQhqOquqOSAYRhvVrDVqdsFuGa0XPZF86kD7gQSIWhW3a30t9SiSyIOoClBM//sVeVllcyRV9+ccOgNiFa+k+eJST3g6GihSQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is
165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass
(p=quarantine sp=quarantine pct=100) action=none header.from=amd.com;
dkim=none (message not signed); arc=none (0)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=XmBnlY6CcyhnNSPEQizfeQBw6AAo8AGdk2azpcvOOtI=;
b=3uas+V3m/Cz1pdguYX4tZ0XABGQs4Z+mDQqtOyiQdgWGPrMzOWc58fxUTxJr6cvmM2ZiosTbbbO51WjeFHYwl+cXCxxDpdABHcmdIKmBw8CN7lfB2BYH5DRFX4Nm0uj2xKdSSgES2Yws8ScUanq764u9KxXQ/bKV9axfeC+c34Q=
Received: from DS7PR03CA0266.namprd03.prod.outlook.com (2603:10b6:5:3b3::31)
by DM6PR12MB4942.namprd12.prod.outlook.com (2603:10b6:5:1be::11) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.21; Fri, 12 Jan
2024 09:26:06 +0000
Received: from DS1PEPF00017095.namprd03.prod.outlook.com
(2603:10b6:5:3b3:cafe::21) by DS7PR03CA0266.outlook.office365.com
(2603:10b6:5:3b3::31) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.21 via Frontend
Transport; Fri, 12 Jan 2024 09:26:06 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17)
smtp.mailfrom=amd.com; dkim=none (message not signed)
header.d=none;dmarc=pass action=none header.from=amd.com;
Received-SPF: Pass (protection.outlook.com: domain of amd.com designates
165.204.84.17 as permitted sender) receiver=protection.outlook.com;
client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C
Received: from SATLEXMB04.amd.com (165.204.84.17) by
DS1PEPF00017095.mail.protection.outlook.com (10.167.17.138) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.7181.13 via Frontend Transport; Fri, 12 Jan 2024 09:26:06 +0000
Received: from jasmine-meng.amd.com (10.180.168.240) by SATLEXMB04.amd.com
(10.181.40.145) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 12 Jan
2024 03:26:01 -0600
From: Meng Li
To: "Rafael J . Wysocki" , Borislav Petkov
, Huang Rui
CC: , ,
, , Shuah Khan
, , "Nathan
Fontenot" , Deepak Sharma ,
Alex Deucher , Mario Limonciello
, Shimmer Huang , "Perry
Yuan" , Xiaojian Du , Viresh Kumar
, Borislav Petkov , "Oleksandr
Natalenko" , Meng Li , Wyes Karny
Subject: [PATCH V13 3/7] cpufreq: amd-pstate: Enable amd-pstate preferred core
supporting.
Date: Fri, 12 Jan 2024 17:25:27 +0800
Message-ID: <20240112092531.789841-4-li.meng@amd.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20240112092531.789841-1-li.meng@amd.com>
References: <20240112092531.789841-1-li.meng@amd.com>
Precedence: bulk
X-Mailing-List: linux-kernel@vger.kernel.org
List-Id:
List-Subscribe:
List-Unsubscribe:
MIME-Version: 1.0
X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DS1PEPF00017095:EE_|DM6PR12MB4942:EE_
X-MS-Office365-Filtering-Correlation-Id: da08a108-9595-4cd3-2a06-08dc1350815a
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info:
tQ8m7Sz0iYtMK8IpdAgLoJaRRIYFWA2HxhZAFVJVzoVL2iACd/3Ti3Qur3TVAqPWYXG1f3L5g5maiGbDXmZv3PMMBGUZM10FxzVQw9DPEwQdc8ZgNzkUAZ11Zipdr4YwjZdP9bf5DymiMKo3jDMjVltbUJMVoGTRi270p6A5v2q1EvhA+VgJBLihqYxaANh1AN41xh2F4qwDKsM/mmpg1OPDy4JGTpb0ZrRyCMoGm+qBi6FCWk2Ya5gfK3zNrOnyMlMYeSUTGFL05ccq8NwJP4UWlSm5kix/Z1XWbYrVMFe4mzhXeyhOrz3AJeR9lLUneZyjy8ccV7bGG1uEmtvciFwIH8alAmS++m9HcUxbHtTAyp9qgCp3lV7VfxY/LrUTvFjK+P7NjHi/YdI2fMt4uTuDE+PENi6YxV7ed4p3KVudA0XMVxVkar7PKZly2IZ2ShLxEphbjAUZ0F4nj0XD/IM2CDf0XJ6oqdlTu6rvmqwbx2V4dvnuCGS4gOMGzC/XMJ1bliFB7pbEkorMorzURQXdxZyXegtF7LMjkBR+l3P7MDJYfQ23rFBWUYGKhE5OaqXJ8xSXkn8U/JjfxKb/ss84ies5p6U4Ep8PWJm+NOPTlOk+1ADFoRuE80C+kgdSSaDWXBcywZW+mbJFPSu48DUYFBQxsMOUtdjv3vNYjyt45fjR+3eWTJZqN79NGtRh0xnCDdTdUo6wUjCOKbgsYxqs4f4NobOcks63vq3bYibOqN4McywWcz2EtNeQgTzDQQkrwi5p74FgobhF+VNhZQ==
X-Forefront-Antispam-Report:
CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(396003)(136003)(39860400002)(376002)(346002)(230922051799003)(451199024)(64100799003)(1800799012)(82310400011)(186009)(40470700004)(46966006)(36840700001)(336012)(83380400001)(1076003)(16526019)(426003)(47076005)(26005)(2616005)(36860700001)(316002)(7416002)(6636002)(110136005)(54906003)(70206006)(5660300002)(4326008)(70586007)(8936002)(8676002)(6666004)(7696005)(86362001)(478600001)(41300700001)(2906002)(36756003)(356005)(82740400003)(81166007)(40460700003)(40480700001)(36900700001);DIR:OUT;SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2024 09:26:06.7311
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
da08a108-9595-4cd3-2a06-08dc1350815a
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com]
X-MS-Exchange-CrossTenant-AuthSource:
DS1PEPF00017095.namprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4942
X-getmail-retrieved-from-mailbox: INBOX
X-GMAIL-THRID: 1787876434276018820
X-GMAIL-MSGID: 1787876434276018820
amd-pstate driver utilizes the functions and data structures
provided by the ITMT architecture to enable the scheduler to
favor scheduling on cores which can be get a higher frequency
with lower voltage. We call it amd-pstate preferrred core.
Here sched_set_itmt_core_prio() is called to set priorities and
sched_set_itmt_support() is called to enable ITMT feature.
amd-pstate driver uses the highest performance value to indicate
the priority of CPU. The higher value has a higher priority.
The initial core rankings are set up by amd-pstate when the
system boots.
Add a variable hw_prefcore in cpudata structure. It will check
if the processor and power firmware support preferred core
feature.
Add one new early parameter `disable` to allow user to disable
the preferred core.
Only when hardware supports preferred core and user set `enabled`
in early parameter, amd pstate driver supports preferred core featue.
Tested-by: Oleksandr Natalenko
Reviewed-by: Huang Rui
Reviewed-by: Wyes Karny
Reviewed-by: Mario Limonciello
Co-developed-by: Perry Yuan
Signed-off-by: Perry Yuan
Signed-off-by: Meng Li
---
drivers/cpufreq/amd-pstate.c | 131 ++++++++++++++++++++++++++++++++---
include/linux/amd-pstate.h | 4 ++
2 files changed, 127 insertions(+), 8 deletions(-)
diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index 1f6186475715..9c2790753f99 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -37,6 +37,7 @@
#include
#include
#include
+#include
#include
#include
@@ -49,6 +50,7 @@
#define AMD_PSTATE_TRANSITION_LATENCY 20000
#define AMD_PSTATE_TRANSITION_DELAY 1000
+#define AMD_PSTATE_PREFCORE_THRESHOLD 166
/*
* TODO: We need more time to fine tune processors with shared memory solution
@@ -64,6 +66,7 @@ static struct cpufreq_driver amd_pstate_driver;
static struct cpufreq_driver amd_pstate_epp_driver;
static int cppc_state = AMD_PSTATE_UNDEFINED;
static bool cppc_enabled;
+static bool amd_pstate_prefcore = true;
/*
* AMD Energy Preference Performance (EPP)
@@ -297,13 +300,14 @@ static int pstate_init_perf(struct amd_cpudata *cpudata)
if (ret)
return ret;
- /*
- * TODO: Introduce AMD specific power feature.
- *
- * CPPC entry doesn't indicate the highest performance in some ASICs.
+ /* For platforms that do not support the preferred core feature, the
+ * highest_pef may be configured with 166 or 255, to avoid max frequency
+ * calculated wrongly. we take the AMD_CPPC_HIGHEST_PERF(cap1) value as
+ * the default max perf.
*/
- highest_perf = amd_get_highest_perf();
- if (highest_perf > AMD_CPPC_HIGHEST_PERF(cap1))
+ if (cpudata->hw_prefcore)
+ highest_perf = AMD_PSTATE_PREFCORE_THRESHOLD;
+ else
highest_perf = AMD_CPPC_HIGHEST_PERF(cap1);
WRITE_ONCE(cpudata->highest_perf, highest_perf);
@@ -324,8 +328,9 @@ static int cppc_init_perf(struct amd_cpudata *cpudata)
if (ret)
return ret;
- highest_perf = amd_get_highest_perf();
- if (highest_perf > cppc_perf.highest_perf)
+ if (cpudata->hw_prefcore)
+ highest_perf = AMD_PSTATE_PREFCORE_THRESHOLD;
+ else
highest_perf = cppc_perf.highest_perf;
WRITE_ONCE(cpudata->highest_perf, highest_perf);
@@ -706,6 +711,80 @@ static void amd_perf_ctl_reset(unsigned int cpu)
wrmsrl_on_cpu(cpu, MSR_AMD_PERF_CTL, 0);
}
+/*
+ * Set amd-pstate preferred core enable can't be done directly from cpufreq callbacks
+ * due to locking, so queue the work for later.
+ */
+static void amd_pstste_sched_prefcore_workfn(struct work_struct *work)
+{
+ sched_set_itmt_support();
+}
+static DECLARE_WORK(sched_prefcore_work, amd_pstste_sched_prefcore_workfn);
+
+/*
+ * Get the highest performance register value.
+ * @cpu: CPU from which to get highest performance.
+ * @highest_perf: Return address.
+ *
+ * Return: 0 for success, -EIO otherwise.
+ */
+static int amd_pstate_get_highest_perf(int cpu, u32 *highest_perf)
+{
+ int ret;
+
+ if (boot_cpu_has(X86_FEATURE_CPPC)) {
+ u64 cap1;
+
+ ret = rdmsrl_safe_on_cpu(cpu, MSR_AMD_CPPC_CAP1, &cap1);
+ if (ret)
+ return ret;
+ WRITE_ONCE(*highest_perf, AMD_CPPC_HIGHEST_PERF(cap1));
+ } else {
+ u64 cppc_highest_perf;
+
+ ret = cppc_get_highest_perf(cpu, &cppc_highest_perf);
+ if (ret)
+ return ret;
+ WRITE_ONCE(*highest_perf, cppc_highest_perf);
+ }
+
+ return (ret);
+}
+
+#define CPPC_MAX_PERF U8_MAX
+
+static void amd_pstate_init_prefcore(struct amd_cpudata *cpudata)
+{
+ int ret, prio;
+ u32 highest_perf;
+
+ ret = amd_pstate_get_highest_perf(cpudata->cpu, &highest_perf);
+ if (ret)
+ return;
+
+ cpudata->hw_prefcore = true;
+ /* check if CPPC preferred core feature is enabled*/
+ if (highest_perf < CPPC_MAX_PERF)
+ prio = (int)highest_perf;
+ else {
+ pr_debug("AMD CPPC preferred core is unsupported!\n");
+ cpudata->hw_prefcore = false;
+ return;
+ }
+
+ if (!amd_pstate_prefcore)
+ return;
+
+ /*
+ * The priorities can be set regardless of whether or not
+ * sched_set_itmt_support(true) has been called and it is valid to
+ * update them at any time after it has been called.
+ */
+ sched_set_itmt_core_prio(prio, cpudata->cpu);
+
+ schedule_work(&sched_prefcore_work);
+}
+
static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
{
int min_freq, max_freq, nominal_freq, lowest_nonlinear_freq, ret;
@@ -727,6 +806,8 @@ static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
cpudata->cpu = policy->cpu;
+ amd_pstate_init_prefcore(cpudata);
+
ret = amd_pstate_init_perf(cpudata);
if (ret)
goto free_cpudata1;
@@ -877,6 +958,17 @@ static ssize_t show_amd_pstate_highest_perf(struct cpufreq_policy *policy,
return sysfs_emit(buf, "%u\n", perf);
}
+static ssize_t show_amd_pstate_hw_prefcore(struct cpufreq_policy *policy,
+ char *buf)
+{
+ bool hw_prefcore;
+ struct amd_cpudata *cpudata = policy->driver_data;
+
+ hw_prefcore = READ_ONCE(cpudata->hw_prefcore);
+
+ return sysfs_emit(buf, "%s\n", str_enabled_disabled(hw_prefcore));
+}
+
static ssize_t show_energy_performance_available_preferences(
struct cpufreq_policy *policy, char *buf)
{
@@ -1074,18 +1166,27 @@ static ssize_t status_store(struct device *a, struct device_attribute *b,
return ret < 0 ? ret : count;
}
+static ssize_t prefcore_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ return sysfs_emit(buf, "%s\n", str_enabled_disabled(amd_pstate_prefcore));
+}
+
cpufreq_freq_attr_ro(amd_pstate_max_freq);
cpufreq_freq_attr_ro(amd_pstate_lowest_nonlinear_freq);
cpufreq_freq_attr_ro(amd_pstate_highest_perf);
+cpufreq_freq_attr_ro(amd_pstate_hw_prefcore);
cpufreq_freq_attr_rw(energy_performance_preference);
cpufreq_freq_attr_ro(energy_performance_available_preferences);
static DEVICE_ATTR_RW(status);
+static DEVICE_ATTR_RO(prefcore);
static struct freq_attr *amd_pstate_attr[] = {
&amd_pstate_max_freq,
&amd_pstate_lowest_nonlinear_freq,
&amd_pstate_highest_perf,
+ &amd_pstate_hw_prefcore,
NULL,
};
@@ -1093,6 +1194,7 @@ static struct freq_attr *amd_pstate_epp_attr[] = {
&amd_pstate_max_freq,
&amd_pstate_lowest_nonlinear_freq,
&amd_pstate_highest_perf,
+ &amd_pstate_hw_prefcore,
&energy_performance_preference,
&energy_performance_available_preferences,
NULL,
@@ -1100,6 +1202,7 @@ static struct freq_attr *amd_pstate_epp_attr[] = {
static struct attribute *pstate_global_attributes[] = {
&dev_attr_status.attr,
+ &dev_attr_prefcore.attr,
NULL
};
@@ -1151,6 +1254,8 @@ static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy)
cpudata->cpu = policy->cpu;
cpudata->epp_policy = 0;
+ amd_pstate_init_prefcore(cpudata);
+
ret = amd_pstate_init_perf(cpudata);
if (ret)
goto free_cpudata1;
@@ -1568,7 +1673,17 @@ static int __init amd_pstate_param(char *str)
return amd_pstate_set_driver(mode_idx);
}
+
+static int __init amd_prefcore_param(char *str)
+{
+ if (!strcmp(str, "disable"))
+ amd_pstate_prefcore = false;
+
+ return 0;
+}
+
early_param("amd_pstate", amd_pstate_param);
+early_param("amd_prefcore", amd_prefcore_param);
MODULE_AUTHOR("Huang Rui ");
MODULE_DESCRIPTION("AMD Processor P-state Frequency Driver");
diff --git a/include/linux/amd-pstate.h b/include/linux/amd-pstate.h
index 6ad02ad9c7b4..68fc1bd8d851 100644
--- a/include/linux/amd-pstate.h
+++ b/include/linux/amd-pstate.h
@@ -52,6 +52,9 @@ struct amd_aperf_mperf {
* @prev: Last Aperf/Mperf/tsc count value read from register
* @freq: current cpu frequency value
* @boost_supported: check whether the Processor or SBIOS supports boost mode
+ * @hw_prefcore: check whether HW supports preferred core featue.
+ * Only when hw_prefcore and early prefcore param are true,
+ * AMD P-State driver supports preferred core featue.
* @epp_policy: Last saved policy used to set energy-performance preference
* @epp_cached: Cached CPPC energy-performance preference value
* @policy: Cpufreq policy value
@@ -85,6 +88,7 @@ struct amd_cpudata {
u64 freq;
bool boost_supported;
+ bool hw_prefcore;
/* EPP feature related attributes*/
s16 epp_policy;
From patchwork Fri Jan 12 09:25:28 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Meng Li
X-Patchwork-Id: 187618
Return-Path:
Delivered-To: ouuuleilei@gmail.com
Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp57460dyc;
Fri, 12 Jan 2024 01:28:09 -0800 (PST)
X-Google-Smtp-Source:
AGHT+IEtB3q72Q/ywIoUTc2Mu27zbVORT8EionAISBaffQcC22FG2NStJ+NFmq39fOjq5ANPOyR0
X-Received: by 2002:a05:6214:2a8e:b0:680:c83a:346 with SMTP id
jr14-20020a0562142a8e00b00680c83a0346mr647683qvb.126.1705051689301;
Fri, 12 Jan 2024 01:28:09 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1705051689; cv=pass;
d=google.com; s=arc-20160816;
b=vowNarBkE/Jf8R6X8kkBRsjgFp1niqINDiSXPkeUTygIoANHqNiDcGL+JxIACc3+Ic
chXPW/UFFF5qZLDe8Xm8vvuhqXp0ycGJnHcRlVvS08wR865edUbn0LWhC5g7GpwnXhoi
noP7/rZLJykrR6Jo307FrygaIGDiOAbeFq5Y3vpziCHsv3VbBGGMpga2HEBC2OQiW4Vy
HMzmgyTEQZERFapt/hJtjAE8UD4Q4hFuccTCRTNW4d3h5fnNj0RPVYS5+EvaK0NZqg94
UGoh/NkvAMB6/6rNTZuJ4Gp1v7VF9BRduaBmu+c+ZQtPXeFvSdmIN/4kYY3BLWEnB5C/
DvDA==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20160816;
h=content-transfer-encoding:mime-version:list-unsubscribe
:list-subscribe:list-id:precedence:references:in-reply-to:message-id
:date:subject:cc:to:from:dkim-signature;
bh=hu+YEu2Sbk5GsR0yEizZBiZEKUntkXmdXSeViAKSt+8=;
fh=PfhR5ZB3IHZD1uvzuazx5UXTOhnwF6WV/gS/oOi5eYk=;
b=pcoo11XNZu82yI1ufeAEZdBZsBkmkOAbhukjw09XW8FeHQL1fgut907f3by9npeg14
aL9Ba8zo/54oGCO6jExcEean9ex/GZwj1n/2WYDnNxq6woH4p9W1mrB4CGv0H4Yd/pOE
pMQdK/vlwawHPrqGtvCYlwUTUKZKPqpoCiRJKb88AuFQnbFTENBnenEgd7xvOBcR45WH
RrJIDukXQH5SXvR9y/cOmG780otpeKb82SZhsA9mRRZ4bOkSdcVSdGBLSxWofq5DR9g8
u3JkKiLEKGbXTj6as+EjUpX1wUBgu3TOXxmWRwop6qpU+RB2jf6AbNFirgduEVpy5+5N
6tWw==
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@amd.com header.s=selector1 header.b="VaWReXv/";
arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass
fromdomain=amd.com);
spf=pass (google.com: domain of
linux-kernel+bounces-24477-ouuuleilei=gmail.com@vger.kernel.org designates
147.75.199.223 as permitted sender)
smtp.mailfrom="linux-kernel+bounces-24477-ouuuleilei=gmail.com@vger.kernel.org";
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223])
by mx.google.com with ESMTPS id
m5-20020a0ce8c5000000b00680c85d6553si500829qvo.361.2024.01.12.01.28.09
for
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Fri, 12 Jan 2024 01:28:09 -0800 (PST)
Received-SPF: pass (google.com: domain of
linux-kernel+bounces-24477-ouuuleilei=gmail.com@vger.kernel.org designates
147.75.199.223 as permitted sender) client-ip=147.75.199.223;
Authentication-Results: mx.google.com;
dkim=pass header.i=@amd.com header.s=selector1 header.b="VaWReXv/";
arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass
fromdomain=amd.com);
spf=pass (google.com: domain of
linux-kernel+bounces-24477-ouuuleilei=gmail.com@vger.kernel.org designates
147.75.199.223 as permitted sender)
smtp.mailfrom="linux-kernel+bounces-24477-ouuuleilei=gmail.com@vger.kernel.org";
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com
Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org
[52.25.139.140])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 10B6E1C25169
for ; Fri, 12 Jan 2024 09:28:09 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 711EF5DF2E;
Fri, 12 Jan 2024 09:26:19 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com
header.b="VaWReXv/"
Received: from NAM04-MW2-obe.outbound.protection.outlook.com
(mail-mw2nam04on2078.outbound.protection.outlook.com [40.107.101.78])
(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 DD2D85DF02;
Fri, 12 Jan 2024 09:26:14 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org;
spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=FXou3Mbuf5/GZpTYPGmzVL+NRyHGS66pVFyMgowKRw9NTgGKH1pZU011O8sWAdHAXuMQ2Uh393PjbZrnh2lT30NZg0/7nHtoldPKNxeh5k8N72FebLhbw1iFAywij8FlQJ7bGU+qauDhv6cgmWQXqYW+UgSEiKBY82min2im/+9SVQlKVPMdD7beoBgGLZwKWiJb17l17/B21jfJYW/drKf2Lacqp+EZgJvT4TeD1gNnAG6hIbmqFbYLL3/A4KW6qZYw9OS0fFrbwskRgXjytJfUOGuxb6EPXT22AqYas2Du7f0F5QcwyVpb1AiDnzW2urABw09diZkspN1ednYYcg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=hu+YEu2Sbk5GsR0yEizZBiZEKUntkXmdXSeViAKSt+8=;
b=brFxmHJNUPb+hnYhMbMZR5vlZmkDcnAeauLCmP+mHvvRTp8Q0y/ThcIeXnTIgQV1QC/t818j1dVShdeC6IyF3CcgdYuJpE8IsYOZEYb/XrTmL6q8W5YMBHgOugiIV7e2ZQWY8zqbItQ5gy649CTN+8EwAa6w1jJGPVLXCRdj1YIe779lh9EDdssgaU221i0URICCyyMI8edzmU6o6/xUN2WhbHJCzKpKPp7yH9j3Ov+CA99WrGpjKFm2kL9FRLU2VU8YSr9CRj0rr/u7b07aWiZSj1KAhmDtT616oAp2KIwPGbK14Il1SMZ6nFwbMmdFCjrRadyxdnSux9FBIy2d6Q==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is
165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass
(p=quarantine sp=quarantine pct=100) action=none header.from=amd.com;
dkim=none (message not signed); arc=none (0)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=hu+YEu2Sbk5GsR0yEizZBiZEKUntkXmdXSeViAKSt+8=;
b=VaWReXv/BPR8SQ0iwXg1ZA0MYNAE8FSTwOJvPqNIzFlex3dzT3lo6PA1K16Jt4FJXi1qFxXcEvAPK2tdvNExm9e7q6CB+LwJ/5PhCgOjPrrRQE142UMAV9+1Rs8/mMLoPkhboMDY4A69uZIK5fqqZ0dG74G/89PWaD1WYP5vZqM=
Received: from DM6PR07CA0091.namprd07.prod.outlook.com (2603:10b6:5:337::24)
by MW3PR12MB4362.namprd12.prod.outlook.com (2603:10b6:303:5d::19) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.21; Fri, 12 Jan
2024 09:26:12 +0000
Received: from DS1PEPF0001708E.namprd03.prod.outlook.com
(2603:10b6:5:337:cafe::ce) by DM6PR07CA0091.outlook.office365.com
(2603:10b6:5:337::24) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.19 via Frontend
Transport; Fri, 12 Jan 2024 09:26:11 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17)
smtp.mailfrom=amd.com; dkim=none (message not signed)
header.d=none;dmarc=pass action=none header.from=amd.com;
Received-SPF: Pass (protection.outlook.com: domain of amd.com designates
165.204.84.17 as permitted sender) receiver=protection.outlook.com;
client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C
Received: from SATLEXMB04.amd.com (165.204.84.17) by
DS1PEPF0001708E.mail.protection.outlook.com (10.167.17.134) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.7181.14 via Frontend Transport; Fri, 12 Jan 2024 09:26:11 +0000
Received: from jasmine-meng.amd.com (10.180.168.240) by SATLEXMB04.amd.com
(10.181.40.145) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 12 Jan
2024 03:26:06 -0600
From: Meng Li
To: "Rafael J . Wysocki" , Borislav Petkov
, Huang Rui
CC: , ,
, , Shuah Khan
, , "Nathan
Fontenot" , Deepak Sharma ,
Alex Deucher , Mario Limonciello
, Shimmer Huang , "Perry
Yuan" , Xiaojian Du , Viresh Kumar
, Borislav Petkov , "Oleksandr
Natalenko" , Meng Li , Perry Yuan
Subject: [PATCH V13 4/7] cpufreq: Add a notification message that the highest
perf has changed
Date: Fri, 12 Jan 2024 17:25:28 +0800
Message-ID: <20240112092531.789841-5-li.meng@amd.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20240112092531.789841-1-li.meng@amd.com>
References: <20240112092531.789841-1-li.meng@amd.com>
Precedence: bulk
X-Mailing-List: linux-kernel@vger.kernel.org
List-Id:
List-Subscribe:
List-Unsubscribe:
MIME-Version: 1.0
X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DS1PEPF0001708E:EE_|MW3PR12MB4362:EE_
X-MS-Office365-Filtering-Correlation-Id: cf901fd6-485e-4886-6d4b-08dc1350844d
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info:
2c7Xt0F8oRAAsEvVg8nWjqLtEW7Bl8HjKEWOBw8iiDZeQ761X0UWj2HrOqGYHusYnB1qticff00LtnngJbLn0061NHwt+23rwj9udCUBKbmNv6YkUbjZSSkFhaAh2a5EBGq7SrEwLVVuL1zr7ZlJONoY9iCWiLLMbIhxYc/uR+4jGkHcRGB9tF+nAAZ3bcp+97A5wIrs8Lhv80D8X1l2iQz2i+twPI1/3DJG6rHinYqpNAa+O/s8wWH9k74zXuldrcc5lEa1vnB3SEY4tUogPLqKTDMpYdx+FkFp7bIZ+bOeQ8X5F3HUHMX7Mtmg1Y3YEb2Gu4ykHcMmwjsZ+Kj1WNKkzSPMl4oSNPtz54ZhcRuTCGffHaM0YY2rVQ4pCkadizRJgrxm5p6x0GMg56mcs1D2uTIB27m2XaGRnW0JIHjWKKE4JtkuxWhJgd2rszvFQLqjLaU05ier/8XMvm1Xwf66Pfxt1DJW3/Nl1otS1eXyTAMJgYj92qrfvxZ7sCWasJv3OM63t1He4n+3o1KeEXPnJ108LQjeonnhpDl9Q9faCMUsFMBV0EtzJesUPy1yW5+r8YC2u6jn9SZmFNL1fTkXOObJbH1j5GT7TZXPlwYWasMzezikCnDFQ0AJWmhwevinICavka+R45o7JDTvZWgMlX/5rFeeI/VVJdF4C2O+FRSWDHeC0o75Dt9RfA+H9TuLutrrE9MlYfBAmpIxLsGXN8ceCOUQtNH5GsxavEASdz0DpkGifMP3kkM44uHMZQH66/LP/JR8gljeqKTQ64gGkQG2doR+Wl2CkBH0XMY=
X-Forefront-Antispam-Report:
CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(346002)(39860400002)(136003)(376002)(396003)(230922051799003)(82310400011)(1800799012)(64100799003)(451199024)(186009)(46966006)(36840700001)(40470700004)(426003)(16526019)(86362001)(83380400001)(41300700001)(7696005)(6666004)(966005)(336012)(478600001)(2616005)(26005)(1076003)(6636002)(47076005)(4326008)(82740400003)(40480700001)(36756003)(70586007)(70206006)(8676002)(8936002)(54906003)(316002)(81166007)(110136005)(40460700003)(7416002)(2906002)(356005)(5660300002)(15650500001)(36860700001)(226483002)(36900700001);DIR:OUT;SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2024 09:26:11.6808
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
cf901fd6-485e-4886-6d4b-08dc1350844d
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com]
X-MS-Exchange-CrossTenant-AuthSource:
DS1PEPF0001708E.namprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4362
X-getmail-retrieved-from-mailbox: INBOX
X-GMAIL-THRID: 1787876280021704499
X-GMAIL-MSGID: 1787876280021704499
BIOS issues the notify 0x85 to OS that the highest performance
changed. And it will affect the ranking of the preferred core.
AMD-pstate driver will set the priority of cores based on the
preferred core ranking.
Tested-by: Oleksandr Natalenko
Reviewed-by: Mario Limonciello
Reviewed-by: Huang Rui
Reviewed-by: Perry Yuan
Signed-off-by: Meng Li
Link: https://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html#processor-device-notification-values
---
drivers/acpi/processor_driver.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
index 4bd16b3f0781..67db60eda370 100644
--- a/drivers/acpi/processor_driver.c
+++ b/drivers/acpi/processor_driver.c
@@ -27,6 +27,7 @@
#define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80
#define ACPI_PROCESSOR_NOTIFY_POWER 0x81
#define ACPI_PROCESSOR_NOTIFY_THROTTLING 0x82
+#define ACPI_PROCESSOR_NOTIFY_HIGEST_PERF_CHANGED 0x85
MODULE_AUTHOR("Paul Diefenbaugh");
MODULE_DESCRIPTION("ACPI Processor Driver");
@@ -83,6 +84,11 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
acpi_bus_generate_netlink_event(device->pnp.device_class,
dev_name(&device->dev), event, 0);
break;
+ case ACPI_PROCESSOR_NOTIFY_HIGEST_PERF_CHANGED:
+ cpufreq_update_limits(pr->id);
+ acpi_bus_generate_netlink_event(device->pnp.device_class,
+ dev_name(&device->dev), event, 0);
+ break;
default:
acpi_handle_debug(handle, "Unsupported event [0x%x]\n", event);
break;
From patchwork Fri Jan 12 09:25:29 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Meng Li
X-Patchwork-Id: 187619
Return-Path:
Delivered-To: ouuuleilei@gmail.com
Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp57557dyc;
Fri, 12 Jan 2024 01:28:28 -0800 (PST)
X-Google-Smtp-Source:
AGHT+IFwWPVnIaNjJnzuBrSoWuGqWqXXlZKQyoF6HNOo6uczCQ/zODQV4EXF7X5e3NYHLBCmIQCY
X-Received: by 2002:a17:903:41ce:b0:1d4:25d5:5a75 with SMTP id
u14-20020a17090341ce00b001d425d55a75mr900773ple.74.1705051707782;
Fri, 12 Jan 2024 01:28:27 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1705051707; cv=pass;
d=google.com; s=arc-20160816;
b=KI2VScLfBTiesQX0Uy0FWJ5oHywbZb8VCBQGWUHIsjYRlvgp0btAyZOvngUVFe8xL9
PeJ7PgQj/swT2G+xMBbr2z7gYrcw3xZ7/eoHjSVoaADvI0EHN/l+KaYKIfcCiwPsIItj
8awz+spOFNgHlI0ehzdc00BN7c0hyzbyQaiMsZqOqjyDkb61vTHtyA7pvNsMw+mH6RS2
Gp42eThFD4qVoPCrIVquoJx5m+SUoVCFL5E8nCF5Dpg/XiAT25Aw0hQByvGJmet8D+Dj
Mz8Cdrqr6ylGwIOcoDPNuULtd0br1WeCyz0VEPsQRn9qVaxxpeoZZJPM85JbXljkg/b/
RolQ==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20160816;
h=content-transfer-encoding:mime-version:list-unsubscribe
:list-subscribe:list-id:precedence:references:in-reply-to:message-id
:date:subject:cc:to:from:dkim-signature;
bh=fX2Ta/Gv798M7peRlFChK9xqESpeKi5VXhhwayFgnPw=;
fh=pdjV0NPE8OZoZBx2M8aim9FZCatuc1gLLlAf1G+JhNs=;
b=l9NKNuMTBnLgjnEeyypD8nnZYP8M7vKUDff67658nj0nt1HmdQ+k1cNHjj+h0AO4tr
bip+uJmUbAT8ApqPw01OOYm8VoUO9ZVcag3YgINdvF28Kgkg95bShEvSUY/UQllqdN3R
5UYUEcmqkEpqJZ3zguOBGsAMKfCtWTpzBLsP4qod2vley5rwCOGiMT7zzHKwwCNDnMZc
NXg5Ub8A38V5FvM2sM/GRFCGgNZput3KixQ7cPC1F78CvR/H6TY9ZrVqDIk+nC8Htzz7
KV6OaM28bZ0CXqulMyzXw8LPLzrhRiLeN5ugXbJzpqq5zDoYT36FaMxbS6iuVmxs1scl
Y8zg==
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@amd.com header.s=selector1 header.b=Iqf1X4UO;
arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass
fromdomain=amd.com);
spf=pass (google.com: domain of
linux-kernel+bounces-24478-ouuuleilei=gmail.com@vger.kernel.org designates
139.178.88.99 as permitted sender)
smtp.mailfrom="linux-kernel+bounces-24478-ouuuleilei=gmail.com@vger.kernel.org";
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99])
by mx.google.com with ESMTPS id
t21-20020a170902b21500b001d3e11cf5ebsi2879318plr.34.2024.01.12.01.28.27
for
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Fri, 12 Jan 2024 01:28:27 -0800 (PST)
Received-SPF: pass (google.com: domain of
linux-kernel+bounces-24478-ouuuleilei=gmail.com@vger.kernel.org designates
139.178.88.99 as permitted sender) client-ip=139.178.88.99;
Authentication-Results: mx.google.com;
dkim=pass header.i=@amd.com header.s=selector1 header.b=Iqf1X4UO;
arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass
fromdomain=amd.com);
spf=pass (google.com: domain of
linux-kernel+bounces-24478-ouuuleilei=gmail.com@vger.kernel.org designates
139.178.88.99 as permitted sender)
smtp.mailfrom="linux-kernel+bounces-24478-ouuuleilei=gmail.com@vger.kernel.org";
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com
Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org
[52.25.139.140])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8AF74286AB4
for ; Fri, 12 Jan 2024 09:28:27 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8DC9E5DF3D;
Fri, 12 Jan 2024 09:26:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com
header.b="Iqf1X4UO"
Received: from NAM10-BN7-obe.outbound.protection.outlook.com
(mail-bn7nam10on2056.outbound.protection.outlook.com [40.107.92.56])
(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 05C3D5DF32;
Fri, 12 Jan 2024 09:26:21 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org;
spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=exytUt1xftiXhkyHV9ftWsCUGF4k6emydwSj/jvxvJRqmLO9A0PsxUrwYL4no5SSlJTw55QT4AsmNRdqcYz/ai0xiItcRPVxqr7vqhbfhm3dPmVLsErXS0Suo3m9OOOwNkDj75ltvOIDlGMgD821KalLKyw75NqqY0yTWTQoTc7sURK1k4EsTwb2YWyysMuAwSLjdACVxSrp6Z5V5RMDVEoNkSaSRFqJIL7U+koqDpfeaXxmfXYbqVyZNxG9dXQ0RQ6slkwdAXSTR0y5RYpAyvOOfAGKN26zNA4ewMtuatvIyF3E+kUn9ctEe9grFMsa/xlTC48GyPLKlpF5RATguA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=fX2Ta/Gv798M7peRlFChK9xqESpeKi5VXhhwayFgnPw=;
b=hEjiBCuS9mBdgTGC8GTVmReKDFuNH4PfUjQOATyMYjJVeZic2Rg6ALodeYvT1CXxrACQpu3eZTaEs/AetEFJuHmO04rMJ5c1jru2vSIeQSsWJ1gNYpTua4Fe+YgA6P47We6iMW9P0sdN+FouHGmYoXLUBhJPw+Y/KoAY7Ji7O2KZmeOdJHJPWNfdlRUkoQF2tQEmjkmPAgElc+0wAfrt6Xf6cdmazE+1osZxnfHvQ5Yrqy8xF5rPL141bjk5AKh5cIlN2zxm5D5ysfo9E+ZyEv/gmmBKjGZ9l37zBc/agLGEOyQtko2joZ1SW4pRD3h7VPg60rY2150B8W98S6n5Rw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is
165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass
(p=quarantine sp=quarantine pct=100) action=none header.from=amd.com;
dkim=none (message not signed); arc=none (0)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=fX2Ta/Gv798M7peRlFChK9xqESpeKi5VXhhwayFgnPw=;
b=Iqf1X4UOCDZagrj/7NYPxuXT6jK7M1Luu9sGDZoXYN3/sk/QJA/wfcv6S/Qd+b7DdMTQYWWq3XnXD2nxcL+bPpoKIestQ0xif4tu2TUfwS4qAq/EQniR4V2M14A9jqoj9rIDwdk/cD5Nt/0fcmIyYg3m90NPnAcESHwH1GDvMDw=
Received: from DM6PR03CA0035.namprd03.prod.outlook.com (2603:10b6:5:40::48) by
CH3PR12MB9429.namprd12.prod.outlook.com (2603:10b6:610:1c9::19) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.21; Fri, 12 Jan
2024 09:26:17 +0000
Received: from DS1PEPF00017091.namprd03.prod.outlook.com
(2603:10b6:5:40:cafe::63) by DM6PR03CA0035.outlook.office365.com
(2603:10b6:5:40::48) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.18 via Frontend
Transport; Fri, 12 Jan 2024 09:26:17 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17)
smtp.mailfrom=amd.com; dkim=none (message not signed)
header.d=none;dmarc=pass action=none header.from=amd.com;
Received-SPF: Pass (protection.outlook.com: domain of amd.com designates
165.204.84.17 as permitted sender) receiver=protection.outlook.com;
client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C
Received: from SATLEXMB04.amd.com (165.204.84.17) by
DS1PEPF00017091.mail.protection.outlook.com (10.167.17.133) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.7181.14 via Frontend Transport; Fri, 12 Jan 2024 09:26:17 +0000
Received: from jasmine-meng.amd.com (10.180.168.240) by SATLEXMB04.amd.com
(10.181.40.145) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 12 Jan
2024 03:26:11 -0600
From: Meng Li
To: "Rafael J . Wysocki" , Borislav Petkov
, Huang Rui
CC: , ,
, , Shuah Khan
, , "Nathan
Fontenot" , Deepak Sharma ,
Alex Deucher , Mario Limonciello
, Shimmer Huang , "Perry
Yuan" , Xiaojian Du , Viresh Kumar
, Borislav Petkov , "Oleksandr
Natalenko" , Meng Li , Wyes Karny
, Perry Yuan
Subject: [PATCH V13 5/7] cpufreq: amd-pstate: Update amd-pstate preferred core
ranking dynamically
Date: Fri, 12 Jan 2024 17:25:29 +0800
Message-ID: <20240112092531.789841-6-li.meng@amd.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20240112092531.789841-1-li.meng@amd.com>
References: <20240112092531.789841-1-li.meng@amd.com>
Precedence: bulk
X-Mailing-List: linux-kernel@vger.kernel.org
List-Id:
List-Subscribe:
List-Unsubscribe:
MIME-Version: 1.0
X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DS1PEPF00017091:EE_|CH3PR12MB9429:EE_
X-MS-Office365-Filtering-Correlation-Id: 5efb09fd-cc5a-4e33-4b60-08dc13508780
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info:
xEBKJUOWoef62IBXM8x9t6OGE7ANAhkp/6Uojhf9DVsG2LYi+B9Yqe4BSY9JvSL7Lsg0xvNYfkgKYJ8ayBfHm5pS4gi3YoYXn13+vJ4cR+CZCeBmslcwJdOobeqApoU1+g8iBkrrG5n47qmpqwowHGSiCtjkCM1RpDbFidYPIn8zbmc19mfAdzvtpenBVE6ugWY3MTCAmcqHawjGwWOYiZs7/PHET5twhPYwGEtTOUT8f7v9nxTITrCquQob5h5+0SHNrIy+55t4dJCls8DaubvCA+kF/yBCg/D5BEgRdseuR8hkEhOBEaIhVtND9ukKQYa8y/Gv6OolgNRy1LnIDn2Yih2qI3uLKSJCJ6X/kwompFyIDDkYpez9seVA228ZL7qeetkUn2oPpBbBYyxSAgjm9SXhZ0LVrIsBBWdEM8GgR0aa/kV5XuO/s1OHFJtxfr2LZwCpIyORnQ/Qd1NBmaNbxJUFntVObNjRoEWmU+cBCTE2L+498T3hAKZ/7bJ6Cj3Sox7dWUBRgTjIeN2tpdK5JYPIWmWcGVWw57oA0V8K9aHvfAC1ypCNOahmcsOVVUi3v0tD3Ix4RCueqYYpynqLIP9RJNJG4DyVn3O7D5stghPFTf6sAE2GiFMUEbtFcFv2ZuHa4eeERH68ay10aswvJ/WuibdPpV/1UzR381m/8j+DLxes40BJN09JhlRNHmz4sBPHTei2cza8ZdjNOF2wvkbJ152epeCiWPUdV2vC3nyiGNluh851cuR48ItpoeggMt21Tqj4Ww870wuCWA==
X-Forefront-Antispam-Report:
CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(346002)(39860400002)(376002)(396003)(136003)(230922051799003)(451199024)(64100799003)(82310400011)(186009)(1800799012)(36840700001)(46966006)(40470700004)(7696005)(6666004)(478600001)(426003)(336012)(26005)(1076003)(16526019)(2616005)(6636002)(316002)(36756003)(8936002)(8676002)(70586007)(70206006)(54906003)(110136005)(356005)(81166007)(82740400003)(83380400001)(47076005)(86362001)(4326008)(36860700001)(5660300002)(15650500001)(7416002)(2906002)(41300700001)(66899024)(40480700001)(40460700003)(36900700001);DIR:OUT;SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2024 09:26:17.0630
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
5efb09fd-cc5a-4e33-4b60-08dc13508780
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com]
X-MS-Exchange-CrossTenant-AuthSource:
DS1PEPF00017091.namprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB9429
X-getmail-retrieved-from-mailbox: INBOX
X-GMAIL-THRID: 1787876299367344303
X-GMAIL-MSGID: 1787876299367344303
Preferred core rankings can be changed dynamically by the
platform based on the workload and platform conditions and
accounting for thermals and aging.
When this occurs, cpu priority need to be set.
Tested-by: Oleksandr Natalenko
Reviewed-by: Mario Limonciello
Reviewed-by: Wyes Karny
Reviewed-by: Huang Rui
Reviewed-by: Perry Yuan
Signed-off-by: Meng Li
---
drivers/cpufreq/amd-pstate.c | 52 ++++++++++++++++++++++++++++++++++++
include/linux/amd-pstate.h | 6 +++++
2 files changed, 58 insertions(+)
diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index 9c2790753f99..3034b8ff3f8e 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -315,6 +315,7 @@ static int pstate_init_perf(struct amd_cpudata *cpudata)
WRITE_ONCE(cpudata->nominal_perf, AMD_CPPC_NOMINAL_PERF(cap1));
WRITE_ONCE(cpudata->lowest_nonlinear_perf, AMD_CPPC_LOWNONLIN_PERF(cap1));
WRITE_ONCE(cpudata->lowest_perf, AMD_CPPC_LOWEST_PERF(cap1));
+ WRITE_ONCE(cpudata->prefcore_ranking, AMD_CPPC_HIGHEST_PERF(cap1));
WRITE_ONCE(cpudata->min_limit_perf, AMD_CPPC_LOWEST_PERF(cap1));
return 0;
}
@@ -339,6 +340,7 @@ static int cppc_init_perf(struct amd_cpudata *cpudata)
WRITE_ONCE(cpudata->lowest_nonlinear_perf,
cppc_perf.lowest_nonlinear_perf);
WRITE_ONCE(cpudata->lowest_perf, cppc_perf.lowest_perf);
+ WRITE_ONCE(cpudata->prefcore_ranking, cppc_perf.highest_perf);
WRITE_ONCE(cpudata->min_limit_perf, cppc_perf.lowest_perf);
if (cppc_state == AMD_PSTATE_ACTIVE)
@@ -785,6 +787,40 @@ static void amd_pstate_init_prefcore(struct amd_cpudata *cpudata)
schedule_work(&sched_prefcore_work);
}
+static void amd_pstate_update_limits(unsigned int cpu)
+{
+ struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
+ struct amd_cpudata *cpudata = policy->driver_data;
+ u32 prev_high = 0, cur_high = 0;
+ int ret;
+ bool highest_perf_changed = false;
+
+ mutex_lock(&amd_pstate_driver_lock);
+ if ((!amd_pstate_prefcore) || (!cpudata->hw_prefcore))
+ goto free_cpufreq_put;
+
+ ret = amd_pstate_get_highest_perf(cpu, &cur_high);
+ if (ret)
+ goto free_cpufreq_put;
+
+ prev_high = READ_ONCE(cpudata->prefcore_ranking);
+ if (prev_high != cur_high) {
+ highest_perf_changed = true;
+ WRITE_ONCE(cpudata->prefcore_ranking, cur_high);
+
+ if (cur_high < CPPC_MAX_PERF)
+ sched_set_itmt_core_prio((int)cur_high, cpu);
+ }
+
+free_cpufreq_put:
+ cpufreq_cpu_put(policy);
+
+ if (!highest_perf_changed)
+ cpufreq_update_policy(cpu);
+
+ mutex_unlock(&amd_pstate_driver_lock);
+}
+
static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
{
int min_freq, max_freq, nominal_freq, lowest_nonlinear_freq, ret;
@@ -958,6 +994,17 @@ static ssize_t show_amd_pstate_highest_perf(struct cpufreq_policy *policy,
return sysfs_emit(buf, "%u\n", perf);
}
+static ssize_t show_amd_pstate_prefcore_ranking(struct cpufreq_policy *policy,
+ char *buf)
+{
+ u32 perf;
+ struct amd_cpudata *cpudata = policy->driver_data;
+
+ perf = READ_ONCE(cpudata->prefcore_ranking);
+
+ return sysfs_emit(buf, "%u\n", perf);
+}
+
static ssize_t show_amd_pstate_hw_prefcore(struct cpufreq_policy *policy,
char *buf)
{
@@ -1176,6 +1223,7 @@ cpufreq_freq_attr_ro(amd_pstate_max_freq);
cpufreq_freq_attr_ro(amd_pstate_lowest_nonlinear_freq);
cpufreq_freq_attr_ro(amd_pstate_highest_perf);
+cpufreq_freq_attr_ro(amd_pstate_prefcore_ranking);
cpufreq_freq_attr_ro(amd_pstate_hw_prefcore);
cpufreq_freq_attr_rw(energy_performance_preference);
cpufreq_freq_attr_ro(energy_performance_available_preferences);
@@ -1186,6 +1234,7 @@ static struct freq_attr *amd_pstate_attr[] = {
&amd_pstate_max_freq,
&amd_pstate_lowest_nonlinear_freq,
&amd_pstate_highest_perf,
+ &amd_pstate_prefcore_ranking,
&amd_pstate_hw_prefcore,
NULL,
};
@@ -1194,6 +1243,7 @@ static struct freq_attr *amd_pstate_epp_attr[] = {
&amd_pstate_max_freq,
&amd_pstate_lowest_nonlinear_freq,
&amd_pstate_highest_perf,
+ &amd_pstate_prefcore_ranking,
&amd_pstate_hw_prefcore,
&energy_performance_preference,
&energy_performance_available_preferences,
@@ -1538,6 +1588,7 @@ static struct cpufreq_driver amd_pstate_driver = {
.suspend = amd_pstate_cpu_suspend,
.resume = amd_pstate_cpu_resume,
.set_boost = amd_pstate_set_boost,
+ .update_limits = amd_pstate_update_limits,
.name = "amd-pstate",
.attr = amd_pstate_attr,
};
@@ -1552,6 +1603,7 @@ static struct cpufreq_driver amd_pstate_epp_driver = {
.online = amd_pstate_epp_cpu_online,
.suspend = amd_pstate_epp_suspend,
.resume = amd_pstate_epp_resume,
+ .update_limits = amd_pstate_update_limits,
.name = "amd-pstate-epp",
.attr = amd_pstate_epp_attr,
};
diff --git a/include/linux/amd-pstate.h b/include/linux/amd-pstate.h
index 68fc1bd8d851..d21838835abd 100644
--- a/include/linux/amd-pstate.h
+++ b/include/linux/amd-pstate.h
@@ -39,11 +39,16 @@ struct amd_aperf_mperf {
* @cppc_req_cached: cached performance request hints
* @highest_perf: the maximum performance an individual processor may reach,
* assuming ideal conditions
+ * For platforms that do not support the preferred core feature, the
+ * highest_pef may be configured with 166 or 255, to avoid max frequency
+ * calculated wrongly. we take the fixed value as the highest_perf.
* @nominal_perf: the maximum sustained performance level of the processor,
* assuming ideal operating conditions
* @lowest_nonlinear_perf: the lowest performance level at which nonlinear power
* savings are achieved
* @lowest_perf: the absolute lowest performance level of the processor
+ * @prefcore_ranking: the preferred core ranking, the higher value indicates a higher
+ * priority.
* @max_freq: the frequency that mapped to highest_perf
* @min_freq: the frequency that mapped to lowest_perf
* @nominal_freq: the frequency that mapped to nominal_perf
@@ -73,6 +78,7 @@ struct amd_cpudata {
u32 nominal_perf;
u32 lowest_nonlinear_perf;
u32 lowest_perf;
+ u32 prefcore_ranking;
u32 min_limit_perf;
u32 max_limit_perf;
u32 min_limit_freq;
From patchwork Fri Jan 12 09:25:30 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Meng Li
X-Patchwork-Id: 187620
Return-Path:
Delivered-To: ouuuleilei@gmail.com
Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp57650dyc;
Fri, 12 Jan 2024 01:28:46 -0800 (PST)
X-Google-Smtp-Source:
AGHT+IEBjiYVpGPGuxI45aS0iCSV2AcQY8zyp0mxJxFe1Iluyg/DazmIxWOzxzrbRkvnPU/lc+I5
X-Received: by 2002:a9d:68d0:0:b0:6db:fd00:7acc with SMTP id
i16-20020a9d68d0000000b006dbfd007accmr1300503oto.13.1705051725904;
Fri, 12 Jan 2024 01:28:45 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1705051725; cv=pass;
d=google.com; s=arc-20160816;
b=G1lTDYVFXj8QjLRSNHjwfJjT90PTIfYaaumeNag2uTyflU+ihekoGpIbYchCPI/vj/
MQ6bcydsm1w0UJ3TECGaEIxs4H19rwRo5teD0hOx6cr0ioKD1VmV0/45fIjP8kffWmqy
LezG1GtSoEo0KGdt4Jzuu+oyDECo5mS5SRxO69i+EQUg0ZzK+y5YNvULJcH3+T3z7ffy
FvmWIEkPfFHr1sYkCm4Xr0X86cZvN+Z104Dnui1bj6GfE8+6hbMbxlZpbreYv3rhqggp
U+XSMvXiPCRipIaLPSb+7K87Xfe6N13EWkIomZeRptUftb2SokRhTGSnvHFtie9o3ofA
3PCQ==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20160816;
h=content-transfer-encoding:mime-version:list-unsubscribe
:list-subscribe:list-id:precedence:references:in-reply-to:message-id
:date:subject:cc:to:from:dkim-signature;
bh=CkcLPe+OdQhX1JrIwqUungjFDn7/6QsByHrqLs7zL9M=;
fh=pdjV0NPE8OZoZBx2M8aim9FZCatuc1gLLlAf1G+JhNs=;
b=BEh2+rf4ML1WaocX1eipSsrEy0PytcbWsSbv3dI2xprUM6sr9disEQJWNkSfWwT5JZ
TD3F2rCfUNMD8/JqJBSscKsLELhIX9lOifw65f2Dy9k8O8l7Z1y0QVYubplmRxMvRH8i
6OPSCvv5PBRGEDC09VuW2D9tpe/vyd62L/NtmHxD9jCOrO6E4f+637fsf0Xd8E2wjj7V
1gvqv9CX25yaWBM0a1EHMs/G3EZ8j5iirKugpPosJEzNeKp5OEWWzBtQKkkEEhsdg1xg
Il+kruASY6BzYXui5Jth+5+sDEz9XWJFi9NRDmRojT0XH6viSSDzKNZ8ocE1VJG1BjlH
i5lA==
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@amd.com header.s=selector1 header.b=K+5Bpiqp;
arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass
fromdomain=amd.com);
spf=pass (google.com: domain of
linux-kernel+bounces-24479-ouuuleilei=gmail.com@vger.kernel.org designates
139.178.88.99 as permitted sender)
smtp.mailfrom="linux-kernel+bounces-24479-ouuuleilei=gmail.com@vger.kernel.org";
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99])
by mx.google.com with ESMTPS id
ld18-20020a056a004f9200b006d9bf3574fbsi2912672pfb.35.2024.01.12.01.28.45
for
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Fri, 12 Jan 2024 01:28:45 -0800 (PST)
Received-SPF: pass (google.com: domain of
linux-kernel+bounces-24479-ouuuleilei=gmail.com@vger.kernel.org designates
139.178.88.99 as permitted sender) client-ip=139.178.88.99;
Authentication-Results: mx.google.com;
dkim=pass header.i=@amd.com header.s=selector1 header.b=K+5Bpiqp;
arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass
fromdomain=amd.com);
spf=pass (google.com: domain of
linux-kernel+bounces-24479-ouuuleilei=gmail.com@vger.kernel.org designates
139.178.88.99 as permitted sender)
smtp.mailfrom="linux-kernel+bounces-24479-ouuuleilei=gmail.com@vger.kernel.org";
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com
Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org
[52.25.139.140])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id A3078285ABE
for ; Fri, 12 Jan 2024 09:28:45 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 81BCD5EE7B;
Fri, 12 Jan 2024 09:26:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com
header.b="K+5Bpiqp"
Received: from NAM12-MW2-obe.outbound.protection.outlook.com
(mail-mw2nam12on2061.outbound.protection.outlook.com [40.107.244.61])
(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 8223857303;
Fri, 12 Jan 2024 09:26:32 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org;
spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=GIHW6AZ6rBCBEFRPcl6TksJb2MHD+HiciQp7RUPkSfiaflcUMHZm/xfb6WbGQ8MKT3vdCK0MCWWe72Eg5MovR32tGYQRLmbN9yOAzfPW/2s/BZSCCRdg/SpQPkQhy3unarFcA9ODnRhS3JYjhOpsYXuSBWkPd1ZwrDjxeTAN5pzcj14pyAQGeJ0Ll3MsIAEakxoseEJl7ADMEZaifc1GVltCt7E4Z511NyIiBTeEowXAM4TXoMEQEcefKkmmOohnBOanO3ONUbYrJmXO2mMT3xHez4ADi6Md4e0rQ3QebngNG5sCTfgv8CVrVz5fbIaPdFa2AuoxbvmcXgU+zZuaEA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=CkcLPe+OdQhX1JrIwqUungjFDn7/6QsByHrqLs7zL9M=;
b=nq1gWLJHer3ST8UlUgTTHZ3U15YpuZ/OY+SMDwOqCpR/W0tOgDoMRv2K09b2CN1FgIy0r+/t/lZHSNZIRNDTD6iMIWkkKpYUasi1U9SObbVal9D8KnbhsWap7NLSLccpgy9WgjmTwCuhnNDzHcALAvr90Os+ArIyA5ehWF37sL0m6x0HWsSgjbmqQoqxA59F56JIerhXp/Y/uMXH1qLlGPFcXwf8HCpUJLD7vXCUdU5LUXen8M1QU3kIaa35XJQAVKPDOhhlsc3vB0DDTCPvgr31qOkIq2kFOCvFy5bNuVBTqHL+3xR3plA7tNP290AoC35WM6C1fUcUzn3tWHOT7w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is
165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass
(p=quarantine sp=quarantine pct=100) action=none header.from=amd.com;
dkim=none (message not signed); arc=none (0)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=CkcLPe+OdQhX1JrIwqUungjFDn7/6QsByHrqLs7zL9M=;
b=K+5Bpiqp06574XeuZN382mJZoXd25R1lGFJHi5MmeE4l6XBx23yLJ9rHswtG6dQQAkIuhKNtgCAg1IM3eWnIQ9YW8GDQSHyuHf/599QDxlOFV2/WbwgPwzqOuL7GqbBEla3/csIXOtGniys3JdpNn+QEHigVCD4OHThmXp/s+yc=
Received: from DS7PR03CA0052.namprd03.prod.outlook.com (2603:10b6:5:3b5::27)
by DM6PR12MB4404.namprd12.prod.outlook.com (2603:10b6:5:2a7::13) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.21; Fri, 12 Jan
2024 09:26:29 +0000
Received: from DS1PEPF00017090.namprd03.prod.outlook.com
(2603:10b6:5:3b5:cafe::3) by DS7PR03CA0052.outlook.office365.com
(2603:10b6:5:3b5::27) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.21 via Frontend
Transport; Fri, 12 Jan 2024 09:26:29 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17)
smtp.mailfrom=amd.com; dkim=none (message not signed)
header.d=none;dmarc=pass action=none header.from=amd.com;
Received-SPF: Pass (protection.outlook.com: domain of amd.com designates
165.204.84.17 as permitted sender) receiver=protection.outlook.com;
client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C
Received: from SATLEXMB04.amd.com (165.204.84.17) by
DS1PEPF00017090.mail.protection.outlook.com (10.167.17.132) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.7181.14 via Frontend Transport; Fri, 12 Jan 2024 09:26:29 +0000
Received: from jasmine-meng.amd.com (10.180.168.240) by SATLEXMB04.amd.com
(10.181.40.145) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 12 Jan
2024 03:26:16 -0600
From: Meng Li
To: "Rafael J . Wysocki" , Borislav Petkov
, Huang Rui
CC: , ,
, , Shuah Khan
, , "Nathan
Fontenot" , Deepak Sharma ,
Alex Deucher , Mario Limonciello
, Shimmer Huang , "Perry
Yuan" , Xiaojian Du , Viresh Kumar
, Borislav Petkov , "Oleksandr
Natalenko" , Meng Li , Wyes Karny
, Perry Yuan
Subject: [PATCH V13 6/7] Documentation: amd-pstate: introduce amd-pstate
preferred core
Date: Fri, 12 Jan 2024 17:25:30 +0800
Message-ID: <20240112092531.789841-7-li.meng@amd.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20240112092531.789841-1-li.meng@amd.com>
References: <20240112092531.789841-1-li.meng@amd.com>
Precedence: bulk
X-Mailing-List: linux-kernel@vger.kernel.org
List-Id:
List-Subscribe:
List-Unsubscribe:
MIME-Version: 1.0
X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DS1PEPF00017090:EE_|DM6PR12MB4404:EE_
X-MS-Office365-Filtering-Correlation-Id: d3a67854-2250-4fff-f73a-08dc13508f13
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info:
AjCip25QjwrcglpJonTg1upMSnEUudi6VZTkJPn5kw1i3NIFMYemMnztssAzUCwRtPNWlu4xHSI6pSu14Rua0BV30Mh683nfGLtTzQLIhxhsq2Bg5oRhbJoxNcMpfiLcs5bHJXbCK04xYsbkzYpAV3qFHumjQMkGrTjDD5zIRXLwEbZSvluczKhywIFiGtj714U1/8XPH/A/UxGdj2eEOGAHeTENKXg0ylRXeUJdzuAFhg9ZcXm7Vk2xrOrBLcxzF+RyMuAMxG2T5NKBMHtyLBpdsZ0LxPEWlCsCtvbXUrs2eCjSVESjA7J8aSri6LpeorI0tqZRwXosCwyDbALB2XXTCf7Q+4WqjkOoE/HwKlAWahFhPONa0nzi5HTyOUUPOpKE1+w2rFnj6bZ4p3CcfBY5KXOIthZyfbmQNJV4b5uk/jIJEVgOgVFBl5p2phQ/fu2YDxPawlqDiOK4Mt6PodPlMbBPWUtpwsXFZGP7w2Nx2+utDHemawvoDUo9lOseHisbbd5M50Q+Q+nfAHnM319HRlSdyGPDhxXH9hj6dc+07lZg94ZlvlwhWEgjC//2weGfB1HaNNHGLnKCfK8rcMUcxcNAEnQpzhCCQwQJ8HNYPF28Bc5hRbGzYad6LEsBttZL0YMNUk0wue2pGASn5duNcISBvwZ9cpNc2zEUJlGArUbNlbIW0fRNUVz66zviT7wfQXDIrZiHy6KdtAcXxikIy+G8tdtHWlvacC03u7k/JfeyG011YsHhnwP5reI+rti2eJT+8lt7TDE8IkNZ0w==
X-Forefront-Antispam-Report:
CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(346002)(136003)(376002)(39860400002)(396003)(230922051799003)(451199024)(1800799012)(186009)(82310400011)(64100799003)(46966006)(36840700001)(40470700004)(26005)(1076003)(2616005)(426003)(16526019)(336012)(6666004)(7696005)(478600001)(36860700001)(83380400001)(47076005)(5660300002)(7416002)(2906002)(41300700001)(4326008)(70586007)(70206006)(8676002)(8936002)(6636002)(110136005)(54906003)(316002)(356005)(81166007)(86362001)(82740400003)(36756003)(40460700003)(40480700001)(36900700001);DIR:OUT;SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2024 09:26:29.7435
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
d3a67854-2250-4fff-f73a-08dc13508f13
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com]
X-MS-Exchange-CrossTenant-AuthSource:
DS1PEPF00017090.namprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4404
X-getmail-retrieved-from-mailbox: INBOX
X-GMAIL-THRID: 1787876318686033362
X-GMAIL-MSGID: 1787876318686033362
Introduce amd-pstate preferred core.
check preferred core state set by the kernel parameter:
$ cat /sys/devices/system/cpu/amd-pstate/prefcore
Tested-by: Oleksandr Natalenko
Reviewed-by: Wyes Karny
Reviewed-by: Mario Limonciello
Reviewed-by: Huang Rui
Reviewed-by: Perry Yuan
Signed-off-by: Meng Li
---
Documentation/admin-guide/pm/amd-pstate.rst | 59 ++++++++++++++++++++-
1 file changed, 57 insertions(+), 2 deletions(-)
diff --git a/Documentation/admin-guide/pm/amd-pstate.rst b/Documentation/admin-guide/pm/amd-pstate.rst
index 1cf40f69278c..0b832ff529db 100644
--- a/Documentation/admin-guide/pm/amd-pstate.rst
+++ b/Documentation/admin-guide/pm/amd-pstate.rst
@@ -300,8 +300,8 @@ platforms. The AMD P-States mechanism is the more performance and energy
efficiency frequency management method on AMD processors.
-AMD Pstate Driver Operation Modes
-=================================
+``amd-pstate`` Driver Operation Modes
+======================================
``amd_pstate`` CPPC has 3 operation modes: autonomous (active) mode,
non-autonomous (passive) mode and guided autonomous (guided) mode.
@@ -353,6 +353,48 @@ is activated. In this mode, driver requests minimum and maximum performance
level and the platform autonomously selects a performance level in this range
and appropriate to the current workload.
+``amd-pstate`` Preferred Core
+=================================
+
+The core frequency is subjected to the process variation in semiconductors.
+Not all cores are able to reach the maximum frequency respecting the
+infrastructure limits. Consequently, AMD has redefined the concept of
+maximum frequency of a part. This means that a fraction of cores can reach
+maximum frequency. To find the best process scheduling policy for a given
+scenario, OS needs to know the core ordering informed by the platform through
+highest performance capability register of the CPPC interface.
+
+``amd-pstate`` preferred core enables the scheduler to prefer scheduling on
+cores that can achieve a higher frequency with lower voltage. The preferred
+core rankings can dynamically change based on the workload, platform conditions,
+thermals and ageing.
+
+The priority metric will be initialized by the ``amd-pstate`` driver. The ``amd-pstate``
+driver will also determine whether or not ``amd-pstate`` preferred core is
+supported by the platform.
+
+``amd-pstate`` driver will provide an initial core ordering when the system boots.
+The platform uses the CPPC interfaces to communicate the core ranking to the
+operating system and scheduler to make sure that OS is choosing the cores
+with highest performance firstly for scheduling the process. When ``amd-pstate``
+driver receives a message with the highest performance change, it will
+update the core ranking and set the cpu's priority.
+
+``amd-pstate`` Preferred Core Switch
+=================================
+Kernel Parameters
+-----------------
+
+``amd-pstate`` peferred core`` has two states: enable and disable.
+Enable/disable states can be chosen by different kernel parameters.
+Default enable ``amd-pstate`` preferred core.
+
+``amd_prefcore=disable``
+
+For systems that support ``amd-pstate`` preferred core, the core rankings will
+always be advertised by the platform. But OS can choose to ignore that via the
+kernel parameter ``amd_prefcore=disable``.
+
User Space Interface in ``sysfs`` - General
===========================================
@@ -385,6 +427,19 @@ control its functionality at the system level. They are located in the
to the operation mode represented by that string - or to be
unregistered in the "disable" case.
+``prefcore``
+ Preferred core state of the driver: "enabled" or "disabled".
+
+ "enabled"
+ Enable the ``amd-pstate`` preferred core.
+
+ "disabled"
+ Disable the ``amd-pstate`` preferred core
+
+
+ This attribute is read-only to check the state of preferred core set
+ by the kernel parameter.
+
``cpupower`` tool support for ``amd-pstate``
===============================================
From patchwork Fri Jan 12 09:25:31 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Meng Li
X-Patchwork-Id: 187621
Return-Path:
Delivered-To: ouuuleilei@gmail.com
Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp57765dyc;
Fri, 12 Jan 2024 01:29:05 -0800 (PST)
X-Google-Smtp-Source:
AGHT+IEbadEmEetKCYz/iewQlNf7k0vOFlsPR8BG3W9BhShYUi2HHvO03oYgeGROz2au8a+agtn5
X-Received: by 2002:a05:6402:30ac:b0:557:c07b:dc2d with SMTP id
df12-20020a05640230ac00b00557c07bdc2dmr463326edb.74.1705051745555;
Fri, 12 Jan 2024 01:29:05 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1705051745; cv=pass;
d=google.com; s=arc-20160816;
b=s38gSwbCV1Z5FpWNOAsjRBnV6ZJW8rg9zqw+xfT0KR3GTULLKCHek8jZt27JyHTtw+
g40FHHP5F3MTZg6b3+yu8ybNoaM+HhqSTf/p7GZGxcsiv0Gv8AIwFrxO5v06CbHy+ZEO
DY4NVkdlQwwPHKstyInIjMoLFkga2sqz0d2Slq6QiHtK1vhrptwFqB3ORkpQISmtApR0
Qgv/+dIYjY0u/Ezd1LDYIUx92igacWhaFVYnqkz14aaZ6OP5r2Mr/O7C2T4VvnheCUaq
IczUmMl09K7cIA0pEoEKUWD1dgZCtzm6uupBQePmH+wTa1XYljEVOzO9IaeVDADQwzXH
LSdQ==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20160816;
h=content-transfer-encoding:mime-version:list-unsubscribe
:list-subscribe:list-id:precedence:references:in-reply-to:message-id
:date:subject:cc:to:from:dkim-signature;
bh=85oIARnE+wv1JlIuF15E0Tk1ufYqSyfbk9En7YmPpPE=;
fh=pdjV0NPE8OZoZBx2M8aim9FZCatuc1gLLlAf1G+JhNs=;
b=ta5IMRO3/fwPeFSw7T9gw4egUmezVGlqrfkwyiNo3jfmNLyWeTLmHSlFOboaa63rao
cUMdApvOk2kojJUeqmiYqJ9da0Hue2XrIwZ9s2/uCHEqC0yfDSzLpH5uLLBEsZYZl2S6
IhFjKqPu1Gft4T2xWtJO2cY9pcvd8gzm4HSDOYiatYa9U4TUlM0TTWDXBTycKJu0ZHz1
NuA9gUOlXw1smD7ww4IeYO/X8a7UK6JbL3RsvdH9GNBpyoAwXFT1jWN7NvntnbFVstkJ
C58BIWUYRY9K7OsOVoTYtEkPKEQwkbYYXEwSRRchtTh8KLRFT7czS0D/DlAf1AMNtF0b
tGpQ==
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@amd.com header.s=selector1 header.b=YB8QzDj0;
arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass
fromdomain=amd.com);
spf=pass (google.com: domain of
linux-kernel+bounces-24480-ouuuleilei=gmail.com@vger.kernel.org designates
147.75.80.249 as permitted sender)
smtp.mailfrom="linux-kernel+bounces-24480-ouuuleilei=gmail.com@vger.kernel.org";
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249])
by mx.google.com with ESMTPS id
x26-20020aa7cd9a000000b0055753dc792bsi1259488edv.563.2024.01.12.01.29.05
for
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Fri, 12 Jan 2024 01:29:05 -0800 (PST)
Received-SPF: pass (google.com: domain of
linux-kernel+bounces-24480-ouuuleilei=gmail.com@vger.kernel.org designates
147.75.80.249 as permitted sender) client-ip=147.75.80.249;
Authentication-Results: mx.google.com;
dkim=pass header.i=@amd.com header.s=selector1 header.b=YB8QzDj0;
arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass
fromdomain=amd.com);
spf=pass (google.com: domain of
linux-kernel+bounces-24480-ouuuleilei=gmail.com@vger.kernel.org designates
147.75.80.249 as permitted sender)
smtp.mailfrom="linux-kernel+bounces-24480-ouuuleilei=gmail.com@vger.kernel.org";
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com
Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org
[52.25.139.140])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 03AFA1F26A3E
for ; Fri, 12 Jan 2024 09:29:05 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 955D55EE9A;
Fri, 12 Jan 2024 09:26:42 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com
header.b="YB8QzDj0"
Received: from NAM04-BN8-obe.outbound.protection.outlook.com
(mail-bn8nam04on2052.outbound.protection.outlook.com [40.107.100.52])
(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 2CEDA5EE81;
Fri, 12 Jan 2024 09:26:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org;
spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=bZa02nFLyeW/DgT2I71fYqdKXlEJzsNLJd4mgugeazRZ3zVZOjnXD1kTeogjiw6EQDCE7XRghqT9os4zJm55om7CYE+L6po6Fc3gs6cNGjlMaWYkvyjrEPOsJmIPIlg6mqbiWhlF8kmP0eGV77xvgtXDBbjna8wi9mefk1oRnVA6BOYHiORkMLdsZRkA1lsObnad+pxuaq9hcGhYh1lqTHRU1RGSXGpl+lAItGfO9rZyIUNse9TToGuv81BFD3pi5E0Nm7kU6m6WtjNjmWPS3Jm36lRx/1tk2yqQkKgDb9r09iCgRzMD/3ZVbQY7Uno/13zIH0yE8/Y1rhcfQi00oA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=85oIARnE+wv1JlIuF15E0Tk1ufYqSyfbk9En7YmPpPE=;
b=ZKmPn1+JOvMKeey5pl8ss88kS92W+rF5iUBJyeJesFqbm2QK85jPz9U98qwHfdHxMld9V+fG4yJLRcCn9zTZ6mXNPMFuBJhr3VmNbP4lTLNOwlmOY+dicZLnGnhb4N0OJVRbS86gW90OQUB9A5aLodtjJCCEoDnEknhggfPirMg4XzkgjqJINUKGLSDT5QsGpIv6xGV6KRDJEnL1eWh2ZTCaVcjf3aPh/opljORiXmGoxgLIxWO+PIRRwt8bTrkJn5cFvMh6JiMzeHAtYE4x1jAp09QUaMMkrpiBvd+FxmCqfF6otTTaKNzu9GCmVxa3YTlE4kv0NywBNTKhDAxg5w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is
165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass
(p=quarantine sp=quarantine pct=100) action=none header.from=amd.com;
dkim=none (message not signed); arc=none (0)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=85oIARnE+wv1JlIuF15E0Tk1ufYqSyfbk9En7YmPpPE=;
b=YB8QzDj0/AGT1lTV9eF/VzdB4DTg7kkmklLGtdogbQeYMYeeBWKZC9jhjS981+DIEZ8MLkO7Fu3tEUgoTeIqq3tSIOgYxjc7yMBHnNiAxdwbrBWeKRG33f67Dzc/1Q+ppPEldL4nwHfzkq63SdG2DFjZ2OKygwvIIW5ejmL5s98=
Received: from DS7PR03CA0268.namprd03.prod.outlook.com (2603:10b6:5:3b3::33)
by SA1PR12MB9245.namprd12.prod.outlook.com (2603:10b6:806:3a7::15) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.17; Fri, 12 Jan
2024 09:26:35 +0000
Received: from DS1PEPF00017095.namprd03.prod.outlook.com
(2603:10b6:5:3b3:cafe::3b) by DS7PR03CA0268.outlook.office365.com
(2603:10b6:5:3b3::33) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.21 via Frontend
Transport; Fri, 12 Jan 2024 09:26:35 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17)
smtp.mailfrom=amd.com; dkim=none (message not signed)
header.d=none;dmarc=pass action=none header.from=amd.com;
Received-SPF: Pass (protection.outlook.com: domain of amd.com designates
165.204.84.17 as permitted sender) receiver=protection.outlook.com;
client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C
Received: from SATLEXMB04.amd.com (165.204.84.17) by
DS1PEPF00017095.mail.protection.outlook.com (10.167.17.138) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.7181.13 via Frontend Transport; Fri, 12 Jan 2024 09:26:35 +0000
Received: from jasmine-meng.amd.com (10.180.168.240) by SATLEXMB04.amd.com
(10.181.40.145) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 12 Jan
2024 03:26:29 -0600
From: Meng Li
To: "Rafael J . Wysocki" , Borislav Petkov
, Huang Rui
CC: , ,
, , Shuah Khan
, , "Nathan
Fontenot" , Deepak Sharma ,
Alex Deucher , Mario Limonciello
, Shimmer Huang , "Perry
Yuan" , Xiaojian Du , Viresh Kumar
, Borislav Petkov , "Oleksandr
Natalenko" , Meng Li , Wyes Karny
, Perry Yuan
Subject: [PATCH V13 7/7] Documentation: introduce amd-pstate preferrd core
mode kernel command line options
Date: Fri, 12 Jan 2024 17:25:31 +0800
Message-ID: <20240112092531.789841-8-li.meng@amd.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20240112092531.789841-1-li.meng@amd.com>
References: <20240112092531.789841-1-li.meng@amd.com>
Precedence: bulk
X-Mailing-List: linux-kernel@vger.kernel.org
List-Id:
List-Subscribe:
List-Unsubscribe:
MIME-Version: 1.0
X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DS1PEPF00017095:EE_|SA1PR12MB9245:EE_
X-MS-Office365-Filtering-Correlation-Id: 68211a65-65ac-4446-7a38-08dc13509235
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info:
xjTiLomlWVjAOmLvPIrjAEtxebmc8yS19FSntbZAUGFN7TH5TvNeMH4rc3pnUeMD8hdaX3Poko0cU/3NMfmycWxP4yMRqVyNabl1KdAXmojXvWvLBpXhvKx88EQPWvvpoL2wbJUXBTJIZ3k/2lbyIQ7BcnpJ1+tBA/nQCVxmosX0fvtn6cHDbp+sp46gxVLh2Z5x9NBgKFIhUeXVVesTm+EsUXUGveDoc6YLSD402V+Rj8Ttx7CMJvArSUFHMeYJz4Kt5+1YcCrYs0m13Vcennz3X1ZTOuvH8P3wCzYRlQa3qtFVpbdKzv6yPzi7fmU9NgYjfppPtHAUgw7/+S0QdUr7xx4Zq7kpdnrBl56gA4dnB4II8bR1VPIFilFdZXbRrz7lwMmspuN/8QlwvcOrRl8TtVyHJRlduWRVLwfU4l033MgJGhF5BVFq1JtUqYxVnxvGbeIVs3khuds9pLXuLYRWTBYbqV33p+TKC6iqjQRxKDN6EawwVi/UjcuEAQgR+BAH5ID5XQnRYCaaIq5onJKSBGy04VvfrKvjgxzfNeY1b0EbmReadexMvYEWZh9iv2i76D5RSg9bivZ0c/fLdlsM07LazsxhjR3p6sHXZH/Y6TkESvb++FOaCt3NyCgmje/HjWOLjPT6kbQSImLEY1OzhOBNX82ISlu107974OE5mNs1VDooSJExD80/3MrL2g4jV4kulLB9DTOL5tszvYeKQURXa2UxmOcfF/IFmNXYVaTVzDAzpneXPbs1+y2Dt5Dt/IEoJSitvwj+7E89iMWc9LuA1jDjGfkAjCa3KvrnK2sDmS85wrILgys3iO7T
X-Forefront-Antispam-Report:
CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(39860400002)(136003)(376002)(346002)(396003)(230922051799003)(451199024)(1800799012)(82310400011)(64100799003)(186009)(46966006)(40470700004)(36840700001)(7416002)(26005)(5660300002)(2616005)(47076005)(2906002)(1076003)(356005)(4326008)(316002)(6666004)(83380400001)(81166007)(110136005)(82740400003)(36860700001)(8676002)(8936002)(54906003)(6636002)(16526019)(41300700001)(478600001)(70586007)(336012)(7696005)(70206006)(426003)(86362001)(36756003)(40460700003)(40480700001)(36900700001)(14943795004);DIR:OUT;SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2024 09:26:35.0119
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
68211a65-65ac-4446-7a38-08dc13509235
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com]
X-MS-Exchange-CrossTenant-AuthSource:
DS1PEPF00017095.namprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB9245
X-getmail-retrieved-from-mailbox: INBOX
X-GMAIL-THRID: 1787876339033713183
X-GMAIL-MSGID: 1787876339033713183
amd-pstate driver support enable/disable preferred core.
Default enabled on platforms supporting amd-pstate preferred core.
Disable amd-pstate preferred core with
"amd_prefcore=disable" added to the kernel command line.
Signed-off-by: Meng Li
Reviewed-by: Mario Limonciello
Reviewed-by: Wyes Karny
Reviewed-by: Huang Rui