From patchwork Tue Apr 23 08:40:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yuan, Perry" X-Patchwork-Id: 791394 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2048.outbound.protection.outlook.com [40.107.100.48]) (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 8A46055C3E; Tue, 23 Apr 2024 08:41:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.100.48 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713861685; cv=fail; b=BMq7Ns2w0ZFV5wMLDEP+Nx96wp9WtBQxmTtBtXiFN9qybbLOBS45pFFC/ZiCh5NdztEGYBzEemH4bMvqioD+9+jWIrDtm2r6s0CZs2Sf/lL7+/CZzIcE98JfXNXnS0w222HlaIYEIW8hZry54wPI0Gk1t7YMiwB8y2abgKVHIEk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713861685; c=relaxed/simple; bh=Qu5Afz9UWo2+jh55rJU4yf3lDIbdSIZHUcyJ0G4SbeQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GJ7uYItdArqhGcMXCEI9AvstMO6j6UhUCm0HbckC9QYSEwQzdR7AcsfFza0kpRUVJLTy0vuQaGQXB/Fjc5um2ivyECQQOOBZcvbKH72QL2BeyC/l/gsOSrexzkBWaqFOaATGzYUxvAe7gyVXy4SwIeKxXUdkzeRZy1jZR8bOgrI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=TbzqpFOu; arc=fail smtp.client-ip=40.107.100.48 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="TbzqpFOu" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Nr2rVZVMd+ItU4WBuYUH/wiAqs7b7so8DGq+SEUWfRltktBQeGeSBEZwvivD7obKYIX7Jt6uhB2RBYt67cM3kifdG1kaRNoZlYHZR1rpj/RkQ1GRcrcBcnyNAluCBDLvBDjEpCNZGcili6bIQdwX9CaM6u3uver7kazgNSuJWYFM9z6ulNmUiCDV57e/4uvmhPwbt93P0Ie6yUxfRHGtLEob8j0jLhNs8NQh/50VK4nTwCSfRDt2d/avZVQyadreww9gEQWbfS+APKfzp+Kgt8qdgfGU/d5ZEM/uHaAjOqMJqC1pKXODLINGVrrEnbDoQ5tKh9sA77ovir1arFE6zQ== 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=xv8mEHJQpoR48nIE/dSM0qcHAwVi2GF1wMpBp1R893s=; b=Jz+3EpbaOtTHz89v1M8rtUcUAxTayRL8XTn5vfWa1BukMtcm8aGd4P+Qwa5VTehIhjn3v+4nSnX8jFUSNpYfwRL7tzeqV63qb/YVBnWawA+l77Hz+D3oNek7JjwEsMgO75I9gnGHQ7Q5ocxgRK4yslshnjTdEqoOfwdVxy+wQGnCNSzDgk8E4buVa8qa35ScumzDMcFbxg3tRBqNP1igfMMJs5tvP7qqpxi3YeJJBzRqGzUO19TNQueJRxMQfj5DwyNdH+nydvbHahGzAerJyS2Chxvk0q02zjxon75gBhWEg4MwRAC6P+NxauHzyGXhpEtmkzuw7rnD/31EToqypQ== 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=xv8mEHJQpoR48nIE/dSM0qcHAwVi2GF1wMpBp1R893s=; b=TbzqpFOuO00CXEyw6RDILX3f3ptoguTB04SdIKPa3wz3frzONw1Ef8zQacRyyJ+03rWNSMmcGIUWw9y+drIIaooelSkpibsXkGTju4v+0ghqpnec8eqTWAzNFZH2XnkzITBbnlisvqu8a9V4Az4PtTQSp66EXyzzvS11t4qrHmE= Received: from DS7PR05CA0060.namprd05.prod.outlook.com (2603:10b6:8:2f::13) by MN2PR12MB4111.namprd12.prod.outlook.com (2603:10b6:208:1de::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Tue, 23 Apr 2024 08:41:21 +0000 Received: from DS3PEPF000099DD.namprd04.prod.outlook.com (2603:10b6:8:2f:cafe::7d) by DS7PR05CA0060.outlook.office365.com (2603:10b6:8:2f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.21 via Frontend Transport; Tue, 23 Apr 2024 08:41:20 +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 DS3PEPF000099DD.mail.protection.outlook.com (10.167.17.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7519.19 via Frontend Transport; Tue, 23 Apr 2024 08:41:18 +0000 Received: from pyuan-Chachani-VN.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.35; Tue, 23 Apr 2024 03:41:15 -0500 From: Perry Yuan To: , , , , , , CC: , , , , , Subject: [PATCH v7 1/6] cpufreq: acpi: move MSR_K7_HWCR_CPB_DIS_BIT into msr-index.h Date: Tue, 23 Apr 2024 16:40:54 +0800 Message-ID: <858950a317b7093df72142d227c686290ba9eda5.1713861200.git.perry.yuan@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-pm@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: DS3PEPF000099DD:EE_|MN2PR12MB4111:EE_ X-MS-Office365-Filtering-Correlation-Id: 9a33af9b-a197-4a9c-2bab-08dc63712568 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gEZ5SqMQj74BDsFNHB3Zu5EdiwWHkP4DFyyJFrzm1HXbIRBulN1JlmFTo6BmzeZ76yPNQbdaN40g6h0RGcqKOgcEsRHJ3FXqauJ397wt1h38q45H+R66+BoyTfZJeSBBN9FC98vxecCP6NSvHynbror9efHmbs8sSYC93Vb+hN7Re8zVCgaewiEsYeKiw+b5lqN/G5YSEcybc/D+XJIvsjZE+yT9xARxV8CePGlbRII/06eC1kcLgqxcSC1/i7Z3arayEBcYCys3pHdgMo/engSIOWO9pfoCY2IDDewJ9xUr1zyJpF0ziRlP0855U/JH7dYG+2yGo+4preyMAs43dGkrtp1edAxXJGIdM9T9CppR7IC++puENLPLc04TtI8fASWPATt721T2lY+kJQ1g6XEh0Vu6Q3A4++/4emmUv/6pULPvpHI9GDlxdEBbp7Mr+h57ZDIpcoS3yyyTTZyWIB2utCoor5ZRfJYxy7TmzV1m6wjkjKoEZVPtMn4pUPZomoEfxEva9Aa62l5mHgkIjYZVNQRJLp/ZGQDGta0DwamCgqEEAfTl0Wljjpdy5N15dS0KQwSa/kzg2BqDXAWf+8pu/l13Dv+jn1+fcDNP+TZssRp1Y3RbX/8Wk7ljv+0ErEWkbr/+Hh6l4Fc8Z/djoCuHAWwmE6nJ9nTgUNDampfzm+4z8XyVH9jGcX1HVpdtJ0q2/rsYFgxql+onTlMxvAxNBSlvCN5K949Yxb0jVlODy1S4coLp9X1zGTRIEgLgIwyMhDCjUYSmIQkXgPS87X+A6JX6NLz011HZeftyjpjoJ1IvYaCxQmdFSqTCKL1u4botIOUfAqOAQ0hpxi9hdQfsw+qwD48gVecF3aDkA+EydAgcZ5pYdqI7JJG6r9G6bcM82R58GklRIPgpJ7tkBba/2nSAI4iCqW7DIJM1CD+V8kDU2bRQa18u4qr7Wv7gcI+zBM2ArkfzW+sBbgmqBq0AY5oynstdWmPdH4bIJuuMSO4VL9wwGFyHVm2iTZp2/1wH0PMa18q5+YDiTsWA3azo/NcyvdbScyD607xCNxL/uLGGTs7HYG9IgI+GjPeKW6IFqX/+tzjVmbVwtIoesL9SIU/x5KWfMJzmQ2W4CVAq7Ys5kL6CBZw1v7XFKlrpkyIwaIv4YilYfqRd0qr2R4MVBYgiQWqaYicD7OGvfMZdXxepetoVGVnG42bE2bgu+qdgd7Bu8k8lKf22Q2dEB4U3dLwM3BR1IdjOodQ9nVJhIbQFDQQNh41O2kd7p3YC7QkE58OJ5pdveBT/zqetu/tP9VxEu89ROxbCiXIz4AMD5TOiXqZ+po7VYEpP3O+bELKEG4h6vwp1nF9nVohvT7c4208mWsk7V7LXOg2XRec= 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)(1800799015)(82310400014)(36860700004)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2024 08:41:18.9024 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9a33af9b-a197-4a9c-2bab-08dc63712568 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: DS3PEPF000099DD.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4111 There are some other drivers also need to use the MSR_K7_HWCR_CPB_DIS_BIT for CPB control bit, so it makes sense to move the definition to a common header file to allow other driver to use it. No intentional functional impact. Suggested-by: Gautham Ranjal Shenoy Signed-off-by: Perry Yuan Acked-by: Rafael J. Wysocki --- arch/x86/include/asm/msr-index.h | 2 ++ drivers/cpufreq/acpi-cpufreq.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index e72c2b872957..8738a7b3917d 100644 --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h @@ -782,6 +782,8 @@ #define MSR_K7_HWCR_IRPERF_EN BIT_ULL(MSR_K7_HWCR_IRPERF_EN_BIT) #define MSR_K7_FID_VID_CTL 0xc0010041 #define MSR_K7_FID_VID_STATUS 0xc0010042 +#define MSR_K7_HWCR_CPB_DIS_BIT 25 +#define MSR_K7_HWCR_CPB_DIS BIT_ULL(MSR_K7_HWCR_CPB_DIS_BIT) /* K6 MSRs */ #define MSR_K6_WHCR 0xc0000082 diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index 37f1cdf46d29..2fc82831bddd 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c @@ -50,8 +50,6 @@ enum { #define AMD_MSR_RANGE (0x7) #define HYGON_MSR_RANGE (0x7) -#define MSR_K7_HWCR_CPB_DIS (1ULL << 25) - struct acpi_cpufreq_data { unsigned int resume; unsigned int cpu_feature; From patchwork Tue Apr 23 08:40:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yuan, Perry" X-Patchwork-Id: 791854 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2081.outbound.protection.outlook.com [40.107.236.81]) (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 F1E505646D; Tue, 23 Apr 2024 08:41:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.81 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713861687; cv=fail; b=rUs7VGG7DtV8jnwuxzk8AGfJHzuSanbIEMiNVARYonmPpxrlSSrnmant1YFFmS9Fh3av2D/mw7+qYwxmV6nBTezBANdJDIp3ygZXn2X3URk9hDl523eR90ZID6TtUuLLdoPdMXF2ZYFwg3pGtVcIxTJDyPaOHDw+LaPn2B73fQ0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713861687; c=relaxed/simple; bh=FE/sfwHDOGQtH6qM9dG6Cma2RAMyAkVxTa8FUWzm50o=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=c4WDP2/BsBtIZwYVO8OQCT20qDNScBfq+P4H8fH8EZ2No2tZSTlMe1D+/coi+4dMo60HLt9qdVHu2L782TIuBu0L1+7BzemKNJ5HjYdLisPSiL/N+pJgerObhfjgOiFz6ZXl0LEKunYG1e8z5Vf7YSBGBzXa1AEVzgTtU6H9vuk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=4aP1cVsH; arc=fail smtp.client-ip=40.107.236.81 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="4aP1cVsH" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ai4FfJB6gTaHMJwWPDUi6HFwqBKnP5K9M/vX7s9nI5OG4IP6ONTyoqwDqZG4cKWb6/7o3chc7oHayDAINewCGg1bVwTwnsyPb0HcQ8QOTU0uJDBwEobvTOxpDOsGBcyV2BfFdx1kJOAbU9y5NOvxPuD/RtP4vZ5JSl8Ko8jbOCoOZGpaCchRbh6HJh38RwyIt5uRttBbu7y+pDAZH2xN7QKkzUIgeKHNpw4E+wb8ii4u1jEm7glfxfiGktXxGJmvNTRyA0Dv3HVj4Hzi+dztfgsdByLXaCPIFrmqqvaXFvWsFfTW0NTBHp/3dum5+Q7zZpzBYhHwfLcEUVyF9QyA3A== 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=HXVtL5wLz5yZGfvoQ6cbXQnSrZH4mJWVzLmdkkLYfys=; b=JhNvh0M8D0OQ8nv7YuTOI5cQRW/zIg41vSWjyFHQynEbwySi1HnK9UgOkypK7tRE3Nwk9srxSHv+yu3yQg1kRoANEOZw+fjhHHwmzYm5O6vDGmCWx+AcWet7+yN6uEkfDcWpGlQVq8Xz0UY+LniaWog5IPtbXFNUvyGa+muTIg0YnG2YIFcr+IQyAqKIh8iul+BR3Kcafur4r/+NDcYSoMMA1WFPYY4A/0rqkoTv/kxUqsd8DbrMv3dzhl6LcdJ+/7PimwjoDlvp/bvzzUzq0djrA2f/1dZX222r6L4dlvJfNdU7z+4ISRtR1S/a9Vr828qD/t5tOoI2MdkwVaQKzA== 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=HXVtL5wLz5yZGfvoQ6cbXQnSrZH4mJWVzLmdkkLYfys=; b=4aP1cVsHnebFMfILUUwGnRJPW0e8VrVYfewcs/WK86UXeQWrvyeYAx5aMq/nnKrdMOH6F1Jt/Tz1B8qmNqB8yyW7XjPtFj7VdgNiimOLUSdGb7qT4+LAgFIlpfH/dd357jMOQeeiwryxDjx0F8aGcs6BgMBLLACl3ohv5+FrHBs= Received: from DM6PR03CA0036.namprd03.prod.outlook.com (2603:10b6:5:40::49) by MN2PR12MB4077.namprd12.prod.outlook.com (2603:10b6:208:1da::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Tue, 23 Apr 2024 08:41:22 +0000 Received: from DS3PEPF000099DE.namprd04.prod.outlook.com (2603:10b6:5:40:cafe::8b) by DM6PR03CA0036.outlook.office365.com (2603:10b6:5:40::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.34 via Frontend Transport; Tue, 23 Apr 2024 08:41: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 DS3PEPF000099DE.mail.protection.outlook.com (10.167.17.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7519.19 via Frontend Transport; Tue, 23 Apr 2024 08:41:22 +0000 Received: from pyuan-Chachani-VN.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.35; Tue, 23 Apr 2024 03:41:18 -0500 From: Perry Yuan To: , , , , , , CC: , , , , , Subject: [PATCH v7 2/6] cpufreq: amd-pstate: initialize new core precision boost state Date: Tue, 23 Apr 2024 16:40:55 +0800 Message-ID: <5754a2e7a93a048431fa7a745582e62ba67df4e9.1713861200.git.perry.yuan@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-pm@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: DS3PEPF000099DE:EE_|MN2PR12MB4077:EE_ X-MS-Office365-Filtering-Correlation-Id: f346ccd3-6b52-4ea1-206b-08dc63712783 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: b5jn4gq/KBQ/gK89zx24ZhLD12bJfoLr3cj8hqYjeeiApYjF3iVo1jy2Rmzm+fo5n1/FGyn+uMp6pQwiGpMkEyB+TP6BRuyCnBnDSh1K0fCymhZl3lc17zjYXAcUDzfwwpoM2glD9YInmtVZ84AHKDohiRXjx8UEPoHN4QPR5uCmzbgEpUXdI59mgelSeqjr3FPcF5rW8dLdBgQcuIj7t4SaM+MeFe7jBMz6k9+dciVGDFhDL4rIQ0sOjNVosoa9Sj+q0MSbU9NZtkk+cem8lNQ5+AI/09VazDvWVCYe6RK1uc1saB2bwWApNXPEANdV/poGcYqbOvuEDeDELYY5/RgkH9q0+SOOc+tuoBD9N3IRie+Ehhh1BfvGBifKbzp7dVc9JuHUrMR7drMUYBedNIF89quJTZq5Sg8Cs0r7dJtNuf3nwu3vIWeSMO4TBJOa+aM4IfjoJojlOa3cHELTyJjVoBpN3LU3xDa1Mv+qXC25qR3RB2zzAlaD3hHc6KlVPcQmRIhXVPhdZN6D49AZgqTVLcKwy2JSLNw4NDDy0467jTBpH5w0BCJpo1HMOFmrFnsdQ2n9PtnDqVwCwuXDmPwpeq0fajxwOIbuZgtwWYDcsp4sN1uiuQtGpr5F8nsEz4/zDDbOWxfr/T1QRMOx1RfFpivyMsniknEEWCZYrP3YgUfDLqsjI2ONqjTjk6eWCOt3qlhzXoQX18s3PdeARvWsoDe1KsQ5L1jKyCBaG0ovgbzIxJWbIK59VRjVi1YWydivboHKh0bmFziPh06nZWY0vzAkrquuKCcA/rQA4wsgcmJ6pe+DhC7ZZIX9pjFzFU9liNKe8UUuV+kA55xBRCp2xEOAtCfmqklLDCjMeJoBUkxExdM3cb2ti8GZIjvzEBIi7JzCI4sLs7XRrz4UIOLwnjSG+oNeFuNl25AG2qAlEZCWH9xwn8DugSfrmWCsdVq+xQl6ZO4mj2Jvm/mQKna32G+HgASoZlpmsUg9RAxHG7KbY4ZL+sdbWWGgqtyLiadOgO5N8aZo8iSG1MKjtAEhzNKnYrGHNFqAnsPk+LJtk355zaBIFcpYv0gWlMJE+AtBhNft+adsPphvV25G+jFIFReoqjfO7vBfLv44XAR2gz2wKy7RlhG3z7M3BIYhxgyJgplNvhMfTA0Npk0peIt8dfKfeLsmbbs9UdAOPU/vy4AJHcAUa1PrBk172peoO10pQo3akeITIsR1Z/m6v8RvrvLiA+qf6M2+c3AAKf1/WNmvFsFe6dBLMi07wLBlBg7RRgzA2ERohVcaLP/aqAK8XyiCDpyYEFvydBt+deYsJTzi67qFmIbm7B9wPx2aI+lhGTonh0GwZObAnowmBDAFAlO0TKomDnIKPEjKgw79qSwlssJIE0hB43nV/4lL 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)(1800799015)(376005)(36860700004)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2024 08:41:22.4189 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f346ccd3-6b52-4ea1-206b-08dc63712783 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: DS3PEPF000099DE.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4077 From: Perry Yuan Add one global `global_params` to represent CPU Performance Boost(cpb) state for cpu frequency scaling, both active and passive modes all can support CPU cores frequency boosting control which is based on the BIOS setting, while BIOS turn on the "Core Performance Boost", it will allow OS control each core highest perf limitation from OS side. The active, guided and passive modes of the amd-pstate driver can support frequency boost control when the "Core Performance Boost" (CPB) feature is enabled in the BIOS. When enabled in BIOS, the user has an option at runtime to allow/disallow the cores from operating in the boost frequency range. Add an amd_pstate_global_params object to record whether CPB is enabled in BIOS, and if it has been activated by the user Reported-by: Artem S. Tashkinov" Cc: Oleksandr Natalenko Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217931 Signed-off-by: Perry Yuan --- drivers/cpufreq/amd-pstate.c | 39 +++++++++++++++++++++++++++--------- include/linux/amd-pstate.h | 13 ++++++++++++ 2 files changed, 42 insertions(+), 10 deletions(-) diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index 83a29b257794..3d86cd7c9073 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -68,6 +68,8 @@ static int cppc_state = AMD_PSTATE_UNDEFINED; static bool cppc_enabled; static bool amd_pstate_prefcore = true; static struct quirk_entry *quirks; +struct amd_pstate_global_params amd_pstate_global_params; +EXPORT_SYMBOL_GPL(amd_pstate_global_params); /* * AMD Energy Preference Performance (EPP) @@ -665,18 +667,27 @@ static int amd_pstate_set_boost(struct cpufreq_policy *policy, int state) return 0; } -static void amd_pstate_boost_init(struct amd_cpudata *cpudata) +static int amd_pstate_boost_init(struct amd_cpudata *cpudata) { - u32 highest_perf, nominal_perf; + u64 boost_val; + int ret; - highest_perf = READ_ONCE(cpudata->highest_perf); - nominal_perf = READ_ONCE(cpudata->nominal_perf); + ret = rdmsrl_on_cpu(cpudata->cpu, MSR_K7_HWCR, &boost_val); + if (ret) { + pr_err_once("failed to read initial CPU boost state!\n"); + return ret; + } - if (highest_perf <= nominal_perf) - return; + amd_pstate_global_params.cpb_supported = !(boost_val & MSR_K7_HWCR_CPB_DIS); + + if (amd_pstate_global_params.cpb_supported) { + cpudata->boost_supported = true; + current_pstate_driver->boost_enabled = true; + } - cpudata->boost_supported = true; - current_pstate_driver->boost_enabled = true; + amd_pstate_global_params.cpb_boost = amd_pstate_global_params.cpb_supported; + + return ret; } static void amd_perf_ctl_reset(unsigned int cpu) @@ -900,6 +911,11 @@ static int amd_pstate_cpu_init(struct cpufreq_policy *policy) amd_pstate_init_prefcore(cpudata); + /* initialize cpu cores boot state */ + ret = amd_pstate_boost_init(cpudata); + if (ret) + goto free_cpudata1; + ret = amd_pstate_init_perf(cpudata); if (ret) goto free_cpudata1; @@ -956,7 +972,6 @@ static int amd_pstate_cpu_init(struct cpufreq_policy *policy) policy->driver_data = cpudata; - amd_pstate_boost_init(cpudata); if (!current_pstate_driver->adjust_perf) current_pstate_driver->adjust_perf = amd_pstate_adjust_perf; @@ -1363,6 +1378,11 @@ static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy) amd_pstate_init_prefcore(cpudata); + /* initialize cpu cores boot state */ + ret = amd_pstate_boost_init(cpudata); + if (ret) + goto free_cpudata1; + ret = amd_pstate_init_perf(cpudata); if (ret) goto free_cpudata1; @@ -1417,7 +1437,6 @@ static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy) return ret; WRITE_ONCE(cpudata->cppc_cap1_cached, value); } - amd_pstate_boost_init(cpudata); return 0; diff --git a/include/linux/amd-pstate.h b/include/linux/amd-pstate.h index 6b832153a126..c5e41de65f70 100644 --- a/include/linux/amd-pstate.h +++ b/include/linux/amd-pstate.h @@ -134,4 +134,17 @@ struct quirk_entry { u32 lowest_freq; }; +/** + * struct amd_pstate_global_params - Global parameters, mostly tunable via sysfs. + * @cpb_boost: Whether or not to use boost CPU P-states. + * @cpb_supported: Whether or not CPU boost P-states are available + * based on the MSR_K7_HWCR bit[25] state + */ +struct amd_pstate_global_params { + bool cpb_boost; + bool cpb_supported; +}; + +extern struct amd_pstate_global_params amd_pstate_global_params; + #endif /* _LINUX_AMD_PSTATE_H */ From patchwork Tue Apr 23 08:40:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yuan, Perry" X-Patchwork-Id: 791393 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2086.outbound.protection.outlook.com [40.107.220.86]) (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 97CB74206B; Tue, 23 Apr 2024 08:41:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.86 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713861690; cv=fail; b=p9ar2hGEacBZ6pWRBytCNu2vUNLV1op2wDUnn2KBirqiVqZi8cMqh7VbljsrlgO+JmOf6bfWJtV7os7UHae2tdqQVwad/nBdmUZVSnOCuylFjW5aKmiQ7JyNKR18iI6KisSD0ytqqCJThRhbXTuluZ9+BMdSE/nDKbWmZ7FgMIg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713861690; c=relaxed/simple; bh=p5eHppetK2EKwGHrcAV63rC8nmLrf7pIZQiUWTMRW7g=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Plj78MkDBD/hvopUNXL9CGBEivOwep5VnnMHeyUfZ9rkWsVaBevIZNRKBmaMi3iEchMupchqs6T5nQUNffJT9anV0gvR4nPv6+Goum2jZPaD/Fzb9FOkdETHKx4Vk6Zlgh1Yz+4sK4H1oeIZzwYCbPpveRohJ0iLyyK/GL6O3Es= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=wLuQ+u/7; arc=fail smtp.client-ip=40.107.220.86 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="wLuQ+u/7" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WGEePpyTT7cX+YeQG1xZVeNjDpF365POo//QgLQQ3hpaRopAz5YhJoUsSa9sR4RwlUObjmvTaDXiqnC/mkaw/dP+jBZu26Q76945+tlzlF1p1tS8emzHjhChluB5vq4QY7E0bmNdtECKZDtb9/CtEfjUlXHW2NpYB50H5qQ4ZBOZ64fL9nObsAfarHaIbXGJmZLdliTfc0Z4pblEmUOzQlsaYNmKtW+rrq01w9moI9qiupbEXTxJYNjq4mYnYde+tcZCLCcT8GxQwODr9YGqAO60cmIUuq1HsS2MB86mbeVFMsFRc8ObpY2J912wGs419a3W/Y5HBir2HZmfEgJR9g== 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=5/GYXRcJuGbvGSU+cqtUtpParHVWRRBgh1rA2z2WJfY=; b=fMxzZ+/eU9xJlwRITo8ikbsHaigmStw0JQKtMWebKWIZcb09ip3NNbULix2fnjzQhrh/MSHrf/QnpFnMeB+23DMHPnDbTgiRMccUPjYTPP4nvQQ+oFNS62DOxaZ1GeVS5c2XJRqITCQPfYYCO1qyQqxvVNfVMP4c0TWbGZBE+boQ2R0uoXnFGMnGc/Q9BO6u2elIHQ1FsFM5+5mU7LFt78FC0MNUDNJoNa/5g77vz4lMcGCieMxqjR9lQoESwANXOQgALfi3ET0u3b4GGbrI4oorxPLqSARNEUtjWT+kRcWbhWSOYw7YTM0hEORPdDeRJ7kwfh/akU2oFF07gjCAug== 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=5/GYXRcJuGbvGSU+cqtUtpParHVWRRBgh1rA2z2WJfY=; b=wLuQ+u/7QEjE2GbPUZ+JsXPptzlHzeMWS8TC4e4FThJqOxw/FiY/rsBQ7VJ52R3aa2fkioG6O6fNhG/1TTFTsoBdSDbcrvZKKq5xVwUTY1+8jMEAW3Htp60r05MMrgmlViyI/RtMniLhOlZ74juQndjmtZS73vw09QltSKFEqiY= Received: from DM6PR10CA0007.namprd10.prod.outlook.com (2603:10b6:5:60::20) by DS0PR12MB8562.namprd12.prod.outlook.com (2603:10b6:8:164::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Tue, 23 Apr 2024 08:41:26 +0000 Received: from DS3PEPF000099DB.namprd04.prod.outlook.com (2603:10b6:5:60:cafe::c) by DM6PR10CA0007.outlook.office365.com (2603:10b6:5:60::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.34 via Frontend Transport; Tue, 23 Apr 2024 08:41:26 +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 DS3PEPF000099DB.mail.protection.outlook.com (10.167.17.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7519.19 via Frontend Transport; Tue, 23 Apr 2024 08:41:26 +0000 Received: from pyuan-Chachani-VN.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.35; Tue, 23 Apr 2024 03:41:22 -0500 From: Perry Yuan To: , , , , , , CC: , , , , , Subject: [PATCH v7 3/6] cpufreq: amd-pstate: implement cpb_boost sysfs entry for boost control Date: Tue, 23 Apr 2024 16:40:56 +0800 Message-ID: <5a357c1ac3504f8a69def8834a6d9557b5d592ed.1713861200.git.perry.yuan@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-pm@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: DS3PEPF000099DB:EE_|DS0PR12MB8562:EE_ X-MS-Office365-Filtering-Correlation-Id: b96feac0-a9b5-4458-9b33-08dc637129d3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZvUYowubLtZhM4LzK1pAW0yC16672Jf2kcyBSc7nsBqsGgv6CWlmdLtYJpdwLp24ciFicXWqT7mXu4kZJB3FmwB99tY/WItIpnUrxDRPxV6IwPIy+Vn+xppUW4uKdrxp/Ihe1PDwKU2K7dryqRqHAJgD2Ketd+OLBNkiemyFGVKHwAE92IdMuDowsZ0fQaeUD9FDczkUqHW33Fj9bJIH0prk0zCI1EY0rHXEtAnz7bQlJZ0SrRUlVgerPznGw5CaHBS10Svr96NIDFMTtcPKS7Bz0CIKNzeYJjgDC5j3+c5Fpd0aUYx1yHv3yY4LE2+b/3OK27/ZYGLxGs4yDQQ9LccysE0YAqBCPXPBaw+NVLy/vNbZ1YRgscYfgT7Bu9eUG0/C+UumyB1lDjywqQTcfxEL6LdOH7RL1IIiZBIrrzvTIHfVzmlS09E36tv7AttUx4api5fUOVFljDnIuwbTAzxtXSTtWGAL3NIv/owGVcdLZLngno/QTdLNqZjnWCzh3/cIQR/92D9gS8KfEhfBIZ/zxCRngzpoG5n4kXuWkOh1nzFchq/m3Hzt5jgjgI0mxqaMGHlxgrAKjrj9Izqgx459SN/ARMkBId3xzMucklbU2Y3QtJS/2pVp2do6NPr0iw/P/qu3uggJH6ziLrgxP3ZlWlshGz+s5VDGx/Gt/V52EEwYd+oZMfv0K1fWgljyFbkICW5I6Moab79thfmXk2dTz6yrxu4MN/j4GObRMH83fw28Bq8WPamHgS5Jub+VR+GZVn4/mohBW38wTLbPreraQ8YtWdQnVUb3uipdGHYBUP93/kH1fMcp5BtXHxLBnK8ortMRJmEZNq/Qi3+NN4k9bGH7NqzEFDb0D98uT0qRmMF7P7CuJB2BGEwj/9cKutXVL1ctUseh/BVM0OBInfprUq9rt1TnYO/T4pJwQO4D/AohZTPPy4eUF1Re8msmPHp/XOUIzvE3/+qh+JH8x+q2MGzAjnQ3QHD//grhaGtBDIQJ+UCiLTmhaIamdHfBMKXYDSQL3KE8za92JF98g1UkiwK01RaU96UVg2bdYD1SeNLAgRIg8FTWoHDoiE2lhpzQLvJ/nxbZb1bzEP0oDT93OLBybGlBSHGXutP4ekQLbWeRMKSMUCcD5vhL3OE44DAmlCcN46OdO7K7+Co7Q+vHtz906FrxeCfcTFpWs+CaygXJvaa/Q8w7gHNP2yaYZv+jLDd+yqKg6qLDvglZvQUiEi4oid6/y96Mu98Cw5dDgiecMsxDP7RM5bCikYQ4E/G8RNWZrjUwayZrDpZRxaQUoe4wvrm2DM24MjxBCbOISizxpwZ8IVxqxONZsxg97f+/tG+v9AmZxgpymnltW8VzHrKBp7Xui6/LfqH93Fh0XftxoRjQx6dcj+mJrYrp 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)(376005)(82310400014)(1800799015)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2024 08:41:26.3018 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b96feac0-a9b5-4458-9b33-08dc637129d3 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: DS3PEPF000099DB.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB8562 From: Perry Yuan With this new sysfs entry `cpb_boost`created, user can change CPU boost state dynamically under `active`, `guided` and `passive` modes. And the highest perf and frequency will also be updated as the boost state changing. 0): check current boost state cat /sys/devices/system/cpu/amd_pstate/cpb_boost 1): disable CPU boost sudo bash -c "echo 0 > /sys/devices/system/cpu/amd_pstate/cpb_boost" 2): enable CPU boost sudo bash -c "echo 1 > /sys/devices/system/cpu/amd_pstate/cpb_boost" Link: https://bugzilla.kernel.org/show_bug.cgi?id=217931 Link: https://bugzilla.kernel.org/show_bug.cgi?id=217618 Signed-off-by: Perry Yuan --- drivers/cpufreq/amd-pstate.c | 99 ++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index 3d86cd7c9073..49eeb38fcf20 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -1291,6 +1291,103 @@ static ssize_t prefcore_show(struct device *dev, return sysfs_emit(buf, "%s\n", str_enabled_disabled(amd_pstate_prefcore)); } +static int amd_cpu_boost_update(struct amd_cpudata *cpudata, u32 on) +{ + struct cpufreq_policy *policy = cpufreq_cpu_acquire(cpudata->cpu); + struct cppc_perf_ctrls perf_ctrls; + u32 highest_perf, nominal_perf, nominal_freq, max_freq; + int ret; + + if (!policy) + return -ENODATA; + + highest_perf = READ_ONCE(cpudata->highest_perf); + nominal_perf = READ_ONCE(cpudata->nominal_perf); + nominal_freq = READ_ONCE(cpudata->nominal_freq); + max_freq = READ_ONCE(cpudata->max_freq); + + if (boot_cpu_has(X86_FEATURE_CPPC)) { + u64 value = READ_ONCE(cpudata->cppc_req_cached); + + value &= ~GENMASK_ULL(7, 0); + value |= on ? highest_perf : nominal_perf; + WRITE_ONCE(cpudata->cppc_req_cached, value); + + wrmsrl_on_cpu(cpudata->cpu, MSR_AMD_CPPC_REQ, value); + + } else { + perf_ctrls.max_perf = on ? highest_perf : nominal_perf; + ret = cppc_set_epp_perf(cpudata->cpu, &perf_ctrls, 1); + if (ret) { + pr_debug("failed to set energy perf value (%d)\n", ret); + return ret; + } + } + + if (on) + policy->cpuinfo.max_freq = max_freq; + else + policy->cpuinfo.max_freq = nominal_freq; + + policy->max = policy->cpuinfo.max_freq; + + if (cppc_state == AMD_PSTATE_PASSIVE) { + ret = freq_qos_update_request(&cpudata->req[1], + policy->cpuinfo.max_freq); + } + + cpufreq_cpu_release(policy); + + return ret; +} + +static ssize_t cpb_boost_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + return sysfs_emit(buf, "%u\n", amd_pstate_global_params.cpb_boost); +} + +static ssize_t cpb_boost_store(struct device *dev, struct device_attribute *b, + const char *buf, size_t count) +{ + bool new_state; + ssize_t ret; + int cpu; + + mutex_lock(&amd_pstate_driver_lock); + if (!amd_pstate_global_params.cpb_supported) { + pr_err("Boost mode is not supported by this processor or SBIOS\n"); + return -EINVAL; + } + + ret = kstrtobool(buf, &new_state); + if (ret) + return -EINVAL; + + amd_pstate_global_params.cpb_boost = !!new_state; + + for_each_present_cpu(cpu) { + + struct cpufreq_policy *policy = cpufreq_cpu_get(cpu); + struct amd_cpudata *cpudata = policy->driver_data; + + if (!cpudata) { + pr_err("cpudata is NULL\n"); + ret = -ENODATA; + cpufreq_cpu_put(policy); + goto err_exit; + } + + amd_cpu_boost_update(cpudata, amd_pstate_global_params.cpb_boost); + refresh_frequency_limits(policy); + cpufreq_cpu_put(policy); + } + +err_exit: + mutex_unlock(&amd_pstate_driver_lock); + return ret < 0 ? ret : count; +} + cpufreq_freq_attr_ro(amd_pstate_max_freq); cpufreq_freq_attr_ro(amd_pstate_lowest_nonlinear_freq); @@ -1301,6 +1398,7 @@ 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 DEVICE_ATTR_RW(cpb_boost); static struct freq_attr *amd_pstate_attr[] = { &amd_pstate_max_freq, @@ -1325,6 +1423,7 @@ static struct freq_attr *amd_pstate_epp_attr[] = { static struct attribute *pstate_global_attributes[] = { &dev_attr_status.attr, &dev_attr_prefcore.attr, + &dev_attr_cpb_boost.attr, NULL }; From patchwork Tue Apr 23 08:40:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yuan, Perry" X-Patchwork-Id: 791853 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2077.outbound.protection.outlook.com [40.107.236.77]) (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 D102958AB8; Tue, 23 Apr 2024 08:41:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.77 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713861694; cv=fail; b=eWDKt6hsIrb5LmP2T/fPvdSxFqkwIP18ouaon1sNTNESNJ5HEbIhBPmngOQf5GaJ7cE+/roo4Gb7z//H7lWL6HefahqqEzoC4jE0MlOfFonjemsjdNJzM2I0DYKxMyyP3oeJ9ib7TwdiMwZqq6FEwEpRvM8saoAq0+5FMFTF+cg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713861694; c=relaxed/simple; bh=7lCM0ord5pkHnRpNvKxdV2TKbBldYbqEX2/0Y/Qmt2U=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=uU82T4mD/XcgHeen2H94MeOpVIhHKrY/Ci2MFaMb6YPenuiqSc+V+ziAmE7KyIucN/H+9m+Q5K9LY84OuCVigdKonDnwwkT8io57XoiOOz0lcybMXYz7j4e3UhxkHUQKwkYhb3jQI57BhXGKMVUXb1jKcvxbkIDT+bSzDinuvaY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=EkOnoyW2; arc=fail smtp.client-ip=40.107.236.77 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="EkOnoyW2" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QyaWamtGYdVsoyJXg2gT//0cSIFlBpgFnvnHUZe+jVOh7sncWfHCwe/CJc17nJqo2hfw7UHYJ5xDkT4hJp0LU2sZWE3M9YrCooLYgzkMMsJ0fUCo0cTjWM8Cz1ON5mt3bySpntRPx6OyE/m3ae+w3iKf1gmHtaVCBQPwdPzT3X9huE60koNLq9S/RQPrCGmGyAIj/9ZLWc4u3hIXKi6Rp8RDUaHIl2yKLO4RCEGx+e+VV5ysrBM9biC9p9JU0/N1cUukEW+fW//qu1SG3ZspiepmXS3FmnnCVhehGLVRBwz8k4vGG3/BOIV3OOsGhksTBtRhZOmoLbhL7sePl3BjmQ== 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=7LjjGJRBlOv2xyXLRRRrBuI+cesNE1MOHMAnKjD+Iec=; b=mP8aYMKuhoR5g88tIR9yAcNowy5ji+Jr0qRjuimj8GD6xXwZDNQ67xzvO+M5uYlLKfONO6+5AvX5xN+1p6BLADR1Kmkh4bNfc982DCFY5Pr8BgQASpM/6uGDaxyMGF6bzpK3Y4Eo8st5KXGXjJ5D29wAfpeHjEDqZzs8jXJVfz/CzpffTYQ3UjIqhPp3y09XL78tp9dNtFKCnXYUj6J/o/OgWmK4XTU5+Q1kt/96LxDz8BMOHNMorCpcI72AsEIa9jVqkwNR1QH4ZnZN9FW20NBlmlSvGp4kT1Twbf4oSIvHtJfgZRp33q5pMtuiEWSkl9KJH4B39EPfgvT3hNv87g== 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=7LjjGJRBlOv2xyXLRRRrBuI+cesNE1MOHMAnKjD+Iec=; b=EkOnoyW2KC6gTLl7Nv3dcbAP2LsZfDt+v+g7ZdRiKg0ikDaBn3FCBp4NFCVMWpCGJ5SrAEuCkvGZHmlI89guyz9rAdaV/fmN/m74Mo1VBa6WA4u6v6m36fJ1z1C8sQVVwy2kMg6mYO0DjrE0KMA4AgYmKKPeIfRO1BZ/6WMqbsY= Received: from DM6PR10CA0007.namprd10.prod.outlook.com (2603:10b6:5:60::20) by BL3PR12MB6570.namprd12.prod.outlook.com (2603:10b6:208:38d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Tue, 23 Apr 2024 08:41:30 +0000 Received: from DS3PEPF000099DB.namprd04.prod.outlook.com (2603:10b6:5:60:cafe::27) by DM6PR10CA0007.outlook.office365.com (2603:10b6:5:60::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.34 via Frontend Transport; Tue, 23 Apr 2024 08:41: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 DS3PEPF000099DB.mail.protection.outlook.com (10.167.17.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7519.19 via Frontend Transport; Tue, 23 Apr 2024 08:41:29 +0000 Received: from pyuan-Chachani-VN.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.35; Tue, 23 Apr 2024 03:41:26 -0500 From: Perry Yuan To: , , , , , , CC: , , , , , Subject: [PATCH v7 4/6] cpufreq: amd-pstate: fix the MSR highest perf will be reset issue while cpb boost off Date: Tue, 23 Apr 2024 16:40:57 +0800 Message-ID: <3548a1e1056d9d08286da8ca1c68da23c6672ee3.1713861200.git.perry.yuan@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-pm@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: DS3PEPF000099DB:EE_|BL3PR12MB6570:EE_ X-MS-Office365-Filtering-Correlation-Id: 51bd85e5-33ed-402a-1fb8-08dc63712be0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yr+Z/N/kaUYWLRRumcdLxahOR+02CPw3lHHYiDbuLl14eFmuRdEWW3If1cR/dI+H9ejefE4XIGxl4BfD5QLFujc139MlEH5eqgKFCX0g1P94zjZo0uUhp+My3hHpnuTydkr8i1age4hvt/1n5hrTjpDAa0NZVRLf30uu5RuyJ6zhW+ZhqADsACgcym9ZiyJVx6jn3uli0KTH3mmec2R+gtvbzCKIDlzIZPXXQTlsqDwgfgzvlD2BEuRDH02kfPpiJfd8SZYV+bc0cCQBqcy7GV7DhACSgwubdxpYPQaS/A/vS5ZJ4H3q2xNoc0AZmnXUh2bk4KhJGEDJfqiPwhyHiwJIT4AL6UoHyUPiUD2Fj7s6fLu+fTXlBdVSqoUhpUr5Vzd4/pW2xnwqvNqnGslUs1GWOjbMgaK8RxJMfiOB9LXLHnhNLBViQr4YaQZyGgNQUuVRcEXe+Hgm7ddVf1bsT1tOI9+kuk3pNcd66XwFBS7XrGkT+fp/jY8J16xSnBdB3S5kcjeJTx2qXPSI03LD1yHWpp8AjywD/t5r/s4OMh6Oxnpi+e/pMkNhxXvC4Z+o5pd6J/BzMbNAzBBgViCTCSCL8AxkXYY4tFYHVgncieRSeRs79zz7mwuY0w5hX/dVeuwYgQ09ugv3T5/brHcxsnGagVw46SJuyy/2IiBxIifBjNW8y3w0hFrPyoCxTNS9ePThRcKb6AuZHyeazxEsCkJcgJ0gBkDPviV30+wMj3xolDvs0FHB5FEEw6qrZQsPsUY1pUyBYp932sL4w+rGoYjXv2ri+6lwkRhBPxnNNXbmauh+sB7YfdKCqEzDYsTW37ePL9iKZXYfiGHpMkPgIDBt8tEeLqpSGCgvC7pNah/M7VVwUjxZatU5SuOAuqzYaInBHNzm2SCVzH6TbLY98/qFjWsFI5+WrotZZ5ZTi8wsTaaxswGe+t7U36GToVV07uH4AIo46zpz56e1KsQOJVgaG5Tfpth+9SCRBhEvZYa/Iqe134kiTXRSuDZhszc4aK53/8Ieluo1ADg40W2jeNODITHvpOJzT7Dbncc5NtCggPI5+s2XI+gu6VHob/LNBXBJtlwg6mNl5PgpaZ2m+o9kdiq/8sFBTo3byCDOyQX83XfandHWtSa42Zv/Aoy1Cve/eQdTElzLxb3w0NWAxvOQK1hBgL5yZVfMlFL3zNIV0BY2f8KCyNdsQecrjLWkaeldmxYVObJ1AQ2fN4Y4bHxpOAy/l2blClc4wkhCKn1VHILtK2kKeYu45xO0gZKiu0B9mm0ylPNHl6Hckt8LDQK4bMDxHWOVu3nOr7ph7207hGjA4DNIQUC7sLE4qFaAPNoP78uKdNhdwpCQxqlMM9U0p40MVsP7Ert2tUyt1gkKdRx21X/RR34Mpr7ZlNXV 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)(1800799015)(376005)(82310400014)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2024 08:41:29.7549 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 51bd85e5-33ed-402a-1fb8-08dc63712be0 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: DS3PEPF000099DB.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6570 From: Perry Yuan Select the min perf to fix the highest perf value while update pstate CPPC request MSR register, here we need to limit the max perf value when CPU boost is disabled in case of that highest perf value in the MSR will be reset to original highest perf value which cause the BOOST control failed. Signed-off-by: Perry Yuan --- drivers/cpufreq/amd-pstate.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index 49eeb38fcf20..22e5b84dbe28 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -476,6 +476,7 @@ static void amd_pstate_update(struct amd_cpudata *cpudata, u32 min_perf, u32 des_perf, u32 max_perf, bool fast_switch, int gov_flags) { u64 prev = READ_ONCE(cpudata->cppc_req_cached); + u32 nominal_perf = READ_ONCE(cpudata->nominal_perf); u64 value = prev; min_perf = clamp_t(unsigned long, min_perf, cpudata->min_limit_perf, @@ -495,6 +496,10 @@ static void amd_pstate_update(struct amd_cpudata *cpudata, u32 min_perf, value &= ~AMD_CPPC_DES_PERF(~0L); value |= AMD_CPPC_DES_PERF(des_perf); + /* limit the max perf when core performance boost feature is disabled */ + if (!amd_pstate_global_params.cpb_boost) + max_perf = min_t(unsigned long, nominal_perf, max_perf); + value &= ~AMD_CPPC_MAX_PERF(~0L); value |= AMD_CPPC_MAX_PERF(max_perf); From patchwork Tue Apr 23 08:40:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yuan, Perry" X-Patchwork-Id: 791392 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2074.outbound.protection.outlook.com [40.107.220.74]) (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 3CBCB535D6; Tue, 23 Apr 2024 08:41:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.74 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713861697; cv=fail; b=I+QeSlZ+qDQFw10g4c5vD5fXrAg61KNhTJSQNTP1YQu1rVkjVVJhYs+HC8DMBnpziAwjRDHActdUnT7BybMmTC7AytcK/sI+oEphWOg2Iphp4hMQu4eGP4qXCsS6l37NrAK7c+DwTmVaNMt30ncmvT8yOKcXJ6pPHBvQeLSHYEA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713861697; c=relaxed/simple; bh=xEj6liAj6IMhbWAhkHuDsMO4hCwxjqNXMN9NlrsX8rk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=W0Wmo+Oo+ll/eZJVimT7j2QhY7cW8X/3UDHP2ox7NH1aWv/NZUdoE9bnf8ElNltKTW7hgsqAzTfjAMjxBQ3lOJwfKKJzF96YGlXHSfN3nLC6NGRPUu8+SsPOcdS6TMbkOfHaChJEeZ0HyozLP+uHEEG8F8hahmCL/kL/jYoQvN4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=n3SYQzX8; arc=fail smtp.client-ip=40.107.220.74 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="n3SYQzX8" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=axJFB7gZ0CCo5Xvxwh8xAO+DMP5gajJRGfOHKB+62gHhzni5ahgNRs49sv90IUEWG29VFurZdSFQBT/vagfU75So/BlprnCDn7IIBSEUXtmpvxJ3i9anUo9IPQ6jQeeOMfSogxRQnY9atgyLQ8Tjccfd9qOiCEK/ZMZ1qcpJpnwRfIfxQOD1eMxRj3uua81HrYjDKVZgZx67QJBGU+vTTbbLhX6ZPaTt7lXrCdCSnC46bQKg/7uoH73vtKxiBFhodMa9I6VtPk19qytfQMNrfFi8X5qLTxvzNByGOJwe4B/EM+GdTLzJQIgEMMV7zhX4BD4lZsuY9D/mpk+hCROO4Q== 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=27ao4J8fzUAMRbFzpm1S5an7Hi17ByoMGWcavVPwhww=; b=oelHB/Q/ftFYf4KfH56WdpS97aRRezz3FsfXRTurvadwJ/dBEL9s09b9Gb1DVP3i74Fo8PWr8rqshPsFEHroNnO+rxF9l8lo5tL1AJRtFDggVg0GSjSFvkDP5zgN5cpw8s3wO0Yrj4Y2u+8JNPnjTmTkHdtR3Ut1zCaC3BYjt403g5lPJ3VFWHjsD89KRS1/bJwraG1W2p53zIeY287zXGFvPr+t0BAvfCu99MsR3DHApwcpXT5sbm8HsuUkYAAy9yN++AqZ3lUsRipPGYEiQadpe0TDhK++Is3GYznFGplATW3yU8sx6deHbDo+pOG/WuYmse3bz8jDO5vDkJqKwg== 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=27ao4J8fzUAMRbFzpm1S5an7Hi17ByoMGWcavVPwhww=; b=n3SYQzX8IEwDSjzxr85iF45KcTQ35rU9SJn8TydH6iQHTi6aSTeL8pqNKrOA3TTffxCv9dfBQqakLZHZdZzHcBOHdf6j5wMEUt/KR9pnCMFwDi+8xxZ0TcEJAg+ZwEXCegaaJJ6GqYhoQrJoWBkTGawgCPmmhX0WmkSyLbhN3Ts= Received: from DM6PR10CA0002.namprd10.prod.outlook.com (2603:10b6:5:60::15) by MN0PR12MB6365.namprd12.prod.outlook.com (2603:10b6:208:3c2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.42; Tue, 23 Apr 2024 08:41:33 +0000 Received: from DS3PEPF000099DB.namprd04.prod.outlook.com (2603:10b6:5:60:cafe::28) by DM6PR10CA0002.outlook.office365.com (2603:10b6:5:60::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.34 via Frontend Transport; Tue, 23 Apr 2024 08:41: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 DS3PEPF000099DB.mail.protection.outlook.com (10.167.17.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7519.19 via Frontend Transport; Tue, 23 Apr 2024 08:41:33 +0000 Received: from pyuan-Chachani-VN.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.35; Tue, 23 Apr 2024 03:41:29 -0500 From: Perry Yuan To: , , , , , , CC: , , , , , Subject: [PATCH v7 5/6] Documentation: cpufreq: amd-pstate: introduce the new cpu boost control method Date: Tue, 23 Apr 2024 16:40:58 +0800 Message-ID: <3be5a8273d727b180b833ec01b785e394ac5d2fc.1713861200.git.perry.yuan@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-pm@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: DS3PEPF000099DB:EE_|MN0PR12MB6365:EE_ X-MS-Office365-Filtering-Correlation-Id: f7d1ea91-ac32-4698-ca03-08dc63712e12 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vlNRDmDMDEI280qD0kRYUCOZ8Kew4hq/Tq7mdn94pQO/lbrpKUfwTUhXT81wQLs9wgqZ3Q7eqi1myFuj/+NoNEthhNaifAMkJyzNucEZDXueWbFdxRzDOjQiZ+7JvMPUYq1kEOQZjVpT89LvRc61vllMtmLlx7ghjhIjI2AOZmYYxdeLwSDn269RjDpSd+4jW+q14bGgEyWop0eRfKnw6EqXantRWAirOQd75FOQtrdT5NNJ/REpBaEVY2WUV0IDAsyXnyctEzMKXrNgSjT5BDq8HsfmmxvKz9ki8D7qVWUbLB8paIf+ke7ObexXvAFcw0qWRf7XEeNw814j33uuUi/+jNfUdsUPbonuoAOEj8WxJ++mbIyqpwHyEhpuM/WDuPbmk7exhuR+GTxxWuqrcusacvjBQUEzxQu6i/FUqI+HEIUPHLA3CwHJwsnAyCHTtWO8JpAHVDHBYNDUO1NFABi2ZArT9pDZFG+czyD1xZepSNqig9Cc9mnhPLu7ybR+ANh3Es7QWK7m7sFXh0BLqQ9E+zKBhdfnoF8e/bw0gl5FTsivwnQkSSAFqHZbPkIXlnbC0ojNG/WCRTrXhZjfFNltAUo5XH6i9BoaktY3ybm8zgFizV0J37KveSoB5sY3TyqEX+emmSgvXANGlIOpOHJGN7qvwsiDkjZRqe1hypATS3ULKbF8RlHtmO6ZiMYeZOvtEWSKR9SJrEkpLNr8+JqEE2LtNAbZs8XFHcA/W0Mqjr9nkp3K1ili0aEMmliY4CwlPFih6By4Z9rtw5e3QMhfVFctRqMlE3CXr7syD3J4N5YsgsnThr5YTocDLlZIJNBrFJkBcfwOtqQ67IPjZY8zwu6r/Ck0RWqMtekm/04M8iWKBonfPEojTBUl3AeQhUXva6CXt4BY5ez7u68TJ0wj8odFLuMLAuzR+V53nl/4BtWnTNBzMgKkLePjcLANydHwRIoP0pJK6D88L2/6MLw3t5DuRR3RnMgf7yJ5TG6xIKA/OS/rT6nr0s01TL3F+BAE1auH3roALqcMtUFWesnc0r3Mx4QaTXqhFpjw/iTGbxw6pBL19ShhR+y9LHPsirONMh6m6zpAZ6SvaYPxo3VqON5V3QhOiNphupxpSSliWznOz2qyw+wHVhR0wS49dIh/PemUKHt5hQg3mSwPQ9ho3Ad38r5AmYA59Z0nvhFyOqeLbMd1pDackDFOT+FLv3P2sEhNl2Y+kz+h1Rh0MMV4GRxwmEEdpASi0KxPucYtRXzjb8aeq8jENsz7ovY3Zs8MT1otKnzwZXKb1tY52Feyt1ZJyqPoKrcc1xRR3uGbfAOHSRSvqXttkaOAtBGvNKfVSKOJFt+qVw6sGCsac9WwmFj72dsZlJ6l2swZhh9ypURfLnF+u2rs0dVvmXZe 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)(1800799015)(376005)(82310400014)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2024 08:41:33.4267 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f7d1ea91-ac32-4698-ca03-08dc63712e12 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: DS3PEPF000099DB.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6365 From: Perry Yuan Introduce AMD CPU frequency boosting control sysfs entry which used for switching boost on and boost off. If core performance boost is disabled while a core is in a boosted P-state, the core automatically transitions to the highest performance non-boosted P-state The highest perf and frequency will be limited by the setting value. Signed-off-by: Perry Yuan --- Documentation/admin-guide/pm/amd-pstate.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Documentation/admin-guide/pm/amd-pstate.rst b/Documentation/admin-guide/pm/amd-pstate.rst index 1e0d101b020a..82fbd01da658 100644 --- a/Documentation/admin-guide/pm/amd-pstate.rst +++ b/Documentation/admin-guide/pm/amd-pstate.rst @@ -440,6 +440,17 @@ control its functionality at the system level. They are located in the This attribute is read-only to check the state of preferred core set by the kernel parameter. +``cpb_boost`` + Specifies whether core performance boost is requested to be enabled or disabled + If core performance boost is disabled while a core is in a boosted P-state, the + core automatically transitions to the highest performance non-boosted P-state. + AMD Core Performance Boost(CPB) is controlled by this new attribute file which + allow user to change all cores frequency boosting state. It supports both + ``active``, ``passive`` and ``guided`` mode control with below value write to it. + + "0" Disable Core Performance Boosting + "1" Enable Core Performance Boosting + ``cpupower`` tool support for ``amd-pstate`` =============================================== From patchwork Tue Apr 23 08:40:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yuan, Perry" X-Patchwork-Id: 791852 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2061.outbound.protection.outlook.com [40.107.93.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 6B6C45A7AE; Tue, 23 Apr 2024 08:41:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.61 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713861700; cv=fail; b=XRKWzjNkNwbPjl8NJeQUDix77JYgCU++VZR4AgFNB5V54LpenM02iIKivGSTfsqzbEJQ0THubmrPUrl6ElRjKNBDA6sK6JcSjn4hw1ERp+PEZbSURSpq+x/YnAZFHJuscej0F7pEMvcRFEo/8ZarTORLSLAjHKIouBf0VQTUoKU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713861700; c=relaxed/simple; bh=W+dCh9C8EntywcvXhSubkaBnZJJuzKjsF7idcfLgto4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=K9KAApiNdPbmRLNCIn4XkR7gsyZBWNUuZ6dMU2YdMHrLGsddMFFA3vPXKPbeOsDM4jGsKp0O8L9SdxU6OmIbohPqvasyidAP43saTKcgaNdAMEyWYka/X/wt/uQ/68ZwWLGeXTCYY/r2/xx1dvQyjDdPQBWirXqUsHtNc/OxCxw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=B+KSOM5C; arc=fail smtp.client-ip=40.107.93.61 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="B+KSOM5C" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B7R3DOjUP5jAzpsGHKefq1Gi1i4B6M7abT5WlyJHGP7jmbSA+BKs8HL3AF3Yta3ZVJ5Stxo2HU6i3VjG1G7D8w25STpgFd3g1CqeHuzJhtsYnh8yVkVxZk6WkIAuRs08CpeNvg+OlXnPaaNCQ6/e6SSoM7cu3caS4DB9iBAArQroTn51+jK+7Gx4tPsClFwgJ1H9GEMpYBqvPzsXLylkLg3M9O/bWDbqvS68Qs1leqjKJA+hrApv0GiCuxbaHQHlxN00LkjO4qFtjZuZaJBG8y+Lxi0fqYvYe/r9kC2sGpZoc4QGCKJmwJRfjrfN9xbQY4uPWmRXeIITsIRyvC6+lQ== 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=o8EDLYk3NSyioGPjxU+pIEAuL4I7f4cRvkuByN872I4=; b=BxRukI8hoytJE81wLIUezbWpiDldJmLaVVQennyPJR5RiKqe3oZUO9nG3OOSJeHMoraVkTip8jO7pN3ijvPw9ZZjUhACw80lnEuKW9RIp/Pu1vUoaKiYoYbKz6JaKD2mGFJHqljdMGg+su03YMjS9LMhp4DsQW0hjfd8bYoScI5N1McqgVsdkhKRT/Bt/OYnYlHmTvOhOT1XYCl3P0zx5zbobc5T7mxyWzNiJLUstEG0vU5RCHWMS3B7XHryNIrbV/WRCdKJge5jqO3ylPHY1/gmu6/WjgoLKJTCrf2tNN2VPSusC8Hnkah6LTCVW0inhxSWq7UV8z8ksHYNNHbUtg== 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=o8EDLYk3NSyioGPjxU+pIEAuL4I7f4cRvkuByN872I4=; b=B+KSOM5CBTa9RbUWqm9sBKOTxjYgfGkMdWanUIcMqgr+hw3HzefRSpAVZXGsmZfg0zf9XdnL0OCEn1hu6ACHKv8y0ZBwGhhMpW/odL315+ARU7kwjqNWtmjrAKbeGR1nwKnyh+z21EPsbKYHOU3fdUlQ1fyeYLxWu+3h+mhaqp4= Received: from DM6PR03CA0057.namprd03.prod.outlook.com (2603:10b6:5:100::34) by SN7PR12MB7451.namprd12.prod.outlook.com (2603:10b6:806:29b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Tue, 23 Apr 2024 08:41:36 +0000 Received: from DS3PEPF000099DC.namprd04.prod.outlook.com (2603:10b6:5:100:cafe::c7) by DM6PR03CA0057.outlook.office365.com (2603:10b6:5:100::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.35 via Frontend Transport; Tue, 23 Apr 2024 08:41:36 +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 DS3PEPF000099DC.mail.protection.outlook.com (10.167.17.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7519.19 via Frontend Transport; Tue, 23 Apr 2024 08:41:36 +0000 Received: from pyuan-Chachani-VN.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.35; Tue, 23 Apr 2024 03:41:32 -0500 From: Perry Yuan To: , , , , , , CC: , , , , , Subject: [PATCH v7 6/6] cpufreq: amd-pstate-ut: support new cpb boost control interface Date: Tue, 23 Apr 2024 16:40:59 +0800 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-pm@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: DS3PEPF000099DC:EE_|SN7PR12MB7451:EE_ X-MS-Office365-Filtering-Correlation-Id: e2958de3-5bae-4203-e5db-08dc63712ff5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: y0zhh1idaBn1Tj+XkXOXAh2s4RcMC6WLC5TixD+5EhvZsxk61IW59FbITLDm4bDcTJl/vbtWatFHV5153V7jtOQPHXCvJw5/5MmbcCmRLZELRZOCUg6ficO1Uzdy7ab4vcI+oe09JOvm3yFj6BwNzVBBWGHJ5a+KQmnsy/XKzQ5YKt5lvZm1MV7/fPAJFuoK3YwWaOwh8/ERGwx2jB/qsYTovk90a/SEfeDhUMsOEID9n++nuJIRmR6ez6b0nOOGMkdoK3ypIEVLJZT5W02r6pznhhG/V5ke4HGBWIj/fkz07KLn5+es3jYL9DPoap6hd2Xmfrz9wUubGWLnjNQnnOZOCK67sPRsSN66ncqHbiNc/5D9AxbmpsQyArQoe1ycGU6B5MfU/yPhLYM0r8i+k6UTJGibogbWBxMQ4NYWDuhSnB6o3B0uIer3SsaHdMcIoqmkIKav8hD/s6pCg84p2SVPrpy76wfKIq4td0AlhyLJ5mYmhglo11bnplZsE7rf7T8qkj9+vyJOqMJMDR2P+h3v1PejOJoSjThi/qQRbzCOmLO/6R5WtGO54iWtyQnwrlOpH6uuz/SrIDqc5jPNDkaMLBVJsRXESOUrUp/1F29fciRWlic6e5dxcG1Wc4OGXeYJmJvkCEcExO8QNojQHkHjhbPOxSjgVZDAJBfRFcVH3/kiBBR2XQG7sskXAePPDLydiwqeTvdAd+fk52+5Z7ZCGO5R33cNRpQDWNUS9D4bwFQHH1tGAxQi4pQQJlnuLCq/6Lx+qLK7XHC/abNNOSJXBfedNLspH/eivm817YcfzhDpAXyFJU+1Z4qIj13Al9uXTJYdSy9d18iiiU9WiBzpd48gxCfASbtkmCtf6qpl33WrskTiUQv3TnkD4xiBT+1AYRRQaxoHZLfyohB1SoLTZAcgiAtbTC6c2st7tbAX8h+KDHh5qQ5Ep/5w6HjRCToGHnvmGkvnGgp47FU+g5oA4gN94iRrbLJHdUdaGoPwXsJqFmU6SiM2n+cJOE4xKRyHjvs50zVxR4eYtWmQQN4V5Kx4J/wUqJd78s0sHIuGYoXCHxclawNIHxMOmbkKduGWIUwIuqAaEoziC1n9luyspdNKk/mpSysXLFQKHzdquQiybB5WpuwpC48fyVJ1quZaJS2hEDutonL/e9YAiUnsUg0nxK0s5ZvGB49e/RVD0vtUzxrnMuGviIhSQgfYKepCP5opsNgDQWOTAijdaPxAY7f4V6nAQdc3Av7MC+pX3EkY+JWQUDYynEUce1txJBUscWXP/JoTisMM1S9Z9xh61iyQoBKjmIY6au7vao6lZ6hSRQFY4U3Q0ndHBbX0bGBFAMOw8tJ4yCaIBLKyaOtkdaZ/UdtWKyFo8DrHq4rSqJ5TJ0Z3x9dzkOJR5AEz 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)(36860700004)(1800799015)(376005)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2024 08:41:36.6085 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e2958de3-5bae-4203-e5db-08dc63712ff5 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: DS3PEPF000099DC.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7451 As the new CPB boost control is enabled, pstate unit test needs to remove legacy `boost_supported` check and start to use new CPB boost control interface `amd_pstate_global_params.cpb_boost`. Signed-off-by: Perry Yuan --- drivers/cpufreq/amd-pstate-ut.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/amd-pstate-ut.c b/drivers/cpufreq/amd-pstate-ut.c index f04ae67dda37..b3601b0e6dd3 100644 --- a/drivers/cpufreq/amd-pstate-ut.c +++ b/drivers/cpufreq/amd-pstate-ut.c @@ -226,7 +226,7 @@ static void amd_pstate_ut_check_freq(u32 index) goto skip_test; } - if (cpudata->boost_supported) { + if (amd_pstate_global_params.cpb_boost) { if ((policy->max == cpudata->max_freq) || (policy->max == cpudata->nominal_freq)) amd_pstate_ut_cases[index].result = AMD_PSTATE_UT_RESULT_PASS;