From patchwork Fri Jan 19 09:04:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Meng, Li \(Jassmine\)" X-Patchwork-Id: 765252 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2079.outbound.protection.outlook.com [40.107.237.79]) (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 135C5241EC; Fri, 19 Jan 2024 09:05:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.79 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705655134; cv=fail; b=tDAXa9yYfN/QVVU9L385AhlTsdZy2I7ia4ZdFCkzVMxJzajlZBnbI9U95KfbK2nFD2Wvg5LOQTs2oeQb9exsrRLU6LichvTEgYfy8JKUIM0mBA1JhDM6EPrCR0UUcUQG32WbCBD/QA/gdKBYgmX7w9dJIzqyVEYLaKQ2dtNMBD0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705655134; c=relaxed/simple; bh=FRUCWSX6j8tUAkHTqWExsfpT7cMYeYO63lAZXzHl0Hk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=uy2WFVn+4dWgIRhdV3A1QK84pN+BInqlf922Poy7HZNf0DvF1nTpyunHqT9HmgOm/91X1/LJmkhVTzaUZLu+JiCx7/zGu2Nf6uOtUDFi5v06Icv1lYVPXvmK7jhh4jAjRi8Uj+IuVhGEo43uAK/sbsAZXByHS5fMKiV87dOBKcA= 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=0vROBerQ; arc=fail smtp.client-ip=40.107.237.79 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="0vROBerQ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IEj2OHQxK3EoFvYiucrZhu8ImeSdbNZwjW1YAcWeVmUFsy5S8HNPBdC1y9vqDEDPkf47ht2f68dsiLoaf6/3FgLVImuZzPt50DMxLo9BVmebLVSkRhrm/sKTaRknDlBTdhVbtqZrNBWt83yNCOQ8rW6S4/bBmI1lTkhNB4GivhUpzEmS/Liq4riTsaVx8nK24EE/Iif55pdLCnve0Z1Ws6wKF8kKFhwLvFEHVLDu4Jsy66797v2FFtVWsoleTH0mdp+i1K0CtMleBgjegTn0bn51e3Xlta6PaJ66yiCn6CZ8egY6cHcnwoC1V25wmy1HVI4nh8cTFzcOU0deZ7UODQ== 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=fSqFMTEkCOMZm6HT70MWpGV+zzTDaQ8gVEZFevHfb40=; b=b3dgML0KQOKw8GxUTzXBoKqKoRSY/6xLqUcPAJATh8k1TO4WNb4SO40OvEBZQh71f+0/qrnPI0Bvvo4p3yrIuIIa7D4rtk0Mk1BZjP8cOby8j20ZekwKylatSc6LP75FtV0UEWqj4eGIETbr7RiBIfllkPZqlaT31/yK1uu+Ir2kKO7aMUk7c8OA66ZLE+2M914P5aqve0sOt4S1iyUHDchDVRFaaqEv5Lf4PjyY3Ddeq2r6DUBMsXOPWQEUGUL8T2PXb/mtXRaxS5cl29eHSdG1hv8eNjLLFe4D7P741tyFb7DVZCHPl9H/8CV0vI6hFEUeF9LGxTDSalsfUtzOtg== 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=fSqFMTEkCOMZm6HT70MWpGV+zzTDaQ8gVEZFevHfb40=; b=0vROBerQ7JKDRCRzkTtMLw1IoxwViNCcPZNr6fQYqZWDOyf3XOm8abhkLjwlr90hCl4p9IacqXOv//aZtQvu0TvknE0mWXcNB2gK12RDLA97p1v15LDQUo2iLrEx7HTH+3iok6q5x0dEakYQ5JjFQMiNLAgrZGFOxPFr1F5GqBw= Received: from MW4PR03CA0168.namprd03.prod.outlook.com (2603:10b6:303:8d::23) by MW4PR12MB7031.namprd12.prod.outlook.com (2603:10b6:303:1ef::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24; Fri, 19 Jan 2024 09:05:30 +0000 Received: from CO1PEPF000044F6.namprd21.prod.outlook.com (2603:10b6:303:8d:cafe::a6) by MW4PR03CA0168.outlook.office365.com (2603:10b6:303:8d::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24 via Frontend Transport; Fri, 19 Jan 2024 09:05: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 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.7228.0 via Frontend Transport; Fri, 19 Jan 2024 09:05: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.34; Fri, 19 Jan 2024 03:05:25 -0600 From: Meng Li To: "Rafael J . Wysocki" , Borislav Petkov , Huang Rui CC: , , , , Shuah Khan , , "Nathan Fontenot" , Deepak Sharma , Alex Deucher , Mario Limonciello , Shimmer Huang , "Perry Yuan" , Xiaojian Du , Viresh Kumar , Borislav Petkov , "Oleksandr Natalenko" , Meng Li , Perry Yuan Subject: [PATCH V14 1/7] x86: Drop CPU_SUP_INTEL from SCHED_MC_PRIO for the expansion. Date: Fri, 19 Jan 2024 17:04:56 +0800 Message-ID: <20240119090502.3869695-2-li.meng@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240119090502.3869695-1-li.meng@amd.com> References: <20240119090502.3869695-1-li.meng@amd.com> Precedence: bulk X-Mailing-List: linux-acpi@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: CO1PEPF000044F6:EE_|MW4PR12MB7031:EE_ X-MS-Office365-Filtering-Correlation-Id: 171783a8-7a05-4889-8925-08dc18cdc94f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZxVOgjyWi3QceCnr0k5TWyVy+Yxhdif14l9smgfpyGd4lYWx82HG4Gwnxky8s/+hmvn2xoN4S999IUyvd1g8f/8Wnrb5WhU9t9RP8O6raBKFWdsuOLQJ4Czoxmz/x8kBh4cPdKm00tw8IYVXCTDDL678G53mIENZOCyNP/4dZfgcrM4jpc+1zETAso+KF+1KaiNyIKufv1nPov/BlF8eev9rH5bdsEOEN3iEVuuZ9fj3RUH/qHwlHaGBjBBx82el0R2jTOfEIidX2Uaicip1VyLKqRrAmpjUWHIxcTRyOliqXuy1MyBws6E3yLMetuajTzqNHuMKKSkZJHEq1Jb7b1XOOR9UwAeUpDRIl1cWnbt/rEb1SX69SKSCU1mdujEOU4ZY/vbOLQowRRrdIA4KVyI2u8740uvvKVv6m9Wf8gpArmA5ZwPpXHtnFg0eA0ChmhbUfUGJX7qXBJMulof9c0KVM3EmcK2JdGz+Y8yC7O7KY3nAtPp/KAdgPpIq3KCjbgmNVn0KC26jplUkMlT7nn5Nv1v7ypjsWYQJ+Ph2oX7i9tKWlcrWoMhdqwkxokjmcvVd1A6QzC0h8YE3lPBRLuS9EjEinO8gFP3tFPxInflHBXuGHNOMhJr95og6eUZpAXeJxA6nMxqHGIizBiLTW01pDHyxLC1/hFERZA1e6ut5gfpz6i+t2FhEfOEeuVdnuKmqR/WQIhExvCQirbUQE7Ly9cqC4n2059QvNpxlUkVAjTw9g1SBUwmfoepVVKfZOW6qZpbUZrIsOZw0p3GenA== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(346002)(136003)(39860400002)(396003)(376002)(230922051799003)(451199024)(1800799012)(82310400011)(64100799003)(186009)(36840700001)(40470700004)(46966006)(426003)(336012)(4326008)(83380400001)(8676002)(8936002)(7416002)(82740400003)(86362001)(41300700001)(81166007)(356005)(2906002)(36756003)(4744005)(36860700001)(47076005)(5660300002)(40460700003)(40480700001)(54906003)(316002)(6636002)(2616005)(110136005)(70206006)(70586007)(478600001)(7696005)(6666004)(26005)(16526019)(1076003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2024 09:05:30.3156 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 171783a8-7a05-4889-8925-08dc18cdc94f 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: MW4PR12MB7031 amd-pstate driver also uses SCHED_MC_PRIO, so decouple the requirement of CPU_SUP_INTEL from the dependencies to allow compilation in kernels without Intel CPU support. Tested-by: Oleksandr Natalenko Reviewed-by: Mario Limonciello Reviewed-by: Huang Rui Reviewed-by: Perry Yuan Signed-off-by: Meng Li Acked-by: Borislav Petkov (AMD) --- arch/x86/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 53f2e7797b1d..8dfb08ceb6ec 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1051,8 +1051,9 @@ config SCHED_MC config SCHED_MC_PRIO bool "CPU core priorities scheduler support" - depends on SCHED_MC && CPU_SUP_INTEL - select X86_INTEL_PSTATE + depends on SCHED_MC + select X86_INTEL_PSTATE if CPU_SUP_INTEL + select X86_AMD_PSTATE if CPU_SUP_AMD && ACPI select CPU_FREQ default y help From patchwork Fri Jan 19 09:04:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Meng, Li \(Jassmine\)" X-Patchwork-Id: 763991 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2044.outbound.protection.outlook.com [40.107.223.44]) (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 EE33B28E1C; Fri, 19 Jan 2024 09:05:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.44 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705655140; cv=fail; b=F6pZRhtl+fcv7PnL4+s/HcAjSfxKNKtdZFQ+IvK4OfpoY3ceMJFmZeKBO7RgF/Yp4KEOr0oVk5BqnAuflLOnW0ULP4SAzj9Lw9woYBTxHXtd1gh1Byz/LnW1wI6bFvxlorS9dWrZ/BDg3UYvmrB2o7qqJMZyaEgkIc3GPKy2r5E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705655140; c=relaxed/simple; bh=fUlgzKnzc3fB7+gCxtVXXAfx38WxKH7jDvv3drZLSn8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=h7todHpEFnP8fIixcxDXvbyIGuAu85vXFuCYdeJDL7wPqfTGZpBESafVRAG81KfUyaFMVdRvj7zLWfZmMLVV3c1H5SgIklYsMVKY4cRagr064GLMybYmFbjqubhXem+4AVQQ6u3lteCgq32O00rXjvtDPbS2AOE4umTjTrylrZE= 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=WrBgEkFC; arc=fail smtp.client-ip=40.107.223.44 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="WrBgEkFC" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dkNz2dzyOV63dLfEQqcZt0zPMdJ4XfBMeO1rvXBeQ0xBy2bXpYQXJKFLPrabwU5YorkY2eyRHSkoYqHrqhbjPvzhZl6kDTV159N7oj6Zx1dG1meVARKxdP2+QbdkmyRF8YZ97OljzGRjkCGicEy1I3P0D465wRL94d49ImKNefDSfPnz2JHD9uRxGOZIxzV8/VrcaCPW9Dy0RzneKD4lSmflHL6zbn/Rm317dN389lXlRaJkBmRXnndA3gKyppAdXILtwIUVmyAoJun+qWNurfdvn8jxivuI4pvFMLKswAEgtVNdsfzMX5Q8M2+rBFbDJZRRz7FGBN1Ipj3jNIZsTw== 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=iFeQvL7qqacHg17QrBNojIKDaFF8oH6PC0K92FptRRQ=; b=QO7bFhXs2VgTLZapHmZ62b8Tu58HLws0MmCByiSVNTjNKU7AsWuWBH6TmjUh/8VsatB6+6NB/zfo7/pa47FShQvD+3y2bCyatqbyomJoaLUbFqzNhYWoPOaLuzIBADLkP0SYiWv8Lyp86MYLECFMUPBz2K+7Qxq4uZY33r85hD0byrmqVtLm3X6igE0JlKiK2T1EWfMdMauTgmjAfAkN+XdtwrqNN6yd+Oc3pQQyA5AXocgy8sHTFhoy/LnhOO0AoxY6fKtsZPr3qjuV9tPQl8XajO5NArFV0k6aLZV8cCUdu35yv0CH55149uvc9sSEUttn/By2SbyIBDQp7vzttw== 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=iFeQvL7qqacHg17QrBNojIKDaFF8oH6PC0K92FptRRQ=; b=WrBgEkFC9BFI71W9epFcGrwFuTx+DG2RI+1VsU17OfzHI1dq60YN/GXBOtE7PPQXBRTD47rRr8VZ+GzkiaaAVHhx0PHSWvK3r6cMm+Ph2SVLeE8077O7XlAiwkhk+PEUVr5LdTl2NFj2Ch/NXIoT24Drby7t6oIp9QR6G3sKCHM= Received: from MW4PR03CA0052.namprd03.prod.outlook.com (2603:10b6:303:8e::27) by CY8PR12MB7170.namprd12.prod.outlook.com (2603:10b6:930:5a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.23; Fri, 19 Jan 2024 09:05:36 +0000 Received: from CO1PEPF000044FA.namprd21.prod.outlook.com (2603:10b6:303:8e:cafe::a) by MW4PR03CA0052.outlook.office365.com (2603:10b6:303:8e::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.26 via Frontend Transport; Fri, 19 Jan 2024 09:05: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 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.7228.0 via Frontend Transport; Fri, 19 Jan 2024 09:05:36 +0000 Received: from jasmine-meng.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 19 Jan 2024 03:05:29 -0600 From: Meng Li To: "Rafael J . Wysocki" , Borislav Petkov , Huang Rui CC: , , , , Shuah Khan , , "Nathan Fontenot" , Deepak Sharma , Alex Deucher , Mario Limonciello , Shimmer Huang , "Perry Yuan" , Xiaojian Du , Viresh Kumar , Borislav Petkov , "Oleksandr Natalenko" , Meng Li , Wyes Karny , Perry Yuan Subject: [PATCH V14 2/7] ACPI: CPPC: Add get the highest performance cppc control Date: Fri, 19 Jan 2024 17:04:57 +0800 Message-ID: <20240119090502.3869695-3-li.meng@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240119090502.3869695-1-li.meng@amd.com> References: <20240119090502.3869695-1-li.meng@amd.com> Precedence: bulk X-Mailing-List: linux-acpi@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: CO1PEPF000044FA:EE_|CY8PR12MB7170:EE_ X-MS-Office365-Filtering-Correlation-Id: 7ff1bd3b-bdb3-4360-d980-08dc18cdcccf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7LR1pr21SbhKmL5DIXr4nc9BMB3zH8+0CJghDwkYCdtXz9HnlBBxjDk2pOy9hfdXA/fdMdoRUe099SZlIhWM7+PY7yj+35p40ZOd6qjb5uSUJDmKjbtE8S1+6LFNao0wVoOBIJWxaQ/Z3LePgIRMGoof8VwX2KyksyW0fIz8sSApjyMUMFoaTdrX+2Vqj6kUuR5PEs325Dz78+Eg3IMlk5ZsguTwprzGFQif2j6wzY7yQq/T6koAZJIw47WzwDgII4S51IUkdXuLE4msFkBpKKvTMP64jbcybBOPXHUM5G77RwRZbPqRTCIFEGJ52e+20A3Dgpm0Rr7aC+6npxYQtPTHv0G7k8Vd8hS+WB8lBmz8NUgZLy4TAv6sgVwgz3xBHYAwi6L2t9Y7cWUNyx5HCmge4EGSPuDtDyBatJnjpHfg9YcxLdn6B4Eo9n033/6ED0o8G+gnUlnB9WrW2Q+44fsXdFkbpLDG4GB1/PdLh1ZnNesUBb4sKP3KcHdZwskvFusp8OuTrNNi1Lyh258v1Dt4OTMeh2TMMQyqjQ/U7vfpyYX+vYF1upAM0mXcUQ7ocXkO41zjUlpyuQASy6rPgj88dYUHq31iN2yTJNT15veLvzNy1/6LGdIAp9vSABSG9fyfUbV/Y5n7cR8/m+0fnq1NWo90TAP6+eTFi6lIbzbLgCXuO8VAfZt6/rIES3e2doppP35UNZ35zVncmYXuLtUjPvVg/8kn8YzLvxmtummCIsVrMJTbL/9zQsrVsbN3KUH6/J5GWTXX8qhf3yaifw== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(39860400002)(136003)(346002)(376002)(396003)(230922051799003)(1800799012)(82310400011)(64100799003)(186009)(451199024)(40470700004)(46966006)(36840700001)(40460700003)(40480700001)(356005)(41300700001)(110136005)(336012)(86362001)(36756003)(81166007)(16526019)(426003)(70206006)(36860700001)(6666004)(47076005)(2616005)(1076003)(966005)(478600001)(5660300002)(26005)(316002)(2906002)(70586007)(54906003)(82740400003)(8936002)(7696005)(4326008)(6636002)(7416002)(8676002)(15583001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2024 09:05:36.1741 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7ff1bd3b-bdb3-4360-d980-08dc18cdcccf 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: CY8PR12MB7170 Add support for getting the highest performance to the generic CPPC driver. This enables downstream drivers such as amd-pstate to discover and use these values. Please refer to Chapter 8.4.6.1.1.1. Highest Performance of ACPI Specification 6.5 for details on continuous performance control of CPPC. Also see the Link below. Tested-by: Oleksandr Natalenko Reviewed-by: Mario Limonciello Reviewed-by: Wyes Karny Reviewed-by: Perry Yuan Acked-by: Huang Rui Signed-off-by: Meng Li Link: https://uefi.org/specs/ACPI/6.5/08_Processor_Configuration_and_Control.html?highlight=cppc#highest-performance --- drivers/acpi/cppc_acpi.c | 13 +++++++++++++ include/acpi/cppc_acpi.h | 5 +++++ 2 files changed, 18 insertions(+) diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c index d155a86a8614..a50e70abdf19 100644 --- a/drivers/acpi/cppc_acpi.c +++ b/drivers/acpi/cppc_acpi.c @@ -1157,6 +1157,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 3a0995f8bce8..930b6afba6f4 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); @@ -167,6 +168,10 @@ static inline int cppc_get_nominal_perf(int cpunum, u64 *nominal_perf) { return -ENOTSUPP; } +static inline int cppc_get_highest_perf(int cpunum, u64 *highest_perf) +{ + return -ENOTSUPP; +} static inline int cppc_get_perf_ctrs(int cpu, struct cppc_perf_fb_ctrs *perf_fb_ctrs) { return -ENOTSUPP; From patchwork Fri Jan 19 09:04:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Meng, Li \(Jassmine\)" X-Patchwork-Id: 765251 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2087.outbound.protection.outlook.com [40.107.243.87]) (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 1BCBE2940E; Fri, 19 Jan 2024 09:05:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.243.87 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705655145; cv=fail; b=dqgG3784wqgYfbecZiXcBNmMCM+n5sBjEXZPy0gidXWWqxWyWY7Ar3q8sNxSu7AUmZJnxvikdKjKkMcb75eLVSNbJO3OH/BPAO+cLlVLuuFe7gNXw2KleynHTfS21IkcLrJQ4ywswGjXCUaMYh2WoUU0/27BzC52vDvR7FmCSDQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705655145; c=relaxed/simple; bh=UlvQUBZ8ut+oCayk0dwAIKiBB9dYfcTQnlOQQx2F5C8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=QhQ5rMC5VHYvh2+i5aG7Jhl0Lgxb4AiKs3mE6IH7kl/4Aj1oetUvcivnaqvB/w3SHv7JAn5NAsBLn8LYwIDzwF/QlS7IJl2YRys6wE3Z3zUWmtHE7+h4B34yAFdnWI+FTi1xUN3SUBNvx/LRfWmHUexSRdQyy7WQQ08Jw4/n0rI= 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=4Ww7cG/D; arc=fail smtp.client-ip=40.107.243.87 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="4Ww7cG/D" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SLe+TTradCGTuaUVvPyw1pnyawsiC/GhoL4oasZ1rK1jTsQOInBdXZ/ejoHI8GUht391Iw68TIYrgPugJT3+f4AYHrE3TKP+5VXTPdfpjgBnQODWwsWI0NgMj7PGUIW35Rqnn4YJHkKKf4SWYyruNqkPKMX3NVa0BEpwF+mcTvQ4uTBKUqwHiMT6hWhrYwDi8WfM7sc+xlUQKWoeE+Nzghv+5oXEpi+gyIoscJFBeaLsDfn72hgDJyLEUzO456nYQQcIxQTuBuqQG8sKoT/zICsqV68v6gmTvIuierNB//CrIC3VsqF5t5AMe0r4GqRqmqLgX/mRlUmdpjUSIj1jNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XmBnlY6CcyhnNSPEQizfeQBw6AAo8AGdk2azpcvOOtI=; b=mxHMo5XSrdskK8B0C5a/GwlEi1s8bm9WiT/EDFzaXBe65g/g+njSuwHghqDyTcbRLoHUR7EuE3V1dG/eJGZbkIw/0PwL+HeYUxxRrPCCoWQOAfxE5qtvko1tQ2HmoKEr3qQKTT1AxbTwEZaCvakidDoQwVelRM+9zDV458bzBQscm1aPdzFIfpknZTXhGv9nFNQX1ELfylVQq0bcyQexJv+cr7YqOFOpYlEtfwis9z8Knz6zMLT7Qk5ss+yksUTTaIn4bQtbKGhNdTkgKH6+ohOU3meAZPUAoEa5giuZ6GjbfFrbSYBgBCuCdJO/tUYZnWuKf2qQcszCe/z5rThdRw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XmBnlY6CcyhnNSPEQizfeQBw6AAo8AGdk2azpcvOOtI=; b=4Ww7cG/DUJAFhZ4ONMzm+4XOnc2wISS9oOClt7zl1Qt3AS1VIWamcs0+e9cFExyRpZgvSCQeqxj4Mgy4RN0oyjZPeLNTIwMMewC+Q+nyylyP+MqzK578JpnkWmrzbGXmqeL8Zn3FXCZG6hdSh2JBkawEqSBd2TaNW+nYZKgFCFY= Received: from MW4PR03CA0033.namprd03.prod.outlook.com (2603:10b6:303:8e::8) by DS7PR12MB5816.namprd12.prod.outlook.com (2603:10b6:8:78::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.26; Fri, 19 Jan 2024 09:05:40 +0000 Received: from CO1PEPF000044FA.namprd21.prod.outlook.com (2603:10b6:303:8e:cafe::48) by MW4PR03CA0033.outlook.office365.com (2603:10b6:303:8e::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24 via Frontend Transport; Fri, 19 Jan 2024 09:05:40 +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.7228.0 via Frontend Transport; Fri, 19 Jan 2024 09:05:40 +0000 Received: from jasmine-meng.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 19 Jan 2024 03:05:34 -0600 From: Meng Li To: "Rafael J . Wysocki" , Borislav Petkov , Huang Rui CC: , , , , Shuah Khan , , "Nathan Fontenot" , Deepak Sharma , Alex Deucher , Mario Limonciello , Shimmer Huang , "Perry Yuan" , Xiaojian Du , Viresh Kumar , Borislav Petkov , "Oleksandr Natalenko" , Meng Li , Wyes Karny Subject: [PATCH V14 3/7] cpufreq: amd-pstate: Enable amd-pstate preferred core supporting. Date: Fri, 19 Jan 2024 17:04:58 +0800 Message-ID: <20240119090502.3869695-4-li.meng@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240119090502.3869695-1-li.meng@amd.com> References: <20240119090502.3869695-1-li.meng@amd.com> Precedence: bulk X-Mailing-List: linux-acpi@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: CO1PEPF000044FA:EE_|DS7PR12MB5816:EE_ X-MS-Office365-Filtering-Correlation-Id: 3d299b87-ccd3-480d-46e9-08dc18cdcf45 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Na/CwTW1muwAqUryUiQlNA3ruWzLYL7qWGZsnU1ujc411yr0dM+lbsA5DwqKTJphV1C46RPKgO1kYzYd3I2u0zL4jW05szhztxdTZUaH9X/Iqu1B0vJyBrF1kRlpY5rDBWBDCPVny6KkJktQpRokd45jrsfK5ko6B73BfEQQ/jKu07R1uOzE/1Hqi9APQSupDSb/yWUsOlMUqk6pcHoZtxkJRjJd55OJtLbuvZeiZxdZn1XFxdf+qy3AUmt9R1Jni3DrPB2a/0pIqUtQubYLbjJJ2DekfClW457qeG2tY5fmg7YDMpTHn3+KIN759xXwxfLrxkD8oe4CqNMHdSQrg6nFeHkl3dzAcPvv8SLuA+/TW3ms9mUnrsc17EtJLQCewI5Z73XgSLFPjV2zlhh6CMuq9Rtmk4LT4ukbndEupM0syaC20NUtn2Jsu6MhKnh7No/XcQ8DEHr/g/lEBDiybqYsB4atfVrPo96I+XXBui1prCj4KFyQE1PawHEF3ISBUXxeEpixkBJTpjFqVWqhXp5bWgvGzJEpVEUXbbZcxXkMo+IDIDnRWDBPdUNWYdlrNDRGfr5KIJkXjVjQXZxMMMNJ7j/8ypePQanHz+77uyF05iCPyNRsmWTN2NFc/YSQpJ44d0fe369z5yNcSPACxIoqtm9HZgCY2rKBS7mc64B90tH8Ds/ESBiAo29SRPJscQP25aBzj5h7i5fRj0DtpaKHJjuQ9hazzqvZb5heglFxOfpoOuvIOWSgGxm6Mqz1qFubarqHM/K0N9u2craGSQ== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(136003)(346002)(39860400002)(376002)(396003)(230922051799003)(64100799003)(1800799012)(451199024)(82310400011)(186009)(40470700004)(36840700001)(46966006)(40460700003)(40480700001)(336012)(426003)(81166007)(82740400003)(86362001)(36756003)(356005)(36860700001)(2906002)(5660300002)(83380400001)(26005)(2616005)(1076003)(16526019)(478600001)(47076005)(7696005)(6666004)(4326008)(8676002)(8936002)(41300700001)(7416002)(110136005)(316002)(54906003)(6636002)(70586007)(70206006)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2024 09:05:40.3147 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3d299b87-ccd3-480d-46e9-08dc18cdcf45 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: DS7PR12MB5816 amd-pstate driver utilizes the functions and data structures provided by the ITMT architecture to enable the scheduler to favor scheduling on cores which can be get a higher frequency with lower voltage. We call it amd-pstate preferrred core. Here sched_set_itmt_core_prio() is called to set priorities and sched_set_itmt_support() is called to enable ITMT feature. amd-pstate driver uses the highest performance value to indicate the priority of CPU. The higher value has a higher priority. The initial core rankings are set up by amd-pstate when the system boots. Add a variable hw_prefcore in cpudata structure. It will check if the processor and power firmware support preferred core feature. Add one new early parameter `disable` to allow user to disable the preferred core. Only when hardware supports preferred core and user set `enabled` in early parameter, amd pstate driver supports preferred core featue. Tested-by: Oleksandr Natalenko Reviewed-by: Huang Rui Reviewed-by: Wyes Karny Reviewed-by: Mario Limonciello Co-developed-by: Perry Yuan Signed-off-by: Perry Yuan Signed-off-by: Meng Li --- drivers/cpufreq/amd-pstate.c | 131 ++++++++++++++++++++++++++++++++--- include/linux/amd-pstate.h | 4 ++ 2 files changed, 127 insertions(+), 8 deletions(-) diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index 1f6186475715..9c2790753f99 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -49,6 +50,7 @@ #define AMD_PSTATE_TRANSITION_LATENCY 20000 #define AMD_PSTATE_TRANSITION_DELAY 1000 +#define AMD_PSTATE_PREFCORE_THRESHOLD 166 /* * TODO: We need more time to fine tune processors with shared memory solution @@ -64,6 +66,7 @@ static struct cpufreq_driver amd_pstate_driver; static struct cpufreq_driver amd_pstate_epp_driver; static int cppc_state = AMD_PSTATE_UNDEFINED; static bool cppc_enabled; +static bool amd_pstate_prefcore = true; /* * AMD Energy Preference Performance (EPP) @@ -297,13 +300,14 @@ static int pstate_init_perf(struct amd_cpudata *cpudata) if (ret) return ret; - /* - * TODO: Introduce AMD specific power feature. - * - * CPPC entry doesn't indicate the highest performance in some ASICs. + /* For platforms that do not support the preferred core feature, the + * highest_pef may be configured with 166 or 255, to avoid max frequency + * calculated wrongly. we take the AMD_CPPC_HIGHEST_PERF(cap1) value as + * the default max perf. */ - highest_perf = amd_get_highest_perf(); - if (highest_perf > AMD_CPPC_HIGHEST_PERF(cap1)) + if (cpudata->hw_prefcore) + highest_perf = AMD_PSTATE_PREFCORE_THRESHOLD; + else highest_perf = AMD_CPPC_HIGHEST_PERF(cap1); WRITE_ONCE(cpudata->highest_perf, highest_perf); @@ -324,8 +328,9 @@ static int cppc_init_perf(struct amd_cpudata *cpudata) if (ret) return ret; - highest_perf = amd_get_highest_perf(); - if (highest_perf > cppc_perf.highest_perf) + if (cpudata->hw_prefcore) + highest_perf = AMD_PSTATE_PREFCORE_THRESHOLD; + else highest_perf = cppc_perf.highest_perf; WRITE_ONCE(cpudata->highest_perf, highest_perf); @@ -706,6 +711,80 @@ static void amd_perf_ctl_reset(unsigned int cpu) wrmsrl_on_cpu(cpu, MSR_AMD_PERF_CTL, 0); } +/* + * Set amd-pstate preferred core enable can't be done directly from cpufreq callbacks + * due to locking, so queue the work for later. + */ +static void amd_pstste_sched_prefcore_workfn(struct work_struct *work) +{ + sched_set_itmt_support(); +} +static DECLARE_WORK(sched_prefcore_work, amd_pstste_sched_prefcore_workfn); + +/* + * Get the highest performance register value. + * @cpu: CPU from which to get highest performance. + * @highest_perf: Return address. + * + * Return: 0 for success, -EIO otherwise. + */ +static int amd_pstate_get_highest_perf(int cpu, u32 *highest_perf) +{ + int ret; + + if (boot_cpu_has(X86_FEATURE_CPPC)) { + u64 cap1; + + ret = rdmsrl_safe_on_cpu(cpu, MSR_AMD_CPPC_CAP1, &cap1); + if (ret) + return ret; + WRITE_ONCE(*highest_perf, AMD_CPPC_HIGHEST_PERF(cap1)); + } else { + u64 cppc_highest_perf; + + ret = cppc_get_highest_perf(cpu, &cppc_highest_perf); + if (ret) + return ret; + WRITE_ONCE(*highest_perf, cppc_highest_perf); + } + + return (ret); +} + +#define CPPC_MAX_PERF U8_MAX + +static void amd_pstate_init_prefcore(struct amd_cpudata *cpudata) +{ + int ret, prio; + u32 highest_perf; + + ret = amd_pstate_get_highest_perf(cpudata->cpu, &highest_perf); + if (ret) + return; + + cpudata->hw_prefcore = true; + /* check if CPPC preferred core feature is enabled*/ + if (highest_perf < CPPC_MAX_PERF) + prio = (int)highest_perf; + else { + pr_debug("AMD CPPC preferred core is unsupported!\n"); + cpudata->hw_prefcore = false; + return; + } + + if (!amd_pstate_prefcore) + return; + + /* + * The priorities can be set regardless of whether or not + * sched_set_itmt_support(true) has been called and it is valid to + * update them at any time after it has been called. + */ + sched_set_itmt_core_prio(prio, cpudata->cpu); + + schedule_work(&sched_prefcore_work); +} + static int amd_pstate_cpu_init(struct cpufreq_policy *policy) { int min_freq, max_freq, nominal_freq, lowest_nonlinear_freq, ret; @@ -727,6 +806,8 @@ static int amd_pstate_cpu_init(struct cpufreq_policy *policy) cpudata->cpu = policy->cpu; + amd_pstate_init_prefcore(cpudata); + ret = amd_pstate_init_perf(cpudata); if (ret) goto free_cpudata1; @@ -877,6 +958,17 @@ static ssize_t show_amd_pstate_highest_perf(struct cpufreq_policy *policy, return sysfs_emit(buf, "%u\n", perf); } +static ssize_t show_amd_pstate_hw_prefcore(struct cpufreq_policy *policy, + char *buf) +{ + bool hw_prefcore; + struct amd_cpudata *cpudata = policy->driver_data; + + hw_prefcore = READ_ONCE(cpudata->hw_prefcore); + + return sysfs_emit(buf, "%s\n", str_enabled_disabled(hw_prefcore)); +} + static ssize_t show_energy_performance_available_preferences( struct cpufreq_policy *policy, char *buf) { @@ -1074,18 +1166,27 @@ static ssize_t status_store(struct device *a, struct device_attribute *b, return ret < 0 ? ret : count; } +static ssize_t prefcore_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + return sysfs_emit(buf, "%s\n", str_enabled_disabled(amd_pstate_prefcore)); +} + cpufreq_freq_attr_ro(amd_pstate_max_freq); cpufreq_freq_attr_ro(amd_pstate_lowest_nonlinear_freq); cpufreq_freq_attr_ro(amd_pstate_highest_perf); +cpufreq_freq_attr_ro(amd_pstate_hw_prefcore); cpufreq_freq_attr_rw(energy_performance_preference); cpufreq_freq_attr_ro(energy_performance_available_preferences); static DEVICE_ATTR_RW(status); +static DEVICE_ATTR_RO(prefcore); static struct freq_attr *amd_pstate_attr[] = { &amd_pstate_max_freq, &amd_pstate_lowest_nonlinear_freq, &amd_pstate_highest_perf, + &amd_pstate_hw_prefcore, NULL, }; @@ -1093,6 +1194,7 @@ static struct freq_attr *amd_pstate_epp_attr[] = { &amd_pstate_max_freq, &amd_pstate_lowest_nonlinear_freq, &amd_pstate_highest_perf, + &amd_pstate_hw_prefcore, &energy_performance_preference, &energy_performance_available_preferences, NULL, @@ -1100,6 +1202,7 @@ static struct freq_attr *amd_pstate_epp_attr[] = { static struct attribute *pstate_global_attributes[] = { &dev_attr_status.attr, + &dev_attr_prefcore.attr, NULL }; @@ -1151,6 +1254,8 @@ static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy) cpudata->cpu = policy->cpu; cpudata->epp_policy = 0; + amd_pstate_init_prefcore(cpudata); + ret = amd_pstate_init_perf(cpudata); if (ret) goto free_cpudata1; @@ -1568,7 +1673,17 @@ static int __init amd_pstate_param(char *str) return amd_pstate_set_driver(mode_idx); } + +static int __init amd_prefcore_param(char *str) +{ + if (!strcmp(str, "disable")) + amd_pstate_prefcore = false; + + return 0; +} + early_param("amd_pstate", amd_pstate_param); +early_param("amd_prefcore", amd_prefcore_param); MODULE_AUTHOR("Huang Rui "); MODULE_DESCRIPTION("AMD Processor P-state Frequency Driver"); diff --git a/include/linux/amd-pstate.h b/include/linux/amd-pstate.h index 6ad02ad9c7b4..68fc1bd8d851 100644 --- a/include/linux/amd-pstate.h +++ b/include/linux/amd-pstate.h @@ -52,6 +52,9 @@ struct amd_aperf_mperf { * @prev: Last Aperf/Mperf/tsc count value read from register * @freq: current cpu frequency value * @boost_supported: check whether the Processor or SBIOS supports boost mode + * @hw_prefcore: check whether HW supports preferred core featue. + * Only when hw_prefcore and early prefcore param are true, + * AMD P-State driver supports preferred core featue. * @epp_policy: Last saved policy used to set energy-performance preference * @epp_cached: Cached CPPC energy-performance preference value * @policy: Cpufreq policy value @@ -85,6 +88,7 @@ struct amd_cpudata { u64 freq; bool boost_supported; + bool hw_prefcore; /* EPP feature related attributes*/ s16 epp_policy; From patchwork Fri Jan 19 09:04:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Meng, Li \(Jassmine\)" X-Patchwork-Id: 763990 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2074.outbound.protection.outlook.com [40.107.92.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 9833120B04; Fri, 19 Jan 2024 09:05:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.74 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705655160; cv=fail; b=H7aE9O12Is7vw2pqnyPVUkrwk0r8TjVEqn58fYAxf+wzfzdde5t9eHf/ZWnMfdcKQs9GHNqEENXJMW/JWwfg6urZVAf/t0g3gQiQ7Z9mcdviYl8jRDXKe/ysEZZ8BYP1GI0722O05SJnniKHPR3+k8qQd5NWEjPzp4R9eyWkQPk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705655160; c=relaxed/simple; bh=V1OayLcmeJlCpgx/UxKBGPk/1NLKOBRH7mNZc0LgEeo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=VeKXOoebkgWpQUtHsZWs+GpqymtPrjPskDn7oYldOQXyzWEtJn8YWUjNjApJeQNZq22G2St7V1DmRKUUImSn8Mtu4/O43LaY9jWnrMZkK16skNQM2Rm/DBESELe0sJUxrzqzAT2LVdjT7FkXMKXAUplbOdWUWhtC1fvleJQu1do= 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=N2B3XGLH; arc=fail smtp.client-ip=40.107.92.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="N2B3XGLH" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JfK2zAK0wKKCv5gxJgbeIXwkQavyGxWt4TIkAi2ne6BOID23r2/CKpIkzI3c6cush2lSqo4yLu8ZK2PKKMkInZCZhxOOlYmZCxeCm/XY2AccF8vf058AOzvBnxb7gvBRZYS+MYLkZ00mDdUZhcFEgLwj9QM0gDy+lT60pRDojmkuunACkGIa/Ft50NP53yzULFl/BIDHHxhuXzXMSTelAJ/jj9w1lBlWwtu2YmbM78i8SiXojVaX9Sovv/FUM5wy5CLRRWIY0toKB8AkiAfVKx9lR7NIxjOm26UCIX2CO69y21MC/DUPRSsnlnB/RJ5jGP8fyExjVdOuJ5PQ3xseDA== 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=zCdg9pmNqmoh1l7U4NuKo2AiiwUzLmS/VGk1gX2Uj/0=; b=KsIh+3+lEp4uxNNzMw0fzJtBrC4Bad77rr1EF4euvi3Pl9+WD2uvKNcrxKBGjHmOVyJdfcFeDhgdJYnFPObqFeTmp7H5cUbRheU0FnQeCi8I+21pFQnOcr1UcI9Klo60/rz/NQv2mguJWndbCxsAbf6pf9xy44egm3vD9mHsEYZklzvjMt1eIrzrv7CbKNla8/0GYB34+BGS7uWYzUQn+LtcGdz1zYNB0iOIGHGD+qXqQX81tQmcKo2UlKoibvUxpdtOAlttcrmQwsUgTOS3uA4FiFOe8gqCjqqOLrG+dkJf6esYBzNHz2BLGVmIDifrfddTRKBHa0dFQ6l1WCOwwg== 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=zCdg9pmNqmoh1l7U4NuKo2AiiwUzLmS/VGk1gX2Uj/0=; b=N2B3XGLHp4sRzt3Ef4R9bvLs3BrlwNko5FyLje0Hm9CQxPYAHK/J/VrGH8TLM2RKFr+QjFWoHSov+mMbTEW2Iz/yWQFp59Ue3aiIPziUynVCcSckofCVMTW//cVzbzhS2CzAdZPXpP5GYbNT+7eyiRZlHe5acIEWBbycuO3KAk0= Received: from MW4PR03CA0154.namprd03.prod.outlook.com (2603:10b6:303:8d::9) by CH3PR12MB9393.namprd12.prod.outlook.com (2603:10b6:610:1c5::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24; Fri, 19 Jan 2024 09:05:56 +0000 Received: from CO1PEPF000044F6.namprd21.prod.outlook.com (2603:10b6:303:8d:cafe::ed) by MW4PR03CA0154.outlook.office365.com (2603:10b6:303:8d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24 via Frontend Transport; Fri, 19 Jan 2024 09:05:55 +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.7228.0 via Frontend Transport; Fri, 19 Jan 2024 09:05:55 +0000 Received: from jasmine-meng.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 19 Jan 2024 03:05:39 -0600 From: Meng Li To: "Rafael J . Wysocki" , Borislav Petkov , Huang Rui CC: , , , , Shuah Khan , , "Nathan Fontenot" , Deepak Sharma , Alex Deucher , Mario Limonciello , Shimmer Huang , "Perry Yuan" , Xiaojian Du , Viresh Kumar , Borislav Petkov , "Oleksandr Natalenko" , Meng Li , Perry Yuan Subject: [PATCH V14 4/7] cpufreq: Add a notification message that the highest perf has changed Date: Fri, 19 Jan 2024 17:04:59 +0800 Message-ID: <20240119090502.3869695-5-li.meng@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240119090502.3869695-1-li.meng@amd.com> References: <20240119090502.3869695-1-li.meng@amd.com> Precedence: bulk X-Mailing-List: linux-acpi@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: CO1PEPF000044F6:EE_|CH3PR12MB9393:EE_ X-MS-Office365-Filtering-Correlation-Id: ac528c5d-d7bc-47c4-fbfe-08dc18cdd878 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +HpEZcY04Lm35fvdVgMu16CPiEDbEm4PMfTQA3IR2DKWCnj1Lu39PZgCh7KxyzGEVMw05X6NkX5cpQ8WU02qs7rxm7Qtl2mClnnjV4oIQ9Lrrk4m3qvfpfqNNTODHhvxG26TXXDGgyq1RfpyIqvvD/Vv9l6Wx51J7l8px7Uo1hy+ZpsYPUe3W2qGfQMrhd8jv5BNNGBOKhOe2cd1ihI7W8rQH7DQPbI6FxBdvbSRTB1LVI2P2O4qLIhxTmjbeBrWsulYKrw/CleM+5SCEPBtAwcmg92EI7yB5eyEZaqkaPBrC/mNdn1dr8OcEuU1ZUBCxtNVjMyXZkbiCBPvZgGRIJT+U7Oqbe86Se24fMlfN6AeEHDVQMS3nnzAJUz7axShfOrfzBVgyiq8ahCm9hh6RvNvaWw3dRXB6DFuj+BCPWoIv4PhhugfZf6LjqBi0RJ/Oy/KxSFfwVAEeQNAOL9LgkMf1jDD+uVWPOkIj4+rDWwplFVOPA3UfglZ2uNbntq3EieHBnbyWBFGSMCB3r50JNGGQ9vyVjThLyOcSWRFatzjSms0XwLzraCPy50kKpQ5jytOU57s9HKSmBLdxOTYMEdPdOG7D5zFfEiy29CarastrxWeDcDiUtQJZgONkLxF5dqQDURxcDNyCP9MzP3Y6Da+XzGjkY3b57wem+xRzBdW0Q90MBU7Ao+Q2MGbwWXQRlAucw+8rCOcvDzMv0YA03wruDZITPc5QUjeScF60HOttb310oas+mg2ZZhQW45FIaudO/I7IVUu9Rmu/wCFMGX0icp+9jrfrpOcbupZAF4= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(376002)(39860400002)(346002)(136003)(396003)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(82310400011)(46966006)(40470700004)(36840700001)(16526019)(2616005)(336012)(26005)(83380400001)(426003)(1076003)(7696005)(54906003)(36860700001)(47076005)(7416002)(110136005)(4326008)(8676002)(5660300002)(8936002)(15650500001)(966005)(478600001)(6666004)(2906002)(6636002)(82740400003)(70586007)(70206006)(316002)(86362001)(36756003)(356005)(81166007)(41300700001)(40480700001)(40460700003)(226483002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2024 09:05:55.7531 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ac528c5d-d7bc-47c4-fbfe-08dc18cdd878 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: CH3PR12MB9393 BIOS issues the notify 0x85 to OS that the highest performance changed. And it will affect the ranking of the preferred core. AMD-pstate driver will set the priority of cores based on the preferred core ranking. Tested-by: Oleksandr Natalenko Reviewed-by: Mario Limonciello Reviewed-by: Huang Rui Reviewed-by: Perry Yuan Signed-off-by: Meng Li Link: https://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html#processor-device-notification-values --- drivers/acpi/processor_driver.c | 6 ++++++ include/linux/cpufreq.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index 4bd16b3f0781..67db60eda370 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c @@ -27,6 +27,7 @@ #define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80 #define ACPI_PROCESSOR_NOTIFY_POWER 0x81 #define ACPI_PROCESSOR_NOTIFY_THROTTLING 0x82 +#define ACPI_PROCESSOR_NOTIFY_HIGEST_PERF_CHANGED 0x85 MODULE_AUTHOR("Paul Diefenbaugh"); MODULE_DESCRIPTION("ACPI Processor Driver"); @@ -83,6 +84,11 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data) acpi_bus_generate_netlink_event(device->pnp.device_class, dev_name(&device->dev), event, 0); break; + case ACPI_PROCESSOR_NOTIFY_HIGEST_PERF_CHANGED: + cpufreq_update_limits(pr->id); + acpi_bus_generate_netlink_event(device->pnp.device_class, + dev_name(&device->dev), event, 0); + break; default: acpi_handle_debug(handle, "Unsupported event [0x%x]\n", event); break; diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index afda5f24d3dd..9bebeec24abb 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -263,6 +263,7 @@ static inline bool cpufreq_supports_freq_invariance(void) return false; } static inline void disable_cpufreq(void) { } +static inline void cpufreq_update_limits(unsigned int cpu) { } #endif #ifdef CONFIG_CPU_FREQ_STAT From patchwork Fri Jan 19 09:05:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Meng, Li \(Jassmine\)" X-Patchwork-Id: 765250 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2051.outbound.protection.outlook.com [40.107.220.51]) (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 BBB2A2C864; Fri, 19 Jan 2024 09:06:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.51 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705655166; cv=fail; b=l08jJWb9PSe9SbS1NaPkhsmoOn1ICarEluxyv4JjGkk8C8Q6PXgh1/h4TKAM+cOiZ+PPZiKrquhqz0ss21ltYBfZkKyT2tl9o4aPdSITLOddhWgwUr2Udn4XM0PSdw7yEzBeRlYtmjCUKcgVbKKRLUghCDM6YCqGp88tu4bTAak= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705655166; c=relaxed/simple; bh=gm2sMvszd/UMPdqzcy9QcGrVlbmcT7JdgSVZE5/Q2jc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RLsjUPn2F4suNGjUqFyoqckrnjZcRxQhSvEG10QV4plyoBoO+ydldbE7Utu1ERBR6PdnnlxsNgsgsnNUcMgESgEjr8B2A58peyjXUEb6dGPFonAq1jm+7BHvHWNuZtJ2P4wHOUqc5yiQpXpoJskCDCmWar8uUCT09juiun1j2cg= 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=0fkJXq/c; arc=fail smtp.client-ip=40.107.220.51 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="0fkJXq/c" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yn8hAc8GKHpGd/LzPJAfEcP8o2QlMcpzlFrbbjPY/Hznu4gaxOvxithPEzaX1hLDsf5eUIlqt1ohqMLygeCOrTGyEz0OaWmb42g9gwS3mxJUpDm8Fe+7fWadb/Op7uewHg3ofQ+AfH9aersUhri8ae5X7iNZi2puiOq1FrQVxeVVR3j9OrVKxzhgjah/+I4uz1loRcmc0zXsUXCpjLe89pm18dS7YlsTDTP1nyBvHhgj4ptsoDiD+FX8fNnVePElkkv50W38oSGKPx2iYJgx9LbsSZTjzFQx6O1F5X1Fk/1Oug5lSsHTP6ewT3dY6mmVYcGyQX4gv3gLTp+BO8H4TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fX2Ta/Gv798M7peRlFChK9xqESpeKi5VXhhwayFgnPw=; b=JnurhhSF1Yjo68oahBvhgfxc2OPiYAxUY+0R3/8DT5UaYveDb21Q/OjW8RZks9WwDQ9BVVv3lhrR2jQKETydmXHkp9VyjQF5LS8b5CJevMkHEVNHp/zEj20or7V+QK7ZBiEvofeULArMWoacR7ytMtKy2xVzJm75IMRYaNd2ccnpgKoQixUbpcXwaOG4ZQNr60ZsZX3Vu5/n6c99cwhg2uCzATLnfOzDNeflG/TrBZiYqnMPzuI+6vNUnIGTFOdSRnuuqME32z3AYUOJWxH9OEypqeiUEDRH7xGxN4225y7MUauGHPvFyqAYdwdMmXC4hGoKThrgYpgxSv6YknFe7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fX2Ta/Gv798M7peRlFChK9xqESpeKi5VXhhwayFgnPw=; b=0fkJXq/cBteMCQ9IySy7x8nzUK9nIbm64JLO1uCMGP6UqZU7s1gPbYCpoDGRmpLkTITHph2eYRPcyYOtfkZR5jUNFW3eo48ZnWPVqXjcC6Sch7CIgkLhGe0FGeMpgUrrPIWeHx8SYbUfK0ey/fy7b+y4IVh/8BtO0RCR36BzrFw= Received: from MW4PR04CA0112.namprd04.prod.outlook.com (2603:10b6:303:83::27) by BN9PR12MB5066.namprd12.prod.outlook.com (2603:10b6:408:133::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.26; Fri, 19 Jan 2024 09:06:01 +0000 Received: from CO1PEPF000044FD.namprd21.prod.outlook.com (2603:10b6:303:83:cafe::b7) by MW4PR04CA0112.outlook.office365.com (2603:10b6:303:83::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24 via Frontend Transport; Fri, 19 Jan 2024 09:06:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1PEPF000044FD.mail.protection.outlook.com (10.167.241.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7228.0 via Frontend Transport; Fri, 19 Jan 2024 09:06:00 +0000 Received: from jasmine-meng.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 19 Jan 2024 03:05:55 -0600 From: Meng Li To: "Rafael J . Wysocki" , Borislav Petkov , Huang Rui CC: , , , , Shuah Khan , , "Nathan Fontenot" , Deepak Sharma , Alex Deucher , Mario Limonciello , Shimmer Huang , "Perry Yuan" , Xiaojian Du , Viresh Kumar , Borislav Petkov , "Oleksandr Natalenko" , Meng Li , Wyes Karny , Perry Yuan Subject: [PATCH V14 5/7] cpufreq: amd-pstate: Update amd-pstate preferred core ranking dynamically Date: Fri, 19 Jan 2024 17:05:00 +0800 Message-ID: <20240119090502.3869695-6-li.meng@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240119090502.3869695-1-li.meng@amd.com> References: <20240119090502.3869695-1-li.meng@amd.com> Precedence: bulk X-Mailing-List: linux-acpi@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: CO1PEPF000044FD:EE_|BN9PR12MB5066:EE_ X-MS-Office365-Filtering-Correlation-Id: 670f7a62-ef9c-40c5-ff71-08dc18cddb88 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8rHcaqIOL1EILaMhAiADoivSumLUogyD1uNvWY9FzwBZ4fFg95WO34fJe+CWZOdh3OlQIStYeTPHjD62LLmdFMP+yZwfdNBRqcR9bRUIwfRI2zaFBsCxbsYQAnKiyj7phcr4njTTgppKgFgTWy1izD9GXCQkkgLgxKd152na9A2/AMs1dY6ktMRYFKqpHbRn0oZwdVUNQCZoxnJTIqrPyS6Ef6mF205SblLGm9xvlwhlOihlL9H+rSjl5HefGqrvw5/gLbP772l9DQ1CtPnd50BRnzbsOiaFswRLF8MZFHX2rnXjA1dKJIczUyxrtm2oCd1lT+R4w5th6iYvmmkanJ8Fj6C/69oOmeqXh1OoinEK9Iz1yp0CpB/UIUEtAoaTyE8Z/fxAxGQ1yL8/NwI/gRV5YQwynH8ZDt5G0XGFZU5OhkLK33/1bdomPnbqMW6JgTKLq5SHMdECQbbdDpXw0j0OrwBnoMifsMQLhOlEYXsivI28izONkBy2FTpv/WARvJOwUIeWyjdtLC6iH2uqwkg01pCWDe7kujPZm1N9ixK9aoJjitDqTJlBgAiwjubn+eFRMqYmzCeKDfl6KRPVz/yJvPnszpn96qim/MBqJbodTrO420YCTVCVNu0GWuM7nPz5uQQU/Fe3jmSIaaRi6O+B7JKVBUSOY+MS8+nLpT7BlmMsPFbhachzJ/OpVa5vf381MtRavgCK+zPoZrBU18WwL0v3qDNYWBZWQDi+1pwBcy1C9ONJPKLqeWde0NiujrsU3h34JI1sLEsxdLScjQ== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(346002)(39860400002)(396003)(376002)(136003)(230922051799003)(82310400011)(64100799003)(186009)(451199024)(1800799012)(36840700001)(40470700004)(46966006)(6636002)(54906003)(40480700001)(316002)(7696005)(40460700003)(110136005)(2616005)(70586007)(70206006)(5660300002)(26005)(1076003)(16526019)(478600001)(6666004)(66899024)(336012)(426003)(36860700001)(2906002)(36756003)(41300700001)(86362001)(81166007)(356005)(47076005)(15650500001)(4326008)(8676002)(8936002)(83380400001)(82740400003)(7416002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2024 09:06:00.8912 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 670f7a62-ef9c-40c5-ff71-08dc18cddb88 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: CO1PEPF000044FD.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5066 Preferred core rankings can be changed dynamically by the platform based on the workload and platform conditions and accounting for thermals and aging. When this occurs, cpu priority need to be set. Tested-by: Oleksandr Natalenko Reviewed-by: Mario Limonciello Reviewed-by: Wyes Karny Reviewed-by: Huang Rui Reviewed-by: Perry Yuan Signed-off-by: Meng Li --- drivers/cpufreq/amd-pstate.c | 52 ++++++++++++++++++++++++++++++++++++ include/linux/amd-pstate.h | 6 +++++ 2 files changed, 58 insertions(+) diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index 9c2790753f99..3034b8ff3f8e 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -315,6 +315,7 @@ static int pstate_init_perf(struct amd_cpudata *cpudata) WRITE_ONCE(cpudata->nominal_perf, AMD_CPPC_NOMINAL_PERF(cap1)); WRITE_ONCE(cpudata->lowest_nonlinear_perf, AMD_CPPC_LOWNONLIN_PERF(cap1)); WRITE_ONCE(cpudata->lowest_perf, AMD_CPPC_LOWEST_PERF(cap1)); + WRITE_ONCE(cpudata->prefcore_ranking, AMD_CPPC_HIGHEST_PERF(cap1)); WRITE_ONCE(cpudata->min_limit_perf, AMD_CPPC_LOWEST_PERF(cap1)); return 0; } @@ -339,6 +340,7 @@ static int cppc_init_perf(struct amd_cpudata *cpudata) WRITE_ONCE(cpudata->lowest_nonlinear_perf, cppc_perf.lowest_nonlinear_perf); WRITE_ONCE(cpudata->lowest_perf, cppc_perf.lowest_perf); + WRITE_ONCE(cpudata->prefcore_ranking, cppc_perf.highest_perf); WRITE_ONCE(cpudata->min_limit_perf, cppc_perf.lowest_perf); if (cppc_state == AMD_PSTATE_ACTIVE) @@ -785,6 +787,40 @@ static void amd_pstate_init_prefcore(struct amd_cpudata *cpudata) schedule_work(&sched_prefcore_work); } +static void amd_pstate_update_limits(unsigned int cpu) +{ + struct cpufreq_policy *policy = cpufreq_cpu_get(cpu); + struct amd_cpudata *cpudata = policy->driver_data; + u32 prev_high = 0, cur_high = 0; + int ret; + bool highest_perf_changed = false; + + mutex_lock(&amd_pstate_driver_lock); + if ((!amd_pstate_prefcore) || (!cpudata->hw_prefcore)) + goto free_cpufreq_put; + + ret = amd_pstate_get_highest_perf(cpu, &cur_high); + if (ret) + goto free_cpufreq_put; + + prev_high = READ_ONCE(cpudata->prefcore_ranking); + if (prev_high != cur_high) { + highest_perf_changed = true; + WRITE_ONCE(cpudata->prefcore_ranking, cur_high); + + if (cur_high < CPPC_MAX_PERF) + sched_set_itmt_core_prio((int)cur_high, cpu); + } + +free_cpufreq_put: + cpufreq_cpu_put(policy); + + if (!highest_perf_changed) + cpufreq_update_policy(cpu); + + mutex_unlock(&amd_pstate_driver_lock); +} + static int amd_pstate_cpu_init(struct cpufreq_policy *policy) { int min_freq, max_freq, nominal_freq, lowest_nonlinear_freq, ret; @@ -958,6 +994,17 @@ static ssize_t show_amd_pstate_highest_perf(struct cpufreq_policy *policy, return sysfs_emit(buf, "%u\n", perf); } +static ssize_t show_amd_pstate_prefcore_ranking(struct cpufreq_policy *policy, + char *buf) +{ + u32 perf; + struct amd_cpudata *cpudata = policy->driver_data; + + perf = READ_ONCE(cpudata->prefcore_ranking); + + return sysfs_emit(buf, "%u\n", perf); +} + static ssize_t show_amd_pstate_hw_prefcore(struct cpufreq_policy *policy, char *buf) { @@ -1176,6 +1223,7 @@ cpufreq_freq_attr_ro(amd_pstate_max_freq); cpufreq_freq_attr_ro(amd_pstate_lowest_nonlinear_freq); cpufreq_freq_attr_ro(amd_pstate_highest_perf); +cpufreq_freq_attr_ro(amd_pstate_prefcore_ranking); cpufreq_freq_attr_ro(amd_pstate_hw_prefcore); cpufreq_freq_attr_rw(energy_performance_preference); cpufreq_freq_attr_ro(energy_performance_available_preferences); @@ -1186,6 +1234,7 @@ static struct freq_attr *amd_pstate_attr[] = { &amd_pstate_max_freq, &amd_pstate_lowest_nonlinear_freq, &amd_pstate_highest_perf, + &amd_pstate_prefcore_ranking, &amd_pstate_hw_prefcore, NULL, }; @@ -1194,6 +1243,7 @@ static struct freq_attr *amd_pstate_epp_attr[] = { &amd_pstate_max_freq, &amd_pstate_lowest_nonlinear_freq, &amd_pstate_highest_perf, + &amd_pstate_prefcore_ranking, &amd_pstate_hw_prefcore, &energy_performance_preference, &energy_performance_available_preferences, @@ -1538,6 +1588,7 @@ static struct cpufreq_driver amd_pstate_driver = { .suspend = amd_pstate_cpu_suspend, .resume = amd_pstate_cpu_resume, .set_boost = amd_pstate_set_boost, + .update_limits = amd_pstate_update_limits, .name = "amd-pstate", .attr = amd_pstate_attr, }; @@ -1552,6 +1603,7 @@ static struct cpufreq_driver amd_pstate_epp_driver = { .online = amd_pstate_epp_cpu_online, .suspend = amd_pstate_epp_suspend, .resume = amd_pstate_epp_resume, + .update_limits = amd_pstate_update_limits, .name = "amd-pstate-epp", .attr = amd_pstate_epp_attr, }; diff --git a/include/linux/amd-pstate.h b/include/linux/amd-pstate.h index 68fc1bd8d851..d21838835abd 100644 --- a/include/linux/amd-pstate.h +++ b/include/linux/amd-pstate.h @@ -39,11 +39,16 @@ struct amd_aperf_mperf { * @cppc_req_cached: cached performance request hints * @highest_perf: the maximum performance an individual processor may reach, * assuming ideal conditions + * For platforms that do not support the preferred core feature, the + * highest_pef may be configured with 166 or 255, to avoid max frequency + * calculated wrongly. we take the fixed value as the highest_perf. * @nominal_perf: the maximum sustained performance level of the processor, * assuming ideal operating conditions * @lowest_nonlinear_perf: the lowest performance level at which nonlinear power * savings are achieved * @lowest_perf: the absolute lowest performance level of the processor + * @prefcore_ranking: the preferred core ranking, the higher value indicates a higher + * priority. * @max_freq: the frequency that mapped to highest_perf * @min_freq: the frequency that mapped to lowest_perf * @nominal_freq: the frequency that mapped to nominal_perf @@ -73,6 +78,7 @@ struct amd_cpudata { u32 nominal_perf; u32 lowest_nonlinear_perf; u32 lowest_perf; + u32 prefcore_ranking; u32 min_limit_perf; u32 max_limit_perf; u32 min_limit_freq; From patchwork Fri Jan 19 09:05:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Meng, Li \(Jassmine\)" X-Patchwork-Id: 763989 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2053.outbound.protection.outlook.com [40.107.95.53]) (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 9BDF12D02A; Fri, 19 Jan 2024 09:06:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.95.53 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705655173; cv=fail; b=grth1xvy1VyBUmx+xkieQ/g+KRm5AcUOerNpXPWwdqTPeA1vUZK9ORdXpJwcKbRYh+P0Jt633i+ok7xaX19oMDCHUKV7hdOWcIgiFGrYqZLCyL344uBMFHR3V4oEYCNDpKGDHN+utoUntVPMgcOL4l1plj7V8w9+okSY1AcmuqQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705655173; c=relaxed/simple; bh=kUv7qB/28v6X/lqkUL2AqREFmuICgZ+LeKvOiWXMblc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dMaiNbk8mzhp4r0riO7MLOldlp4nyKFmHRtbw5pY/amohszvw78pfwywexXvJqlc6vWW9TBvGxara9b+IVCV3lTtQkpVo1KDYHzxiHQh1MqD2+9xtWySaIvZ9RfYJs9tmRpTHWVnyYVTqFyiWeOj+YjWINqCXYEZozIoYjgAZos= 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=07Vfl4PE; arc=fail smtp.client-ip=40.107.95.53 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="07Vfl4PE" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ECGBh6waJvfwPi2K8kl87rfS3Mn6GAlGddaHCcfozGorMq6BrIdgZc93k3J+T7WgyBGEcwSNWDMGKWtdcbclnGEDVqe1lZqv4D8PdM7nuzi3xN8bgYw4cqcoA7hOr+lh8WP1M9+XYF035AHMZXY/2fcfMXT+JBkiLr3scrmRGHMiErgN8GzEYpXl3Qsu2J8dVwH7vFxyeNBulpR6fnHPAWx1jvfHCFIMTgfyqZZh1qoziJi68EM9PTCg3olEjCQU//Jp+t+/8dyWgonz3dbdaIh+TuYOwvSb+6mXSMNcn3xHBfZK7lcNONE2OjuEKH3sk205tee6bNtQWc1HHQ1jEw== 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=DeTOmVrv2T5NRcDB2UgLXuMlG+OUScBsFFkfBAXWKc8=; b=eK6D12RpsfJQNpVORsUpsHTO1gWmeRag29E/Q6Ad6N1bRUF1vg1D9AblVp7DkM8CprSuZFjXb6LTapBYz3LksnFEDVpa4Vzt/07RbwVfXBh/O2OqeRPTB0MJHSzdzqKEQ27QaO99ITomfqYy/OSncI9fLENJQCrF7mIcaITYc0jMzy3y57zEIDkK77f8zmXAMkujNkomTDExDQ4sCOlgllOl/XHw3eZt0L78XZUAQ2L8KtFnJdWm5WpSaezJP8O5bgyNA4SZF30wdRn8VVG+1fu43zAS7zgf5f5nnzR8o21xSLLYU+d7Z0uP4Q71PtF/1TqYSq8gi3wuLfBZFhYl9Q== 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=DeTOmVrv2T5NRcDB2UgLXuMlG+OUScBsFFkfBAXWKc8=; b=07Vfl4PE5ZOzOr4dwm6ggsrsZIlrztPY3/lckej3aKjV0Dla7DFhIMGWFThWTLIlLkV0olsrEXzyqIbkEuJDSkpKHJolI6E5WdwSNAB7mhL+QH38kRULUCWeL6VoU38O/Pins0FvXvODyEGHs66WHvcMe4M3TVzUZshTE2zg7Wk= Received: from MW4PR04CA0108.namprd04.prod.outlook.com (2603:10b6:303:83::23) by IA1PR12MB6627.namprd12.prod.outlook.com (2603:10b6:208:3a1::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.26; Fri, 19 Jan 2024 09:06:07 +0000 Received: from CO1PEPF000044FD.namprd21.prod.outlook.com (2603:10b6:303:83:cafe::ba) by MW4PR04CA0108.outlook.office365.com (2603:10b6:303:83::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24 via Frontend Transport; Fri, 19 Jan 2024 09:06:07 +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 CO1PEPF000044FD.mail.protection.outlook.com (10.167.241.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7228.0 via Frontend Transport; Fri, 19 Jan 2024 09:06:06 +0000 Received: from jasmine-meng.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 19 Jan 2024 03:06:00 -0600 From: Meng Li To: "Rafael J . Wysocki" , Borislav Petkov , Huang Rui CC: , , , , Shuah Khan , , "Nathan Fontenot" , Deepak Sharma , Alex Deucher , Mario Limonciello , Shimmer Huang , "Perry Yuan" , Xiaojian Du , Viresh Kumar , Borislav Petkov , "Oleksandr Natalenko" , Meng Li , Wyes Karny , Perry Yuan Subject: [PATCH V14 6/7] Documentation: amd-pstate: introduce amd-pstate preferred core Date: Fri, 19 Jan 2024 17:05:01 +0800 Message-ID: <20240119090502.3869695-7-li.meng@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240119090502.3869695-1-li.meng@amd.com> References: <20240119090502.3869695-1-li.meng@amd.com> Precedence: bulk X-Mailing-List: linux-acpi@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: CO1PEPF000044FD:EE_|IA1PR12MB6627:EE_ X-MS-Office365-Filtering-Correlation-Id: 23bb918b-1c7c-45f6-c2ee-08dc18cddf17 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: M59X0qZco7ehCSuwkubWjCw1LAYXCSpqcGmefN5Z81CJMLP6mwXZDH2i2ORCwTJEr7ml6s4uwJaQTaqAPlRLaLadDfDFq233qj++uzodJKNEvFy8wkdzsx3dp6O/9E5XXFoqS+oKz6enDOcQmDY/FYC6TT0/0gSvnycfyiheQUfbCn7N4/gPpaGRpJCOLp8mUPiAeeO5aezE5ZZC3rI5W0b5+wVPsn/6ovczoLi1+nobMAyIMVeScV+bAea6FYBbWAPyzZeL328wnbR83cnpJkvoQzXE5p7Lpg1tawjmTy7x46c2mQE1x+VkNcgN1RlrKjfcloTv6/NgSnzfMwItV+KnpXBChfQNG4h6VwB3s6nRHSXUCr0nhF7B5r4R05zJVSByjBnjQqCb1xRmh0JiiWwzonIfgkmmdND2fisRzIzSMOklHfsQDxEkt39tLnZcF0eq1+zGWMHPJuK1caOTHdKWEKHDyxUwiHzkGusFirjpjlDx6oUc+aBShIKC9XzfdmA/SdMjC49BiFIJvgTAJcDZCiBSROYuba47FfTOmeX9Zv4k7u92ixPGpN/YXLkueB2TZKiKXGkEOdtqzJ2jnP6j8g109rR2OBMljSHL7hsVue4OkCVpfhi0FD9+XK2FHhDf4F+AVVn77z+WB7LInDt3GvJsrtLB+ubGdunO13xty5tj48Ws1/Cj+cZNTopJgdNN/h/ZBhBH79na2/ZhEs98BpFZZr3qclmlfyB8qQLSwFGlu4TxkvdTaxT54divg380EtYgWOjCrXfcOSK2lw== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(136003)(346002)(39860400002)(376002)(396003)(230922051799003)(64100799003)(1800799012)(451199024)(82310400011)(186009)(40470700004)(36840700001)(46966006)(40460700003)(40480700001)(336012)(426003)(81166007)(82740400003)(86362001)(36756003)(356005)(36860700001)(2906002)(5660300002)(83380400001)(26005)(2616005)(1076003)(16526019)(478600001)(47076005)(7696005)(4326008)(8676002)(8936002)(41300700001)(7416002)(110136005)(316002)(54906003)(6636002)(70586007)(70206006)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2024 09:06:06.8600 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 23bb918b-1c7c-45f6-c2ee-08dc18cddf17 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: CO1PEPF000044FD.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6627 Introduce amd-pstate preferred core. check preferred core state set by the kernel parameter: $ cat /sys/devices/system/cpu/amd-pstate/prefcore Tested-by: Oleksandr Natalenko Reviewed-by: Wyes Karny Reviewed-by: Mario Limonciello Reviewed-by: Huang Rui Reviewed-by: Perry Yuan Signed-off-by: Meng Li --- Documentation/admin-guide/pm/amd-pstate.rst | 59 ++++++++++++++++++++- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/pm/amd-pstate.rst b/Documentation/admin-guide/pm/amd-pstate.rst index 9eb26014d34b..0a3aa6b8ffd5 100644 --- a/Documentation/admin-guide/pm/amd-pstate.rst +++ b/Documentation/admin-guide/pm/amd-pstate.rst @@ -300,8 +300,8 @@ platforms. The AMD P-States mechanism is the more performance and energy efficiency frequency management method on AMD processors. -AMD Pstate Driver Operation Modes -================================= +``amd-pstate`` Driver Operation Modes +====================================== ``amd_pstate`` CPPC has 3 operation modes: autonomous (active) mode, non-autonomous (passive) mode and guided autonomous (guided) mode. @@ -353,6 +353,48 @@ is activated. In this mode, driver requests minimum and maximum performance level and the platform autonomously selects a performance level in this range and appropriate to the current workload. +``amd-pstate`` Preferred Core +================================= + +The core frequency is subjected to the process variation in semiconductors. +Not all cores are able to reach the maximum frequency respecting the +infrastructure limits. Consequently, AMD has redefined the concept of +maximum frequency of a part. This means that a fraction of cores can reach +maximum frequency. To find the best process scheduling policy for a given +scenario, OS needs to know the core ordering informed by the platform through +highest performance capability register of the CPPC interface. + +``amd-pstate`` preferred core enables the scheduler to prefer scheduling on +cores that can achieve a higher frequency with lower voltage. The preferred +core rankings can dynamically change based on the workload, platform conditions, +thermals and ageing. + +The priority metric will be initialized by the ``amd-pstate`` driver. The ``amd-pstate`` +driver will also determine whether or not ``amd-pstate`` preferred core is +supported by the platform. + +``amd-pstate`` driver will provide an initial core ordering when the system boots. +The platform uses the CPPC interfaces to communicate the core ranking to the +operating system and scheduler to make sure that OS is choosing the cores +with highest performance firstly for scheduling the process. When ``amd-pstate`` +driver receives a message with the highest performance change, it will +update the core ranking and set the cpu's priority. + +``amd-pstate`` Preferred Core Switch +================================= +Kernel Parameters +----------------- + +``amd-pstate`` peferred core`` has two states: enable and disable. +Enable/disable states can be chosen by different kernel parameters. +Default enable ``amd-pstate`` preferred core. + +``amd_prefcore=disable`` + +For systems that support ``amd-pstate`` preferred core, the core rankings will +always be advertised by the platform. But OS can choose to ignore that via the +kernel parameter ``amd_prefcore=disable``. + User Space Interface in ``sysfs`` - General =========================================== @@ -385,6 +427,19 @@ control its functionality at the system level. They are located in the to the operation mode represented by that string - or to be unregistered in the "disable" case. +``prefcore`` + Preferred core state of the driver: "enabled" or "disabled". + + "enabled" + Enable the ``amd-pstate`` preferred core. + + "disabled" + Disable the ``amd-pstate`` preferred core + + + This attribute is read-only to check the state of preferred core set + by the kernel parameter. + ``cpupower`` tool support for ``amd-pstate`` =============================================== From patchwork Fri Jan 19 09:05:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Meng, Li \(Jassmine\)" X-Patchwork-Id: 765249 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2079.outbound.protection.outlook.com [40.107.212.79]) (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 2FFC21E89E; Fri, 19 Jan 2024 09:06:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.212.79 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705655194; cv=fail; b=dbb+NPxnfbqY9VQs6wxvHHBvr21xwMwW0Cwbj6EaiTQW408Fuj/ySJalnt8rMuMVuGai+QTTVoBf9SfTVC7IqYHnNkb2uAg38E2qfSeqilKz5ATWTcoiUoQYwCo3HSp84Mq93WIddoMzN1/vZAdlJc07C5TVh3IZ9dodNdp87os= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705655194; c=relaxed/simple; bh=IZvjB7EN/4zNzdRQnCVGIQg4s42HWrXioCam/fK1DV0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=m+cnZsxV8ut6SERmUrRjiLN36YOJQ2hUhHfKAB3SXqMq4UP1bxJvObX2UBl68lV+BWOdgFIA0aztEhJ4Bu/xkpOIv7H6a1/7bMh0T5+oW75xvXbFyQp0OtXzgK/bnivR3AhuUDpbYP/1T4h0AQkzOR3Ne7M3vAxSs+q10kESc3c= 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=twRq39oL; arc=fail smtp.client-ip=40.107.212.79 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="twRq39oL" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sfv7KOTQVQu5ozwi+Y8rHXbFDrRI2huujN6erunpMzUIOCyX8Xy3i/At2KNtoERysJdy13CfMlGO/RGe5yCV1CCRKJxLFjhJkJ20ZPFCGcPGniMqgv7+kf6Q4qmJQnW7hNTqB7bKBgjRSpZUVCKvMzLkEWa1uaJNKFwWTXw03jgb21sbfx3ZoMaqZZJwDFRnjt7/GZMPCcxAzsH7gfPzPxXdIxqFfCvPADkP9VJbUD2vI27LEfsAJpts07xXigowEFH/w3+Il/VTLqMro6UXXI/WMd809Gee24sWEWKw5EaTU3E8JIHZ6IE2sHG7VxyT8HXZPSker52uvOGxILQC3g== 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=No7NU21ife6RzGvHBvQIbHlZ1whS1mUgP/ZoECpCgPo=; b=i5qE0PIl79fP8x4sNn2gv4ZfiRx2Dp8tjK+JMj1+KHaHd1ISj5FvesQnV8wnUP6BrXMldQrwirRPlb/ZmtGXQSKUJBGGWR/8fzLMIbx0TlzyZ91r1qr0HNn+Sic+g7gR/0dOX91y6Svozn/7cvpg1FVqmTE00NTBWCnOeSeOcocg6Wf4dtK/jL/HLhXxlieYDGO6Nl8nO3TI6nvTu76hROBT0CTHjmwX65U3EQ3KwXpydTRaAM5dFbbjDW9Msg6Ni01OAnmulbOldQXyEmUjP2I6reQyIh458n+N74HkkXiCl4Vk5EC5qLJdPwDhtoxHx23QwC4v/3ItAKNPtWinmw== 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=No7NU21ife6RzGvHBvQIbHlZ1whS1mUgP/ZoECpCgPo=; b=twRq39oLD9T+KXqC2KD9tc+L9d5xeUiiDowEhvI7QYaKurL3Sjrc9hxSxvCVWHLeHiDCpcAhaqBwVrRQZayJwOztOKSNv4y0trSn4rxB8RD1BkmIciZdgusOjbs5560TaRqeH5/UDMaNC00FbVtnuDCGKXhTFdomKYe3ZoK6qAc= Received: from MW4PR04CA0347.namprd04.prod.outlook.com (2603:10b6:303:8a::22) by DS7PR12MB8250.namprd12.prod.outlook.com (2603:10b6:8:db::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24; Fri, 19 Jan 2024 09:06:27 +0000 Received: from CO1PEPF000044F8.namprd21.prod.outlook.com (2603:10b6:303:8a:cafe::9e) by MW4PR04CA0347.outlook.office365.com (2603:10b6:303:8a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24 via Frontend Transport; Fri, 19 Jan 2024 09:06:27 +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.7228.0 via Frontend Transport; Fri, 19 Jan 2024 09:06:27 +0000 Received: from jasmine-meng.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 19 Jan 2024 03:06:05 -0600 From: Meng Li To: "Rafael J . Wysocki" , Borislav Petkov , Huang Rui CC: , , , , Shuah Khan , , "Nathan Fontenot" , Deepak Sharma , Alex Deucher , Mario Limonciello , Shimmer Huang , "Perry Yuan" , Xiaojian Du , Viresh Kumar , Borislav Petkov , "Oleksandr Natalenko" , Meng Li , Wyes Karny , Perry Yuan Subject: [PATCH V14 7/7] Documentation: introduce amd-pstate preferrd core mode kernel command line options Date: Fri, 19 Jan 2024 17:05:02 +0800 Message-ID: <20240119090502.3869695-8-li.meng@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240119090502.3869695-1-li.meng@amd.com> References: <20240119090502.3869695-1-li.meng@amd.com> Precedence: bulk X-Mailing-List: linux-acpi@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: CO1PEPF000044F8:EE_|DS7PR12MB8250:EE_ X-MS-Office365-Filtering-Correlation-Id: dec0e504-d57d-44fe-70cc-08dc18cdeb1b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0bZ+9mItUCQsNnwz4qvbMAxIfbok0qoYXtBj7Y0za9vLm/GBNuehQDT7vo81xDRw442MhHPk8E2wHcphTRG6Cwm++vgFKPBHQi6ikhBF9DW18n5/A7ajvnIy4wqY89fNzOisqXuYbnJ2DfrqSziJZJqPlk12aJAIH2wGl5+WbqOQ7Odgzn1fOZq1N+VqKdKsMfqUvaEvqTyP3GZ+1drEaDdrX63ghmr9Uo6diNLorxI3/6WUK+1Cg1LuKRoNHkE8upZpLcSYSASQVg1TDf61IqUzmNnuB/q/eBwI1UkDFPxHTGSfSI/IFexyc7TdcxCf0s8dAgBpZYgU9jLtDIc8J4Cq6ANfw/c6GltVzGXuY6JXOmWz1UuOQeHLtAiapXXiLnrOtOsrjpxAM0Z4ugYg6lQS0Ce1RH7CLKVAFwspSri9GY9HRZ1v0BF8kA9Z4oZBZyYRaik+ZFgdHQ8XnaeHIKu3QTSOj877t7XMI61xOekS5e/meqmiVOEi+j3Wjn6W+MiUs93gBfRlQCb8v2gbxOZ4nUoVOeBN5kxkPvhzzLQ5WQMtenXOppiHoL3AHCUj83ouTMw4n8CAX/2ZljRT2s6EEdeprIhdj5IFb6Oaj5f0cSSDlcC/EUku2jICYFBGARPuN52PUYoFCzkQqBWHWCXX2f/ij8oZkbR2/8V5ASIuZZfJA0EiwLDAM5K9jGneVwjCQBxuvVkkgbCz5sKQn/NBrOAH78mJOWVZwrn1+jdHbr6TphcVqzXqN5NKpCv1rz8XJT79LntqvIVlmc1MUh0Zwf7dm3DbKTAZiw0M0HznKk5lpCXctAjv9T4J+J0x X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(39860400002)(136003)(376002)(346002)(396003)(230922051799003)(186009)(451199024)(64100799003)(82310400011)(1800799012)(46966006)(40470700004)(36840700001)(26005)(16526019)(478600001)(81166007)(1076003)(426003)(336012)(40480700001)(40460700003)(356005)(7696005)(2616005)(6666004)(316002)(70586007)(70206006)(54906003)(83380400001)(110136005)(6636002)(86362001)(5660300002)(41300700001)(4326008)(7416002)(8936002)(8676002)(82740400003)(47076005)(2906002)(36860700001)(36756003)(36900700001)(14943795004); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2024 09:06:27.0167 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dec0e504-d57d-44fe-70cc-08dc18cdeb1b 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: DS7PR12MB8250 amd-pstate driver support enable/disable preferred core. Default enabled on platforms supporting amd-pstate preferred core. Disable amd-pstate preferred core with "amd_prefcore=disable" added to the kernel command line. Signed-off-by: Meng Li Reviewed-by: Mario Limonciello Reviewed-by: Wyes Karny Reviewed-by: Huang Rui Reviewed-by: Perry Yuan Tested-by: Oleksandr Natalenko --- 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 e0891ac76ab3..88b29efc474f 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: ,