From patchwork Tue Aug 15 06:15:40 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: "Meng, Li \(Jassmine\)"
X-Patchwork-Id: 713829
Return-Path:
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
aws-us-west-2-korg-lkml-1.web.codeaurora.org
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
by smtp.lore.kernel.org (Postfix) with ESMTP id 85C03C04A94
for ; Tue, 15 Aug 2023 06:17:21 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S234898AbjHOGQs (ORCPT );
Tue, 15 Aug 2023 02:16:48 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49418 "EHLO
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S234888AbjHOGQg (ORCPT
); Tue, 15 Aug 2023 02:16:36 -0400
Received: from NAM11-DM6-obe.outbound.protection.outlook.com
(mail-dm6nam11on2059.outbound.protection.outlook.com [40.107.223.59])
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B30A13E;
Mon, 14 Aug 2023 23:16:35 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=O1xMGM9J737diObX1xS0wi6g+JvAy/sMYdO7pYgvEB1Dl0p+ClSucMZVoUql7nBIMDQ6xERAcubA3ZYLUvZfJ4GIEHtkA4ToYjsnUut08VP3RARe58uLgDOtiM08tozUx4oJqGqPhzdmSCCy46aj5alhNUkcd4Q/eRkTB7Rp47skSyj1+49P9JeNDrF6P2v23f/1Mx4ROM0mWPyPlg0lq6OhpDiEI9Rfc7cwjYXtadJ9NOHcsM0YrEOHRGeIau6Z+MxGIALTjjauucgOh4nOfxu4wEJQwjt5KfoGQGpWWwVuK1Byt+xfIImlJ84MPAxWBMmwyvFsuic7OV6XnMsLqw==
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=xGMKrfJjfM7H7f+ewFWhuvkX6F6TCyO9t4LyoFXlpnA=;
b=Gl5F800Khljr2Uod3xRSa3KYk+WErgFF9cCn5M0/TDTjTsXtEY7CKk6zXG1cngG74T3CYtesp9GXuuDVCXAW/BzVq9x0dLlxqNLEg137S/G2+aN1StBpTdS4EiNmP1a/nE7w0Te86vTbvEYrpHogpULQpsN2RP5P1nQaDBN3U3+Cr5KYMOFmH2p5p8CA0p7G1vi3QjoQIMYGyK0/HC4QMaa8jcHdz8V6uneequWgTXNO3iH/yhQ5waG8frdSUGP9uEN35zrzXJf7DOnvpWCWLpe8t2WQ3O1+584ZTvOT7cJ5lfDDjrWFeZ1EVZdGo0nFXGEs6WCMWDhodofWOa0X1A==
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
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=xGMKrfJjfM7H7f+ewFWhuvkX6F6TCyO9t4LyoFXlpnA=;
b=pxcTf7ixq9kA7XnJvewngumqJ0IeD9QZgHLGSo/wyqN6ZOzmtyvHuxa+1IaNQI2Db88Elso7LXeb66vUv4iSHcq/hCq0E/DbTeY3WUab0zg0y5aEHxbGkhPW322dMhnLe0FItIw9d4sQToy1vzMp+2D48BCnL0ndScwJ8VJgMl0=
Received: from SN4PR0501CA0125.namprd05.prod.outlook.com
(2603:10b6:803:42::42) by SJ2PR12MB7821.namprd12.prod.outlook.com
(2603:10b6:a03:4d2::21) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.24; Tue, 15 Aug
2023 06:16:31 +0000
Received: from SA2PEPF0000150A.namprd04.prod.outlook.com
(2603:10b6:803:42:cafe::31) by SN4PR0501CA0125.outlook.office365.com
(2603:10b6:803:42::42) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.14 via Frontend
Transport; Tue, 15 Aug 2023 06:16:30 +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
SA2PEPF0000150A.mail.protection.outlook.com (10.167.242.42) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.6699.14 via Frontend Transport; Tue, 15 Aug 2023 06:16:30 +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.27; Tue, 15 Aug
2023 01:16:07 -0500
From: Meng Li
To: "Rafael J . Wysocki" ,
Huang Rui
CC: , ,
, ,
Shuah Khan , ,
"Nathan Fontenot" ,
Deepak Sharma ,
Alex Deucher ,
Mario Limonciello ,
Shimmer Huang , "Perry Yuan" ,
Xiaojian Du , Viresh Kumar ,
Borislav Petkov , Meng Li
Subject: [PATCH V2 1/7] x86: Drop CPU_SUP_INTEL from SCHED_MC_PRIO for the
expansion.
Date: Tue, 15 Aug 2023 14:15:40 +0800
Message-ID: <20230815061546.3556083-2-li.meng@amd.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20230815061546.3556083-1-li.meng@amd.com>
References: <20230815061546.3556083-1-li.meng@amd.com>
MIME-Version: 1.0
X-Originating-IP: [10.180.168.240]
X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: SA2PEPF0000150A:EE_|SJ2PR12MB7821:EE_
X-MS-Office365-Filtering-Correlation-Id: c097c808-1e3a-402a-6f49-08db9d572ab1
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: gvX89iqEawjo07JMeXTi184WbVD6xMa4JHXk210DA775zz15UVmLA77XTfoIO40CJU9WH83b3HAXxoUYyeBv/dQ/j/z/30H4SuiNIhp9L2Bm3+ybdKyZjvDJHW5LYjaPoY5xgJuslMLGuewYClrZlS66f33Gzzqy1fKTen6PXAh1RQPxuD11Zc5HqmNYNqFAyrqDY7dgwJBd0WDlH+Rd1VocIVVDxdQMLuA8YtCI/iCevvz4juTJtOKn0eWjNgZgM0mthlvTaZvlEJudtDWVoxQpwalP+SzgItJUZ6e2R+8Pwy7u5JKZovyM82bCmW/uz4AQwhtmfOTm1i4da1BXkefDMlXcqaeCy68+qFPjuue6l2pyRwbPppmqkvHdT0tIMoESbbTyZT9trq5nrix3Q4jrOIXcqBTP5NGSC6ofEXyIvMnJzjK6a5qi+5Dtbkh/1sEkKBGp46HX5XezCLwqhHjzldttXxhexHNF5M4Kx5N5TJDGVGfHjO+QQ8rY3L8RS1FFbe+ys+zRzd6fINYNKtohUEczzUqCdTakb8ubucFljrlKkL1kqOWI1SXEjlIDwtr8xPtE9f9xPkUS0FI/eD+72BWvA6ctyPkmqAjDwZJrA2ThgbWSw7JqmIid4mHnTY2nt0W60nU+kDNGPZk76IMjtPTsa1WZi6eBW68DLIuA0mz2paW3V0+luOHJOdYq6JSTyrt/E1MYaEWK7M3LfKjjzhtDGB8nrK/f3BtVKHSce635zEBiKymCQBXpfz4txHg0nprYeUIsINsXwudzFw==
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:(13230028)(4636009)(136003)(396003)(376002)(39860400002)(346002)(82310400008)(186006)(451199021)(1800799006)(40470700004)(36840700001)(46966006)(4326008)(8936002)(86362001)(478600001)(7696005)(8676002)(316002)(36860700001)(82740400003)(54906003)(70206006)(70586007)(110136005)(41300700001)(6666004)(6636002)(16526019)(5660300002)(26005)(2616005)(36756003)(1076003)(426003)(336012)(4744005)(81166007)(83380400001)(2906002)(40460700003)(356005)(47076005)(40480700001)(36900700001);
DIR:OUT; SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2023 06:16:30.6575 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: c097c808-1e3a-402a-6f49-08db9d572ab1
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: SA2PEPF0000150A.namprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB7821
Precedence: bulk
List-ID:
X-Mailing-List: linux-acpi@vger.kernel.org
Drop CPU_SUP_INTE from SCHED_MC_PRIO, and it can be used by X86_AMD_PSTATE.
Signed-off-by: Meng Li
---
arch/x86/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index e36261b4ea14..03322d2840fa 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1052,8 +1052,9 @@ config SCHED_MC
config SCHED_MC_PRIO
bool "CPU core priorities scheduler support"
- depends on SCHED_MC && CPU_SUP_INTEL
+ depends on SCHED_MC
select X86_INTEL_PSTATE
+ select X86_AMD_PSTATE
select CPU_FREQ
default y
help
From patchwork Tue Aug 15 06:15:41 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: "Meng, Li \(Jassmine\)"
X-Patchwork-Id: 714114
Return-Path:
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
aws-us-west-2-korg-lkml-1.web.codeaurora.org
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
by smtp.lore.kernel.org (Postfix) with ESMTP id BC2C1C04FE2
for ; Tue, 15 Aug 2023 06:17:21 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S234909AbjHOGQt (ORCPT );
Tue, 15 Aug 2023 02:16:49 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51966 "EHLO
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S234895AbjHOGQk (ORCPT
); Tue, 15 Aug 2023 02:16:40 -0400
Received: from NAM02-SN1-obe.outbound.protection.outlook.com
(mail-sn1nam02on2059.outbound.protection.outlook.com [40.107.96.59])
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFC7513E;
Mon, 14 Aug 2023 23:16:38 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=Reg6xABXAkhslzg4MscyaovEkUE+LgV49FbedpyL0HK2qII8Ny0f+wvvUbjV8ZfdiJsXcaQlj0Ou1pSF7LM4KWcgExFRIikxf7Hvf+/5NQIpUXvZpJ3817Bp0huRKZKN3w6bjl3NUwmOEM55WNWw/huaITeUt57Uq9x8H91AzQivGtl2wJKlaM50X2f19g6K2fZ2Z38TpANFD3lu0Q1LcAU91tSxqaHohaBLQXY1FJc0d4pj4VS0ukrv89YfnZVjsV1cZVKtvF7bW7acWoeO43Vw6lNnby7p59vH1jmkDvYrKb5GOgDznNLsPhmyf9JYOUbMxdWkYajY7f2VaH0voQ==
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=DFDn6jp+E1OfjmJLdn866JLVFhZZ4KpifA7cfk25OJ4=;
b=eVq9Af0IMWrWC4jfW4yizJiI2Rq2kJjyJSVmKyUP80XMetV77XYa/zY6DsJ1wCOT0u1uuPtAsGFnnZbesKZIiyEYvALqfePaQ1FTskhEclZ35NRdftIwlQDKCipFeraZLEEva4ig7cM0EHYNEA82XimzQFVUlpEnTu85bgtuJIIzAOkNs1a2LigsJxMRlA0VuGulJTJdGpfLg1UioE4Zp5tqQm8mAHZ1HDi8lXJITf7mDnmVabN260LrVOXYwNVVhvhwYk7G3+R4xp+CB7PF9WcdniIq4nDmfQPEj7p6lr4Ktq3ykAfNQgaF8wicnQFVbhVgPnqEQCeBGbqbRl2pNA==
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
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=DFDn6jp+E1OfjmJLdn866JLVFhZZ4KpifA7cfk25OJ4=;
b=DmuKpQv/Wdq6A+MeK1TxXUQEevuEiJmnYZOIybmZmVKgnCgEsjcPzyGiMI/F0knjtsbuQwYOPggk0JcvWKALZNuZ1VUyye8sVfznlUMlIaeEwvhvSjTeKojEGHTO2s68wSG2z7slzfzsvfKWQpAmGYf0tGvhoi2wA2VDlmTQucc=
Received: from SA0PR11CA0142.namprd11.prod.outlook.com (2603:10b6:806:131::27)
by SA3PR12MB7805.namprd12.prod.outlook.com (2603:10b6:806:319::20)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.26; Tue, 15 Aug
2023 06:16:34 +0000
Received: from SA2PEPF00001505.namprd04.prod.outlook.com
(2603:10b6:806:131:cafe::33) by SA0PR11CA0142.outlook.office365.com
(2603:10b6:806:131::27) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.33 via Frontend
Transport; Tue, 15 Aug 2023 06:16:34 +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
SA2PEPF00001505.mail.protection.outlook.com (10.167.242.37) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.6699.13 via Frontend Transport; Tue, 15 Aug 2023 06:16:33 +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.27; Tue, 15 Aug
2023 01:16:28 -0500
From: Meng Li
To: "Rafael J . Wysocki" ,
Huang Rui
CC: , ,
, ,
Shuah Khan , ,
"Nathan Fontenot" ,
Deepak Sharma ,
Alex Deucher ,
Mario Limonciello ,
Shimmer Huang , "Perry Yuan" ,
Xiaojian Du , Viresh Kumar ,
Borislav Petkov , Meng Li
Subject: [PATCH V2 2/7] acpi: cppc: Add get the highest performance cppc
control
Date: Tue, 15 Aug 2023 14:15:41 +0800
Message-ID: <20230815061546.3556083-3-li.meng@amd.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20230815061546.3556083-1-li.meng@amd.com>
References: <20230815061546.3556083-1-li.meng@amd.com>
MIME-Version: 1.0
X-Originating-IP: [10.180.168.240]
X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: SA2PEPF00001505:EE_|SA3PR12MB7805:EE_
X-MS-Office365-Filtering-Correlation-Id: dab7208b-421f-41d9-e724-08db9d572c91
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: KaySYEuvZYHnHhX8e8XYH0ysoUzCLRlRFuHM1qJOvpoF62XhFlSTOcMOANOC1noYL1Y01Tisjv3idiCQ99Az5bwiUoM86c9+Nor+M7LN7l+aRcpFQ4PW5JVXXt66EbdoqU7PRgHEYb6c9ClOfRY2UkjROJaCVtcGaulVqsPtT1Tzo3gxEbdRG/uGjPC8gHrHgo58AFaWduDnK1+g/MSyVEl3pLtDKLwA17bTksYzTDA7n/WWELtqnWrEjos7NyPPLG0vkjLM+btXnJrZc7R8sPrHJqX0n09/ixDWED4qsoZz0NHvAm21OVolZzVTagXU74SRChSPCcd+wroPHi+TQiK6ya3L0LtrRcGF7nKyJDZXTC5l/G5s7RMtD0CTkTZxotRf5f15x5HJm+8okddzNp/2rYim6gViNAOgaVNkvvoe2TKEHC2QoBv7anJLrzHZKBSz2I4eex/gLMkMY3TkJb3gqSDQWflrkzAROtD4kA0T5BUEVra2wOZwJWFTDf7hGKHFKLSWhH+7NHMEa+tI1Qk/JLZvX8erAunQLO3q9jFCfDV4rdrFIQgIyHaf8S8dWnTaYpmU/zfvwNx9kBA9/HqxTfsXJBjDgQV6nBkU96eLbqOIWbEFmSMXZbDA4b7JtQ2JqoSIf3LI0g531b7Q/UVMezOvRdkGXm9OGtmacGJn+luzBIJVjC65tR7zW3iDYRG/1jzp/C2V/HMxM4XtL/U58FLCVdgc48Oj/hOERX87NrU1wvShowE5cUO3sFxJJx5JlGoL2gwym1bXXisZtf5iYGk5uQCmFE5nEO5tyoE=
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:(13230028)(4636009)(136003)(39860400002)(346002)(396003)(376002)(451199021)(82310400008)(186006)(1800799006)(36840700001)(46966006)(40470700004)(40460700003)(336012)(426003)(16526019)(1076003)(26005)(2616005)(36860700001)(47076005)(7696005)(41300700001)(54906003)(70206006)(70586007)(2906002)(316002)(6636002)(5660300002)(8936002)(8676002)(4326008)(478600001)(6666004)(966005)(110136005)(40480700001)(81166007)(356005)(82740400003)(86362001)(36756003)(15583001)(36900700001);
DIR:OUT; SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2023 06:16:33.8062 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: dab7208b-421f-41d9-e724-08db9d572c91
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: SA2PEPF00001505.namprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB7805
Precedence: bulk
List-ID:
X-Mailing-List: linux-acpi@vger.kernel.org
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 the ACPI_Spec for details on continuous
performance control of CPPC.
Signed-off-by: Meng Li
Reviewed-by: Mario Limonciello
Link: https://uefi.org/specs/ACPI/6.5/08_Processor_Configuration_and_Control.html?highlight=cppc#cpc-continuous-performance-control
---
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 Tue Aug 15 06:15:42 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: "Meng, Li \(Jassmine\)"
X-Patchwork-Id: 713828
Return-Path:
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
aws-us-west-2-korg-lkml-1.web.codeaurora.org
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
by smtp.lore.kernel.org (Postfix) with ESMTP id 3F244C04A6A
for ; Tue, 15 Aug 2023 06:18:25 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S235013AbjHOGRw (ORCPT );
Tue, 15 Aug 2023 02:17:52 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33492 "EHLO
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S234895AbjHOGRX (ORCPT
); Tue, 15 Aug 2023 02:17:23 -0400
Received: from NAM10-DM6-obe.outbound.protection.outlook.com
(mail-dm6nam10on2069.outbound.protection.outlook.com [40.107.93.69])
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4082183;
Mon, 14 Aug 2023 23:17:21 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=hyp4htZoHWBHY/ECx9YKG+NTjUv92hgPt3fO4/sm7x76EyP/1n37ggZTu8BYIDe74vMPMB1mQH5MmhqSPiy1OlC1S/BBmKieNqeI/uAcq17V61R23Eis+js8LJgt91KvCq2KdnABAl0Yxf7kL0m4XE9x2fh1CTV2IO5fh+k/80EgImbM+iEddo/yxMWcXi+BFgPVaD6D8prAxqkJFSNK7m7xas4HbSOPLOwsTskCIUkto5I7CcFp0Z//+RnkiWp6wa6dqY/YDQsLI/sXZYdmOf6sm1mHTxM+gWhvLQUoc5nBL7A1Kmb+VWCcml+SNMJYpTRj+YMzv8Dwou9GY8Kptw==
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=H8cTEp72ZW9JQ5x+VmILlyFcn6kBtX9M1YN8erqD2yg=;
b=HCj41T/8ItYSTxBzzuYCiZ9h+7CwQueWZqIe9k8Ise2Etp10A0pVaAlXj/VCjiGIBiE7403CMyUi3hToZ1WHsVon2FcPr+dMy14aIgBmO5TYLa2bi4KpYB5NZ+hHQU2EyCKLS5j/FjkVsKv4FEEql47+UFOZjA5OrX/6/hfKWzcKCJAx+xIt9ftxhLVax5yACYFSPnmEqpjl3TU0odsrdhKlBrvgTVTWp8+2qjPqGgyQj3uQdbYvuoWseUzNVQq+d966WG80ee1M2528P9CU7V2GEJ+Pt6SrD8otZltg4ouqzYBOWsIXPGsaJdmCXleghM7kit4EpXVPgsJpwLkurA==
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
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=H8cTEp72ZW9JQ5x+VmILlyFcn6kBtX9M1YN8erqD2yg=;
b=aUy+V0uJuZ4A3iulN3RR/wnUUNDq0kvWz5XOE++fwKtmSPHGcEQlaApoqMMMNCMiHYrAh4yBxxSxkfN5+fU1+J3ASWWfUgDemqJ1WoALs4Zq8+Uq1LAvwCNGtPDBdBC2YlQbebW4ncLOZz7T5+NZzcnMEuYTquERr5XUV7iTIg4=
Received: from CH2PR18CA0014.namprd18.prod.outlook.com (2603:10b6:610:4f::24)
by DM4PR12MB5085.namprd12.prod.outlook.com (2603:10b6:5:388::11) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.26; Tue, 15 Aug
2023 06:17:18 +0000
Received: from CO1PEPF000044FA.namprd21.prod.outlook.com
(2603:10b6:610:4f:cafe::e5) by CH2PR18CA0014.outlook.office365.com
(2603:10b6:610:4f::24) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.33 via Frontend
Transport; Tue, 15 Aug 2023 06:17: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
CO1PEPF000044FA.mail.protection.outlook.com (10.167.241.200) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.6723.3 via Frontend Transport; Tue, 15 Aug 2023 06:17: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.27; Tue, 15 Aug
2023 01:16:33 -0500
From: Meng Li
To: "Rafael J . Wysocki" ,
Huang Rui
CC: , ,
, ,
Shuah Khan , ,
"Nathan Fontenot" ,
Deepak Sharma ,
Alex Deucher ,
Mario Limonciello ,
Shimmer Huang , "Perry Yuan" ,
Xiaojian Du , Viresh Kumar ,
Borislav Petkov , Meng Li
Subject: [PATCH V2 3/7] cpufreq: amd-pstate: Enable AMD Pstate Preferred Core
Supporting.
Date: Tue, 15 Aug 2023 14:15:42 +0800
Message-ID: <20230815061546.3556083-4-li.meng@amd.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20230815061546.3556083-1-li.meng@amd.com>
References: <20230815061546.3556083-1-li.meng@amd.com>
MIME-Version: 1.0
X-Originating-IP: [10.180.168.240]
X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: CO1PEPF000044FA:EE_|DM4PR12MB5085:EE_
X-MS-Office365-Filtering-Correlation-Id: 8bcdea3e-9025-4cb8-8471-08db9d57469b
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: QbvQkFBmbc1yh3a/21UP5698ISfjCyBNgLbs5iiUD5GsT6ZMSz3M/cfvAMZnFvT7XWhYX/mwI1s+UerOheCxRScRtMAG2P6RSeN4sjrzXy1ZArYmbSLZd9JXYHEeb+5breQH5U+5omr4OEUbyRT2EffuHHqubN4rs3IZuPiuMNQzBsySRDCClq0BLD+PfXvRI3kUAEY+0NAiLOo9zR7g4U6QugxlPtQx+4pf3Z23at4mxs8/fQeUNKefggy8EBXnguppkptvXiuQRqYPembgplvHhL8hyQb02pagjb72zSW2TVt3Lzr0ZKHupCwiS3RQN/+mxmux7CVdL3yIhrLTX60xPZKHU7hwlWL6EQ3KV0TY8baUvTvk7zQpVUwuzwiKKBCv5ri+apYq0xozUauCheFrVgL737tcCzkwbsPA9VQWc1YEzgng1KPYEzeySKIyHkZLvjWqkRgd7Ad45K0MIa7MZmklwGyIzREwwLyETWSSKqUGPNumFdRxTRSBhxWkKnnS0MKuX0fTqgbtD4TfjQZ5qXlPRY80em9MV+o20KF7t0VJ7FiM1RRHrJ3NWRJafudO+iwlVEAPrZ1KAbK+68nVtgM7MF2fpCHsRer96JF4j6pGF5rOtmbLG5xu08ntEJKgBr+1R/6ZnkUVxI8o1vrwpImS4YQQvb7oqB7thOQ4Z4AjBc5ABzoHxsGeobdg0xrtB+ZCkCixCzYYH6We9EX2933tRGCWuovuZjCLK26kJ5vibkkMANL4vjQGWl9WDclkOZuBPzAjUZCvjooghQ==
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:(13230028)(4636009)(39860400002)(346002)(396003)(376002)(136003)(82310400008)(186006)(1800799006)(451199021)(40470700004)(36840700001)(46966006)(2906002)(47076005)(316002)(40480700001)(6636002)(83380400001)(70586007)(70206006)(36860700001)(54906003)(41300700001)(7696005)(6666004)(478600001)(426003)(336012)(16526019)(110136005)(26005)(1076003)(2616005)(86362001)(5660300002)(36756003)(40460700003)(8936002)(82740400003)(81166007)(8676002)(4326008)(356005)(36900700001);
DIR:OUT; SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2023 06:17:17.3963 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 8bcdea3e-9025-4cb8-8471-08db9d57469b
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: CO1PEPF000044FA.namprd21.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5085
Precedence: bulk
List-ID:
X-Mailing-List: linux-acpi@vger.kernel.org
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 device attribute for preferred core states.
Add one new early parameter `enable` to allow user to
enable the preferred core if the processor and power
firmware can support preferred core feature.
Signed-off-by: Meng Li
Signed-off-by: Perry Yuan
Reviewed-by: Mario Limonciello
---
drivers/cpufreq/amd-pstate.c | 120 ++++++++++++++++++++++++++++++-----
1 file changed, 104 insertions(+), 16 deletions(-)
diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index 9a1e194d5cf8..d02305675f66 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,8 @@
#define AMD_PSTATE_TRANSITION_LATENCY 20000
#define AMD_PSTATE_TRANSITION_DELAY 1000
+#define AMD_PSTATE_PREFCORE_THRESHOLD 166
+#define AMD_PSTATE_MAX_CPPC_PERF 255
/*
* TODO: We need more time to fine tune processors with shared memory solution
@@ -65,6 +68,9 @@ static struct cpufreq_driver amd_pstate_epp_driver;
static int cppc_state = AMD_PSTATE_UNDEFINED;
static bool cppc_enabled;
+/*Preferred Core featue is supported*/
+static bool prefcore = true;
+
/*
* AMD Energy Preference Performance (EPP)
* The EPP is used in the CCLK DPM controller to drive
@@ -290,23 +296,21 @@ static inline int amd_pstate_enable(bool enable)
static int pstate_init_perf(struct amd_cpudata *cpudata)
{
u64 cap1;
- u32 highest_perf;
int ret = rdmsrl_safe_on_cpu(cpudata->cpu, MSR_AMD_CPPC_CAP1,
&cap1);
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))
- highest_perf = AMD_CPPC_HIGHEST_PERF(cap1);
-
- WRITE_ONCE(cpudata->highest_perf, highest_perf);
+ if (prefcore)
+ WRITE_ONCE(cpudata->highest_perf, AMD_PSTATE_PREFCORE_THRESHOLD);
+ else
+ WRITE_ONCE(cpudata->highest_perf, AMD_CPPC_HIGHEST_PERF(cap1));
WRITE_ONCE(cpudata->nominal_perf, AMD_CPPC_NOMINAL_PERF(cap1));
WRITE_ONCE(cpudata->lowest_nonlinear_perf, AMD_CPPC_LOWNONLIN_PERF(cap1));
@@ -318,17 +322,15 @@ static int pstate_init_perf(struct amd_cpudata *cpudata)
static int cppc_init_perf(struct amd_cpudata *cpudata)
{
struct cppc_perf_caps cppc_perf;
- u32 highest_perf;
int ret = cppc_get_perf_caps(cpudata->cpu, &cppc_perf);
if (ret)
return ret;
- highest_perf = amd_get_highest_perf();
- if (highest_perf > cppc_perf.highest_perf)
- highest_perf = cppc_perf.highest_perf;
-
- WRITE_ONCE(cpudata->highest_perf, highest_perf);
+ if (prefcore)
+ WRITE_ONCE(cpudata->highest_perf, AMD_PSTATE_PREFCORE_THRESHOLD);
+ else
+ WRITE_ONCE(cpudata->highest_perf, cppc_perf.highest_perf);
WRITE_ONCE(cpudata->nominal_perf, cppc_perf.nominal_perf);
WRITE_ONCE(cpudata->lowest_nonlinear_perf,
@@ -676,6 +678,72 @@ 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, u64 *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 {
+ ret = cppc_get_highest_perf(cpu, highest_perf);
+ }
+
+ return (ret);
+}
+
+static void amd_pstate_init_prefcore(void)
+{
+ int cpu, ret;
+ u64 highest_perf;
+
+ if (!prefcore)
+ return;
+
+ for_each_online_cpu(cpu) {
+ ret = amd_pstate_get_highest_perf(cpu, &highest_perf);
+ if (ret)
+ break;
+
+ sched_set_itmt_core_prio(highest_perf, cpu);
+
+ /* check if CPPC preferred core feature is enabled*/
+ if (highest_perf == AMD_PSTATE_MAX_CPPC_PERF) {
+ prefcore = false;
+ return;
+ }
+ }
+
+ /*
+ * This code can be run during CPU online under the
+ * CPU hotplug locks, so sched_set_amd_prefcore_support()
+ * cannot be called from here. Queue up a work item
+ * to invoke it.
+ */
+ 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;
@@ -1037,6 +1105,12 @@ 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", prefcore ? "enabled" : "disabled");
+}
+
cpufreq_freq_attr_ro(amd_pstate_max_freq);
cpufreq_freq_attr_ro(amd_pstate_lowest_nonlinear_freq);
@@ -1044,6 +1118,7 @@ cpufreq_freq_attr_ro(amd_pstate_highest_perf);
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,
@@ -1063,6 +1138,7 @@ static struct freq_attr *amd_pstate_epp_attr[] = {
static struct attribute *pstate_global_attributes[] = {
&dev_attr_status.attr,
+ &dev_attr_prefcore.attr,
NULL
};
@@ -1506,6 +1582,8 @@ static int __init amd_pstate_init(void)
}
}
+ amd_pstate_init_prefcore();
+
return ret;
global_attr_free:
@@ -1527,7 +1605,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"))
+ 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");
From patchwork Tue Aug 15 06:15:43 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: "Meng, Li \(Jassmine\)"
X-Patchwork-Id: 714113
Return-Path:
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
aws-us-west-2-korg-lkml-1.web.codeaurora.org
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
by smtp.lore.kernel.org (Postfix) with ESMTP id 7BE6AC04A94
for ; Tue, 15 Aug 2023 06:18:25 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S235016AbjHOGRy (ORCPT );
Tue, 15 Aug 2023 02:17:54 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33532 "EHLO
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S234948AbjHOGR0 (ORCPT
); Tue, 15 Aug 2023 02:17:26 -0400
Received: from NAM10-BN7-obe.outbound.protection.outlook.com
(mail-bn7nam10on2059.outbound.protection.outlook.com [40.107.92.59])
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2568E7E;
Mon, 14 Aug 2023 23:17:24 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=klmKXxAnmdwra9HguU882kezokXjcmsIfdPDQkP6W0la16GrZW0GnkHFLqUk7XtLvcBjeuhLTOGQ+c+RE2Z7C7bsAtJSZClcWje4folV7V1imgc1373Uc2pvV8dmXGPQVlEaENAdr0Ng2SOwD2cC8zm6l1VBDFI0shES7hMp2izAkf8dvdQRS1gAbMR2cpzOKEhk9aIHgU8MIaVw/GOq2LRdf/Exy1e0kkUtzvCAh6H1QlQ0c4jsly0B6YldDMSZ1FIQc6SdHoFFeFpItac6bTBmNtnt3TQyuKY//NbXj5QLebSfCszr7q0rxvireg2CSdHAp/GFrKuB2c2leQ4teg==
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=NswM4r5KNQfDxP4tMos8eW3yF0w29xh1Is0/AXnWSt8=;
b=AXdIU6Zs2MRroHM18OTBer5tW5v6fB414nZFDx+1TJPzd4Z2bANUgSFjfVwsGTV6nRBImqCYYhZWilBYUhWW6BxWJaftKm3+Q0wDdEoJKmMZwaqWql+zRia33HKvZcPyJ7Z8sHjnlJhqVjKeNYrw5O0g4pu/98muR6hxr5ooD8wy5sJ2E3LfVrXHO6gIWCrxKV1ajXGD3WM0UDUL4npk9EniGr8Ppy8VPBGioiuZ06kzxUdTOf/lIoMkvaYMTNxflDZA+vbS4FHelT4Vk0+pWbs6wqlon74GLf/wiLToZhKmzxUuy7a75WIZdxUWKRVp74xgEcnuoDe27C3Ubo9i8A==
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
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=NswM4r5KNQfDxP4tMos8eW3yF0w29xh1Is0/AXnWSt8=;
b=tMcSK9nsYoMec+k6LOduPC7nZTiPtfLjkd8cLOZF73PNRy/vXpY7/s34nmLfAg4I4wI1dYJRSjfjT088yzZcaP+QLR4HV/TtHYt9MKzacpmCmrFHBPNMLediwUsEqVgKiZjnknOjf0aKZ+A7ZLJsmsg6vjckthR5osiQKk3loD4=
Received: from CH2PR18CA0019.namprd18.prod.outlook.com (2603:10b6:610:4f::29)
by CH3PR12MB8993.namprd12.prod.outlook.com (2603:10b6:610:17b::16)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.24; Tue, 15 Aug
2023 06:17:19 +0000
Received: from CO1PEPF000044FA.namprd21.prod.outlook.com
(2603:10b6:610:4f:cafe::14) by CH2PR18CA0019.outlook.office365.com
(2603:10b6:610:4f::29) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.33 via Frontend
Transport; Tue, 15 Aug 2023 06:17:19 +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
CO1PEPF000044FA.mail.protection.outlook.com (10.167.241.200) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.6723.3 via Frontend Transport; Tue, 15 Aug 2023 06:17:19 +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.27; Tue, 15 Aug
2023 01:17:12 -0500
From: Meng Li
To: "Rafael J . Wysocki" ,
Huang Rui
CC: , ,
, ,
Shuah Khan , ,
"Nathan Fontenot" ,
Deepak Sharma ,
Alex Deucher ,
Mario Limonciello ,
Shimmer Huang , "Perry Yuan" ,
Xiaojian Du , Viresh Kumar ,
Borislav Petkov , Meng Li
Subject: [PATCH V2 4/7] cpufreq: Add a notification message that the highest
perf has changed
Date: Tue, 15 Aug 2023 14:15:43 +0800
Message-ID: <20230815061546.3556083-5-li.meng@amd.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20230815061546.3556083-1-li.meng@amd.com>
References: <20230815061546.3556083-1-li.meng@amd.com>
MIME-Version: 1.0
X-Originating-IP: [10.180.168.240]
X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: CO1PEPF000044FA:EE_|CH3PR12MB8993:EE_
X-MS-Office365-Filtering-Correlation-Id: 4e0cb996-8896-4f25-3b49-08db9d5747d6
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: PIRSfwb+Q637o8X3D1f+uEA7OLeuo/iXy18tj4RRQykw6G7VZh1pyugSGvhUEiu9hHhjqyq20X/7amDjFTpvpZV7flfyOZTS7NfVio1MaBEzlKy/VP5vJU6pTOLhJC4noLlxe+UCyMLVpphc54uqypkC3RkG4qmDhlCujvjX34HwpmRg6RDQ4TzamrS7jvXuTwIwNBFYokLeP8lhDbhg2B5r7YjHwWkpD8gf3v1ophY7uls01xsbNsaA6ubHgny3PPs5Dsi6RvtrDZVOygI7DwQVMsrl3+B26JY+9okq0l0bWnKcpd+uC21cCGrTWgc3R3hORhp920qCOeqrDbv03otnNgH28hjNm5h/HaCfztv+ESTO4we1aAY2/Hziqfr+dkdJqlBfxY1xyPZw2LWsyM5wSnY7CREsQUH+fg35+UVJB+m6fGHqCkAdaiE79Yy3OJZOSK/uT+QNjal1/AFufMANTBua+Dtg9gnCfLqCYTo8MqEmyBxK5Vb+o9f1L7qd8o2TddxKxXL+iLTg3lZhXzxkOZ/8NdHeR09mX88GMJqaAnLUop1LEHbd0HHY3IB8GBl1sRzQAFhmK3kAMGn8TBKs14RXhD8fzPI72l5E0aNj0PaLEQ5lg6m3ZCKtkDpPFJnGQHQF2QK5CSoyWyTE8ql9hOfCKppWMtvCanxHsrNB+0LWkC4FPEIoWOLxdZ/0uZbsVPgu5JkRq8JKyAnHSZAobG8WQV+EnJtUGvjWLGu4zRj8ppHQrEyyAt+qrDQaKCgWWWSeIS3MOm/TMN8OReJ0pn27WMJoF/7R5OwwEdY=
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:(13230028)(4636009)(346002)(396003)(136003)(39860400002)(376002)(186006)(1800799006)(82310400008)(451199021)(40470700004)(36840700001)(46966006)(426003)(8936002)(41300700001)(316002)(8676002)(36860700001)(47076005)(336012)(1076003)(2616005)(966005)(16526019)(83380400001)(26005)(6666004)(7696005)(40460700003)(478600001)(40480700001)(54906003)(110136005)(36756003)(15650500001)(86362001)(4326008)(6636002)(70586007)(70206006)(82740400003)(81166007)(356005)(5660300002)(2906002)(226483002)(36900700001);
DIR:OUT; SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2023 06:17:19.4588 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 4e0cb996-8896-4f25-3b49-08db9d5747d6
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: CO1PEPF000044FA.namprd21.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8993
Precedence: bulk
List-ID:
X-Mailing-List: linux-acpi@vger.kernel.org
Please refer to the ACPI_Spec for details on the highest
performance and notify events of CPPC.
Signed-off-by: Meng Li
Link: https://uefi.org/specs/ACPI/6.5/08_Processor_Configuration_and_Control.html?highlight=cppc#cpc-continuous-performance-control
---
drivers/acpi/processor_driver.c | 6 ++++++
drivers/cpufreq/cpufreq.c | 13 +++++++++++++
include/linux/cpufreq.h | 4 ++++
3 files changed, 23 insertions(+)
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
index 4bd16b3f0781..29b2fb68a35d 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_highest_perf(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;
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 50bbc969ffe5..842357abfae6 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -2675,6 +2675,19 @@ void cpufreq_update_limits(unsigned int cpu)
}
EXPORT_SYMBOL_GPL(cpufreq_update_limits);
+/**
+ * cpufreq_update_highest_perf - Update highest performance for a given CPU.
+ * @cpu: CPU to update the highest performance for.
+ *
+ * Invoke the driver's ->update_highest_perf callback if present
+ */
+void cpufreq_update_highest_perf(unsigned int cpu)
+{
+ if (cpufreq_driver->update_highest_perf)
+ cpufreq_driver->update_highest_perf(cpu);
+}
+EXPORT_SYMBOL_GPL(cpufreq_update_highest_perf);
+
/*********************************************************************
* BOOST *
*********************************************************************/
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 172ff51c1b2a..766c83a4fae7 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -231,6 +231,7 @@ int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu);
void refresh_frequency_limits(struct cpufreq_policy *policy);
void cpufreq_update_policy(unsigned int cpu);
void cpufreq_update_limits(unsigned int cpu);
+void cpufreq_update_highest_perf(unsigned int cpu);
bool have_governor_per_policy(void);
bool cpufreq_supports_freq_invariance(void);
struct kobject *get_governor_parent_kobj(struct cpufreq_policy *policy);
@@ -376,6 +377,9 @@ struct cpufreq_driver {
/* Called to update policy limits on firmware notifications. */
void (*update_limits)(unsigned int cpu);
+ /* Called to update highest performance on firmware notifications. */
+ void (*update_highest_perf)(unsigned int cpu);
+
/* optional */
int (*bios_limit)(int cpu, unsigned int *limit);
From patchwork Tue Aug 15 06:15:44 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: "Meng, Li \(Jassmine\)"
X-Patchwork-Id: 713827
Return-Path:
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
aws-us-west-2-korg-lkml-1.web.codeaurora.org
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
by smtp.lore.kernel.org (Postfix) with ESMTP id AB01AC04A6A
for ; Tue, 15 Aug 2023 06:18:56 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S234894AbjHOGSZ (ORCPT );
Tue, 15 Aug 2023 02:18:25 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34708 "EHLO
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S234978AbjHOGRe (ORCPT
); Tue, 15 Aug 2023 02:17:34 -0400
Received: from NAM12-BN8-obe.outbound.protection.outlook.com
(mail-bn8nam12on20614.outbound.protection.outlook.com
[IPv6:2a01:111:f400:fe5b::614])
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B37A81730;
Mon, 14 Aug 2023 23:17:26 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=FEjduneP/OK1qJ/VWTOeIXY2tJUmChSJviS22kQorAxAlnenPHSon+zTh0TDx7a35FzG5RQ2SphQY+gui/0EtMmONxyUyqDSTS5cr8d5fwuOUy6V/l+B2SqzzGw1awzOgWwZ+TzsDtVMgqstHDe1OLIP848kuMRfS123/ozQJXzlAXiLpRjioS4OjhLHYAdTDIK2OuvQbobJ+0Fq1XY9KmqRU332TDLiCJ+b53PvUp8uy/JoqU3VCIpvc7iYhGZq48e5a1zl+Vfjn+hy/+oNIJjBgwc/xBkkU1qBZAIqWf6hrTohhlPSIatUDmXJFtqW4baS130KnxAY7N24jt6JlQ==
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=R+RQepWEpY82uXKfwKZoS1l72EUVb6pDIlmqk6YuNWs=;
b=Gboqa3ZvBuOLU7PAmq7ecLazurmbO6YB6+5WxttizlDVa3sww51nIoznUBz3VYKS7utgiWYDf3BzD108tzsBL+xFtvGgxPlRNBvDVvhrQ9YqZYpjTGR9Wj8QoVa2NISYMNiAZs020BNMzHbU9XcUL38IydlHeK31Y41wEOX9xgcPBgLrhCtknCDY+vhNSD7A8qZX7seevu0ptmxU0Xvv67TE+6+cQRnPhEHebUU+SF1DOLyqxH2O4Ciru/Ed8mEtaNffz839fNWR5KlY8X/9TYY+ACYuyrJrZoDyYqtIsWtfjbtpThzPfLcf9Cr7TqSdxV0JYDtr5u02hPLACSQJPw==
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
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=R+RQepWEpY82uXKfwKZoS1l72EUVb6pDIlmqk6YuNWs=;
b=eJVdBTNvK+7Lz8uU6HNitsYGey7bgk96Qq65tmCGQtMf4GdFLDnR1A2DWfamcqqOgDmvTKjbRLfCnqizOteOH8aehVmq8RI70BmRowWe+Umw6DwJTzfcW8JvN9ZAJAlVlTNI1pSUj1Kg7fZZW9YXGbHs+UJkn7DTCtVT5dk1jaI=
Received: from MWH0EPF00056D0D.namprd21.prod.outlook.com
(2603:10b6:30f:fff2:0:1:0:6) by CY5PR12MB6300.namprd12.prod.outlook.com
(2603:10b6:930:f::8) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.26; Tue, 15 Aug
2023 06:17:23 +0000
Received: from CO1PEPF000044F8.namprd21.prod.outlook.com
(2a01:111:f403:f807::1) by MWH0EPF00056D0D.outlook.office365.com
(2603:1036:d20::b) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.11 via Frontend
Transport; Tue, 15 Aug 2023 06:17:22 +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
CO1PEPF000044F8.mail.protection.outlook.com (10.167.241.198) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.6723.3 via Frontend Transport; Tue, 15 Aug 2023 06:17:22 +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.27; Tue, 15 Aug
2023 01:17:17 -0500
From: Meng Li
To: "Rafael J . Wysocki" ,
Huang Rui
CC: , ,
, ,
Shuah Khan , ,
"Nathan Fontenot" ,
Deepak Sharma ,
Alex Deucher ,
Mario Limonciello ,
Shimmer Huang , "Perry Yuan" ,
Xiaojian Du , Viresh Kumar ,
Borislav Petkov , Meng Li
Subject: [PATCH V2 5/7] cpufreq: amd-pstate: Update AMD Pstate Preferred Core
ranking dynamically
Date: Tue, 15 Aug 2023 14:15:44 +0800
Message-ID: <20230815061546.3556083-6-li.meng@amd.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20230815061546.3556083-1-li.meng@amd.com>
References: <20230815061546.3556083-1-li.meng@amd.com>
MIME-Version: 1.0
X-Originating-IP: [10.180.168.240]
X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: CO1PEPF000044F8:EE_|CY5PR12MB6300:EE_
X-MS-Office365-Filtering-Correlation-Id: 4900fa3d-4163-4e40-cb75-08db9d5749c3
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: ibkb5pf0D2SPJVGUBys4+mgkw0cXtla5uPmyi9hzhV3kYqvpULKb+3/ulFywAYBXY4D+8S/yq/IU7PvET+Ap71D6WPVF0H8EDkvsPnFQxYuRA2plZOBlUx0uFoh8TDwKKafM0abSlWxJyWa5HLqcNGFRszfSwMkb4ddGMvdMBfMRz7w6NO2i+NCkXgPly8Inmzibt8XN74eLrsMakd3yQQOz2nX1IgMhaS1riCI9PVlQDZBlTzb3Vwt0ppAbqm1o3ICpYZ1X147DqyUXZQm7cb/+diaX0DtJSPE/4BjFR9YCj/gItTk6W+ChmPvfPgq5HxipCWTu+bjUlDy+UVKynavmU84CB0ppb2XFsUGTx2Lmh543+Yo29iJzG0+BZMJLsK1fBLuwzeZvrZJMAzNmv6Z6rX6HrdRtC+keJXqMpgYDuIoVumbt8IyLaAKCyIV9mLTQOtOkqgI/jbR31ll2X7JkPV1Z9gCtkgHh+z49exQPkyWz24Eey5WcrK8SyRol3yelnrCp35LcVxf6QQfsxb5HRTjDgbsSHWacwzFswjgvnHDqhaMlm8vB7EMPsLy6Bkit8jChvYt0P90uGyBSxIkARm40c1RHTCZeb/t1oUBdz47UgmEVlTaRLAhGwYKEAs1PzGk4x5mbMxcocpcAS68RKDZahZHXlHIP6EoSAgWZ2m3Ng1DZd9veM3yMwDiZNomtYH6Hc1i0ps01MzfTPWV4WOROYE74w0OXP7KY3pErTumZmXbVPaN8ozyZUdRNBSi55tUSBVeWzPonEfkvpQ==
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:(13230028)(4636009)(39860400002)(396003)(136003)(376002)(346002)(82310400008)(186006)(1800799006)(451199021)(46966006)(36840700001)(40470700004)(40480700001)(82740400003)(356005)(81166007)(36756003)(86362001)(40460700003)(15650500001)(16526019)(478600001)(6666004)(2906002)(7696005)(1076003)(2616005)(26005)(70206006)(426003)(336012)(83380400001)(316002)(54906003)(41300700001)(110136005)(70586007)(6636002)(5660300002)(8676002)(8936002)(4326008)(36860700001)(47076005)(36900700001);
DIR:OUT; SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2023 06:17:22.6934 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 4900fa3d-4163-4e40-cb75-08db9d5749c3
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: CO1PEPF000044F8.namprd21.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6300
Precedence: bulk
List-ID:
X-Mailing-List: linux-acpi@vger.kernel.org
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.
Signed-off-by: Meng Li
---
drivers/cpufreq/amd-pstate.c | 32 ++++++++++++++++++++++++++++++++
include/linux/amd-pstate.h | 1 +
2 files changed, 33 insertions(+)
diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index d02305675f66..8a8e4ecb1b5c 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_highest_perf, AMD_CPPC_HIGHEST_PERF(cap1));
return 0;
}
@@ -336,6 +337,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_highest_perf, cppc_perf.highest_perf);
if (cppc_state == AMD_PSTATE_ACTIVE)
return 0;
@@ -744,6 +746,34 @@ static void amd_pstate_init_prefcore(void)
schedule_work(&sched_prefcore_work);
}
+static void amd_pstate_update_highest_perf(unsigned int cpu)
+{
+ struct cpufreq_policy *policy;
+ struct amd_cpudata *cpudata;
+ u32 prev_high = 0, cur_high = 0;
+ u64 highest_perf;
+ int ret;
+
+ if (!prefcore)
+ return;
+
+ ret = amd_pstate_get_highest_perf(cpu, &highest_perf);
+ if (ret)
+ return;
+
+ policy = cpufreq_cpu_get(cpu);
+ cpudata = policy->driver_data;
+ cur_high = highest_perf;
+ prev_high = READ_ONCE(cpudata->prefcore_highest_perf);
+
+ if (prev_high != cur_high) {
+ WRITE_ONCE(cpudata->prefcore_highest_perf, cur_high);
+ sched_set_itmt_core_prio(cur_high, cpu);
+ }
+
+ cpufreq_cpu_put(policy);
+}
+
static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
{
int min_freq, max_freq, nominal_freq, lowest_nonlinear_freq, ret;
@@ -1468,6 +1498,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_highest_perf = amd_pstate_update_highest_perf,
.name = "amd-pstate",
.attr = amd_pstate_attr,
};
@@ -1482,6 +1513,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_highest_perf = amd_pstate_update_highest_perf,
.name = "amd-pstate-epp",
.attr = amd_pstate_epp_attr,
};
diff --git a/include/linux/amd-pstate.h b/include/linux/amd-pstate.h
index 446394f84606..fa86bc953d3e 100644
--- a/include/linux/amd-pstate.h
+++ b/include/linux/amd-pstate.h
@@ -70,6 +70,7 @@ struct amd_cpudata {
u32 nominal_perf;
u32 lowest_nonlinear_perf;
u32 lowest_perf;
+ u32 prefcore_highest_perf;
u32 max_freq;
u32 min_freq;
From patchwork Tue Aug 15 06:15:45 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: "Meng, Li \(Jassmine\)"
X-Patchwork-Id: 713826
Return-Path:
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
aws-us-west-2-korg-lkml-1.web.codeaurora.org
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
by smtp.lore.kernel.org (Postfix) with ESMTP id 8914FC41513
for ; Tue, 15 Aug 2023 06:20:32 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S230157AbjHOGUB (ORCPT );
Tue, 15 Aug 2023 02:20:01 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39680 "EHLO
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S235066AbjHOGTW (ORCPT
); Tue, 15 Aug 2023 02:19:22 -0400
Received: from NAM11-CO1-obe.outbound.protection.outlook.com
(mail-co1nam11on2087.outbound.protection.outlook.com [40.107.220.87])
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51EDC2D42;
Mon, 14 Aug 2023 23:17:38 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=cwbS2qY1le5pxV+06Ofjn+5LOoqb1/kBf9GJVEXq/mLto+Y0/i5kSwivfxTTu5QUiHNwDP9u5cILIYHd2aD8qhXXzStF/eFBIbiIAvcyTTSXYBciPv1CWdJrbvKVp7EyFiGzB85nLXnt3AluVFSBYad0jXome67x4OEpa7b6HGaENNyOmaaQe9TTBnUXyJT2m6VM2Lk8E+ylVO2oJQ8Bc+ozEvu+gAQ2u/y8Z7aDycQdqFSCZH4HbbYYXIwmqB5xLFBrhpNNhh9htppKxH+fHpVnV3+vpGy5ikyq4PNL9Lh5TOaaeKFZ3n5u+ICoROZNQZ5798QwdqItKehDf+mdHw==
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=UatvUdnAHKDm3NQ3MVcDdoeY7zuTYCcF2McOkq3aFNQ=;
b=QRwcroT9IMFWNxEIcUcX6UT5m3WtExObUtsbYVllsFV5NMY9lkM4muWK62pcagqUpbUMyg3n0IqgPwhPp6AVRqnXTOkRwNd2x7fjKuTv1zXAZnoRTF28XtqlA4ztbCUgPfD5HCfj9JsLF4sgQdZCcx2lQ5q7cC3F3lMl2DSErnHHxjL70NdXIRb+v1tAOCs2leaTjpECVdv0x2TrFAKGATrMyf1OJokHu+mtBGmta4uuVEcUMtxtGFRLTyUD5pbN77HyXB/WlasojjRiBMxQKwQXOLSk6cyGIlpCWX7QCCYlEmyuF4TpC7UGnmckD4BRkSgfVBINqejG6+Odw8avIQ==
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
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=UatvUdnAHKDm3NQ3MVcDdoeY7zuTYCcF2McOkq3aFNQ=;
b=pSSn3YUckvG4Tb99X0V6xppmeeuIltFlybJOUnwGqa54gM5pRVCpluxwlf6mSUP03Ezez1dxpA4U0fx5ft7YZneaMKVi+ITAnoeUtfYeTHOrtFtbnNbtTHXJ6WWuDJZ5AqusV3MMaFewDqGUGzkZ262aw61hC7Ti/FJHFL5jVvo=
Received: from MW4P223CA0004.NAMP223.PROD.OUTLOOK.COM (2603:10b6:303:80::9) by
CH2PR12MB4103.namprd12.prod.outlook.com (2603:10b6:610:7e::17) with
Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.6678.26; Tue, 15 Aug 2023 06:17:33 +0000
Received: from CO1PEPF000044F9.namprd21.prod.outlook.com
(2603:10b6:303:80:cafe::a4) by MW4P223CA0004.outlook.office365.com
(2603:10b6:303:80::9) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.33 via Frontend
Transport; Tue, 15 Aug 2023 06:17:32 +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
CO1PEPF000044F9.mail.protection.outlook.com (10.167.241.199) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.6723.3 via Frontend Transport; Tue, 15 Aug 2023 06:17:32 +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.27; Tue, 15 Aug
2023 01:17:22 -0500
From: Meng Li
To: "Rafael J . Wysocki" ,
Huang Rui
CC: , ,
, ,
Shuah Khan , ,
"Nathan Fontenot" ,
Deepak Sharma ,
Alex Deucher ,
Mario Limonciello ,
Shimmer Huang , "Perry Yuan" ,
Xiaojian Du , Viresh Kumar ,
Borislav Petkov , Meng Li
Subject: [PATCH V2 6/7] Documentation: amd-pstate: introduce AMD Pstate
Preferred Core
Date: Tue, 15 Aug 2023 14:15:45 +0800
Message-ID: <20230815061546.3556083-7-li.meng@amd.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20230815061546.3556083-1-li.meng@amd.com>
References: <20230815061546.3556083-1-li.meng@amd.com>
MIME-Version: 1.0
X-Originating-IP: [10.180.168.240]
X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: CO1PEPF000044F9:EE_|CH2PR12MB4103:EE_
X-MS-Office365-Filtering-Correlation-Id: a918cc8e-b72e-43a6-d2e9-08db9d574fc2
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: 7oYhXr0457ow6ofVQ5sTjl7cbcQw7n0zgXmKH/1oG74PQWkzEiqptSzx52KXWlJ7EkryHJrrM7rEjslgXLWE6bTyxdWdvM8Jp7g2T6DOUJT61zqocXiVKjHFTRVbuj/wM4GGn3lBudDpKClQ0aXYfnU9UYjWW+EuM3FZyvwIiYFVeuCUDlbnZ9G2Cqi+HkUVcoQo8mhNIVGDQqDqU9VPFOgLeBBCxW7m5j5GguGIJIc5+pLxceI1J0riYFgnWNoIfqqRHiQ5j+XYwF3EdUD/MXVf1g9S/SVjzlvmJ+nRG3vHKp3IBpi7oOb8G2q1wKdUvrgF3P2BSy2MY0e2qDcja1DKmdx7aR8HijeWFV8otTnrAAvyMajfATxA887+UQjIwrLYjnUxWhVnUWeq7kmERpUEBk4u6wh47ZYYQfVZLVp8PBnvEOKgr6xmJ9zw4hxDsCSo0FJpsRnCfqLT5Ljg3bjSqetx2TP6yAkvUQy4MLPxYQ8HCD1CRI4ThLRn5FU9SHgh2qHSt9cj2HItYR1AVp9pDjrRMCflsD7xO294ZFVQQTCg6tq+7WO3ApYhcLRo6I1aIYrVs7xJlZGtlC/8ejv9DwHPDaw2ZBiu7B3wg5g2aHZTZP1Idz5geKEJ8iYvbomRI+EOztw2sqYf+C0fnctNG61JlQ7pabFfhOjZtOvJjYQKnEYS23+nKT2lsAfDTHv9zsRo3Hi00RlE+N210NZzwL/yr317eypmoNmNeH7WyiT1hdPjXX8mqF7KvaZELwPMiRyCK/JY8wTVuZz5Nw==
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:(13230028)(4636009)(39860400002)(136003)(346002)(376002)(396003)(1800799006)(186006)(82310400008)(451199021)(40470700004)(46966006)(36840700001)(40480700001)(40460700003)(356005)(478600001)(81166007)(82740400003)(8676002)(6666004)(8936002)(4326008)(110136005)(70206006)(41300700001)(316002)(6636002)(54906003)(70586007)(36860700001)(83380400001)(47076005)(7696005)(2616005)(1076003)(26005)(426003)(336012)(16526019)(86362001)(2906002)(5660300002)(36756003)(36900700001);
DIR:OUT; SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2023 06:17:32.7378 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: a918cc8e-b72e-43a6-d2e9-08db9d574fc2
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: CO1PEPF000044F9.namprd21.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4103
Precedence: bulk
List-ID:
X-Mailing-List: linux-acpi@vger.kernel.org
Introduce AMD Pstate Preferred Core.
check preferred core state:
$ cat /sys/devices/system/cpu/amd-pstate/prefcore_state
Signed-off-by: Meng Li
---
Documentation/admin-guide/pm/amd-pstate.rst | 54 +++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/Documentation/admin-guide/pm/amd-pstate.rst b/Documentation/admin-guide/pm/amd-pstate.rst
index 1cf40f69278c..ef2b69935311 100644
--- a/Documentation/admin-guide/pm/amd-pstate.rst
+++ b/Documentation/admin-guide/pm/amd-pstate.rst
@@ -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`` enable the scheduler to favor scheduling on cores
+can be get a higher frequency with lower voltage under preferred core.
+And it has the ability to dynamically change the preferred core based on the
+workload and platform conditions and accounting for thermals and aging.
+
+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 Preferred Core Switch
+=================================
+Kernel Parameters
+-----------------
+
+``AMD Pstate Preferred 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``
+
+If ``amd_prefcore=disable`` is passed to kernel command line option
+then disable ``AMD Pstate Preferred Core`` if platform can support
+the Preferred Core feature.
+
User Space Interface in ``sysfs`` - General
===========================================
@@ -385,6 +427,18 @@ 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 Preferred Core.
+
+ "disabled"
+ Disable the AMD Preferred Core
+
+
+ This attribute is read-only to check the state of Preferred Core.
+
``cpupower`` tool support for ``amd-pstate``
===============================================
From patchwork Tue Aug 15 06:15:46 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: "Meng, Li \(Jassmine\)"
X-Patchwork-Id: 714112
Return-Path:
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
aws-us-west-2-korg-lkml-1.web.codeaurora.org
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
by smtp.lore.kernel.org (Postfix) with ESMTP id A2392C41513
for ; Tue, 15 Aug 2023 06:20:00 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S235096AbjHOGT2 (ORCPT );
Tue, 15 Aug 2023 02:19:28 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60906 "EHLO
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S235120AbjHOGSO (ORCPT
); Tue, 15 Aug 2023 02:18:14 -0400
Received: from NAM12-MW2-obe.outbound.protection.outlook.com
(mail-mw2nam12on2057.outbound.protection.outlook.com [40.107.244.57])
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D193B26B3;
Mon, 14 Aug 2023 23:17:36 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=LBQZk2YDzZjRbDyMJKJT4alVTnLui+ZvWRHGGDfV4z/cq24+9Vvlqu8DKNXhqGakw3wwfYV7eldMsj/MGyjkdA/zNO+EapB/YyLBV7sJIKX3CMpzyZmihfbZwp+K9pHJ2T8wBXhl6h06jZ3iKd7C3v52HhtLxIepN/aYxyHWzXJ+PE8XRrc5c1VEBWW4XJhojwrpkeNkRa4Mj2gH3MWDT1U+TfWuU8k7PXk5sDP1Uym76YFWtVfV5/W+pUz4ZesWZxPVWpUQ4kPp6wQWwWxTe1HPKBFzMVGkSpLReV1nR4CRgxQFWnuSPksAhi3b4tRtIofsnYl9MDxXREHHB/mLJg==
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=fD5SW4ZMZUACDC28VDgFXSClMzlQYedjVWuE+bSD/4U=;
b=L2tViCdkb++o2ecI5tti4EEwJt7DwqZJRqOy7U3TkYcydFk+d9fLNEaOgHndxm7WfIaPm4qPJBGNbuZpkkLwfvsubx8UyV7GgLEM6yDpTkwzSbh4d1hNqi8thw1BtnlYZoLDGItFjgaaMCBhp9xDNWMLQor4avloBlF4YtcmiiBdo3eUZYb2oXXSnY9mwQl8N6zA5ZdW75im1dNA9YgI57NnT3bAyZwv+v0jV95vqWibGvrXiELQEOWv39mMgS8w4axHIzEIC96P4g/CihIxQbYoLpNqblF4KCYuwvLk4NXaaqsUuf7+YDT2e2/wKldy1MdE24pn6CrLqCjLdn1tfw==
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
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=fD5SW4ZMZUACDC28VDgFXSClMzlQYedjVWuE+bSD/4U=;
b=lf0/2wmscXW7GiId4MTQzSrNqpus+ndMkN+wupy0PexDhOUgDX1AslumtETI5hVpAzO9ftzfjV4V7dYn8gAV5dSQ9IiPgaiEP1FcSEI5K6qS+aUv+WhA7dCr66CwuwHovIllqaPk13eEc1nZNXxG348uVa0vJGNc9VdbYBFfvrw=
Received: from MW4PR04CA0140.namprd04.prod.outlook.com (2603:10b6:303:84::25)
by SN7PR12MB6791.namprd12.prod.outlook.com (2603:10b6:806:268::22)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.24; Tue, 15 Aug
2023 06:17:33 +0000
Received: from CO1PEPF000044F6.namprd21.prod.outlook.com
(2603:10b6:303:84:cafe::14) by MW4PR04CA0140.outlook.office365.com
(2603:10b6:303:84::25) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.33 via Frontend
Transport; Tue, 15 Aug 2023 06:17:33 +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
CO1PEPF000044F6.mail.protection.outlook.com (10.167.241.196) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.6723.3 via Frontend Transport; Tue, 15 Aug 2023 06:17:33 +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.27; Tue, 15 Aug
2023 01:17:27 -0500
From: Meng Li
To: "Rafael J . Wysocki" ,
Huang Rui
CC: , ,
, ,
Shuah Khan , ,
"Nathan Fontenot" ,
Deepak Sharma ,
Alex Deucher ,
Mario Limonciello ,
Shimmer Huang , "Perry Yuan" ,
Xiaojian Du , Viresh Kumar ,
Borislav Petkov , Meng Li
Subject: [PATCH V2 7/7] Documentation: introduce AMD Pstate Preferrd Core mode
kernel command line options
Date: Tue, 15 Aug 2023 14:15:46 +0800
Message-ID: <20230815061546.3556083-8-li.meng@amd.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20230815061546.3556083-1-li.meng@amd.com>
References: <20230815061546.3556083-1-li.meng@amd.com>
MIME-Version: 1.0
X-Originating-IP: [10.180.168.240]
X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: CO1PEPF000044F6:EE_|SN7PR12MB6791:EE_
X-MS-Office365-Filtering-Correlation-Id: f101cc84-d0a3-46e9-6b01-08db9d574ffb
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: 1RHaqXVRk2Jj3xamC56i2BJ8MPGNKkOw/pPlu50JDEtxRw0XPj5JP3nrhkgS2SH8A0R1OOVYdRQdPYMMDe9qWvUv/de/Yiobayx6/b58H1N//Puzs2sEBiEt4vD/AodOV46OPT7TzAPtsJLQLBxSjHOLqqXgeCw+ZfuawaN5i1XBg4f8rX8It0Sja6RC93anMM9cnnBwYMH/CJgj9g4voR6DzxiR+NdQ3wmksj981KjMGmD7RCnXBR/+vUIMT1YT4NxL6ptC262JoHocrpPdX0LS3gduV51qgvkfvRsKFYkEK/g7OJzGgPYC0rdEHgCkhZ5ei1lZKK3f7YSOnyulpVwI95rr6qgHLrg+P7MXoBd2PR9yhNmxLneShAC/khkeAqXwPj10plY9vAUFE7ive5qLwA+sQrLjz7/zeddr356a3gaFlD1MSadtOCzyebG8r8WtAKxpgFsivKnUGqPwiAiLrvhVHCgBLcjHbrwOW9f4eajC/dQu8OKVcnmPP5brVbZ2CHBWVwg7Ftb2aHGFzjBVq+Fe2ZiCdku84vD6aNUJWq8fD6YawPZCNRTMpQFZNx/UQMnIKN7aRK/F+LQhPfSId40Ham9XAd0d6TiQyrPDgKE9pm2PTUFO9n/Fn5aCKXgdFzlxOk+PYTKg1aMQHlcDTgfb8/O9t6OfuZ5iN/AbtJEbPF4KH1j7G6uN2y5sPvQs8zVtHbDJlRWcmgMsfIzOuT30O6h0vvKB3fA0+sCm5ZbVPWtLve1lFsFGL0PhAXVbTccO7wEK+bl0dXltEkReFyLg8eoPfpVgfCWCvFHbirp/yNdgKVWMUnjCbpF5
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:(13230028)(4636009)(346002)(39860400002)(376002)(136003)(396003)(186006)(1800799006)(451199021)(82310400008)(40470700004)(36840700001)(46966006)(83380400001)(36756003)(426003)(336012)(47076005)(36860700001)(86362001)(40480700001)(41300700001)(478600001)(356005)(81166007)(54906003)(70586007)(6636002)(70206006)(316002)(8676002)(110136005)(5660300002)(4326008)(82740400003)(8936002)(40460700003)(2616005)(1076003)(16526019)(26005)(7696005)(6666004)(2906002)(4744005)(36900700001)(14943795004);
DIR:OUT; SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2023 06:17:33.0931 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: f101cc84-d0a3-46e9-6b01-08db9d574ffb
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: CO1PEPF000044F6.namprd21.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6791
Precedence: bulk
List-ID:
X-Mailing-List: linux-acpi@vger.kernel.org
AMD Pstate driver support enable/disable Preferred core.
Default enabled on platforms supporting AMD Preferred Core.
Disable AMD Pstate Preferred Core with
"amd_prefcore=disable" added to the kernel command line.
Signed-off-by: Meng Li
---
Documentation/admin-guide/kernel-parameters.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 23ebe34ff901..4f78067bb8af 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -363,6 +363,11 @@
selects a performance level in this range and appropriate
to the current workload.
+ amd_prefcore=
+ [X86]
+ disable
+ Disable AMD Pstate Preferred Core.
+
amijoy.map= [HW,JOY] Amiga joystick support
Map of devices attached to JOY0DAT and JOY1DAT
Format: ,