From patchwork Tue May 7 07:15:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yuan, Perry" X-Patchwork-Id: 795433 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2049.outbound.protection.outlook.com [40.107.223.49]) (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 685743D0BD; Tue, 7 May 2024 07:15:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.49 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715066154; cv=fail; b=l9kLH9Ap8HAosDNmSj9c48yef1Ov5iyfCcRGbGY+koRPj+fJinBoM3i7UTVKwQqFAA++7K56gZrhRvMu5/+QJJQwT8MjLWJbtvr9LXJ9EJ3nr83fRCbleDn55cik1/n/EsCQteUHbx4IwcZjwYddJqvduK5L107K0UfoWPwEeEc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715066154; c=relaxed/simple; bh=3ZQLT2Z7Oyqy92LgFRa6hafv79IOoBgty/6T5x9Mjk4=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=k12dqu41bEitG0Nr0Lm8Ba7t9wA8yKHd6ICrhxOC4nYZPvEKshklMJLgIq12LWhdM8Ies/iZ12jm8bBVgsJYOLu7i+1Q6x70b64MYL9A+6ePc2bhHxLP0PvjooFNxqfAyUsGwHDWqocnvnRqtZITJrG32nAbOTYF4yC9muAV/nQ= 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=Xnyg6ab4; arc=fail smtp.client-ip=40.107.223.49 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="Xnyg6ab4" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TKpX2t8V79do9O/4QHqoeI17X8PP3JeHwt4k5EXVwUGwCmQYRnEiNsSWT47SMi8WugBe3U9LutNO16ElzDtuzafAe3McI9a8U8Zn/7nkb/VkvH76Z/XFz2b8Q+048GzIA0YlPb+gyCIXaEvBYKgSwDpXiqWdRWq7hvwGTvIlPO4WIeIGPepSI+SM4mOj+6sc72S+upejHz8gzkuWfwEgu04IkWS0Pu9evsebFQIEhPPB1eVSAJsCNEaf4/902WtyCuQL87/+/y4+hgZZXCY57jJL6FUR19d6WR7ITIuwWDMsQUMy/GJlAW3omK4PBwcj/bR664PfGv4NEaeHKp/liQ== 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=WFuv1BjKcIVaBxVhSyVF7qLgPUtuSeZBx4xpioTUz7A=; b=SXNcL2z5Lf4524ANawHDy9OSRnc/0bgp/bRCbhX2Z0TH8+MC7xb1YaPLNqj9jgtpThu2jv7WcGDfdbGMLEYAU2ZkdPnDcprbC1Y+KI60qWyXyeQOwDRDlGN1cIxIbH/lPmJfh57lF8m0Q8DCftbUYApE+U7qU+MGW8XgApz7FNG9ANL5DBtBl5trCQXFdTBxgpCGO/dXDczl80vOYtfcllxLdJ+A2YHNE/EVBOqWDl6cnIYoH8PIf2e2nqQHfMNYt3XopTWteOwGUtYAQKa6mZ8uw8sk3h3FbAwYwupSUz80fQ8KiSaBiklaia3S2/taQpI4mw/G9NSH/BHBlfAqDg== 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=WFuv1BjKcIVaBxVhSyVF7qLgPUtuSeZBx4xpioTUz7A=; b=Xnyg6ab4dVTrT1LKj+39IWLKX7i4u7UicGv3e9Y/cqjfCp4b4P9o3R7YKsCEouvsuviWX+EYRewryj1NUZNomdkNqOhYqmiSRou4Zgyw8Jc6RFHfgobZ/+o+zI5TXznddmLxCPpw7GNW/lQbUjjDzUYWgelENic4OndliJTn/Do= Received: from DS7PR06CA0039.namprd06.prod.outlook.com (2603:10b6:8:54::7) by DS0PR12MB9058.namprd12.prod.outlook.com (2603:10b6:8:c6::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.42; Tue, 7 May 2024 07:15:49 +0000 Received: from DS1PEPF00017098.namprd05.prod.outlook.com (2603:10b6:8:54:cafe::19) by DS7PR06CA0039.outlook.office365.com (2603:10b6:8:54::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.41 via Frontend Transport; Tue, 7 May 2024 07:15:49 +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 DS1PEPF00017098.mail.protection.outlook.com (10.167.18.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7544.18 via Frontend Transport; Tue, 7 May 2024 07:15:49 +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, 7 May 2024 02:15:45 -0500 From: Perry Yuan To: , , , , , CC: , , , , , Subject: [PATCH 00/11] AMD Pstate Driver Fixes and Improvements Date: Tue, 7 May 2024 15:15:16 +0800 Message-ID: X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF00017098:EE_|DS0PR12MB9058:EE_ X-MS-Office365-Filtering-Correlation-Id: ca2aa99f-3b44-434f-2abe-08dc6e6585c5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|36860700004|376005|82310400017|1800799015; X-Microsoft-Antispam-Message-Info: eeudud+L/ug8V3ITEl0QPgUZ0xRXkfIpKCPljca0S/8OCXKOqJJAc8wwChXxfaflAYkwM5Fi8r/IzKgjcBsy7Khwhs29Oh63/NBcHIsE8FhT91V60DHSq2hM/zfPQ+qHdwjOkvN1iJIWnqSwBf8bLROh5ajGmuNIhYvlgmneHVHWrctD7oL1paH7SqCv1eaO+ZV5Pge/We8FISoNGC/HW0NXOc7ShpqQMpsiFw1uqQ2GH6AYLOPTUu5QozHP3bhjQMV37+o8PRrZIEaH6RYKi1T5HLYnzRc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ZWvYysjBzh0h4RYjNa9UMMt7WvdnvDW7ouaqVwSV 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)(376005)(82310400017)(1800799015); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2024 07:15:49.3873 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ca2aa99f-3b44-434f-2abe-08dc6e6585c5 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: DS1PEPF00017098.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB9058 Hello everyone, This patchset addresses critical issues and enhances performance settings for CPUs with heterogeneous core types in the AMD pstate driver. Specifically, it resolves problems related to calculating the highest performance and frequency on the latest CPUs with preferred cores. Additionally, the patchset includes documentation improvements in amd-pstate.rst, offering a comprehensive guide covering topics such as recommended reboot requirements during driver switching, debugging procedures for driver loading failures. Your feedback and suggestions for improvement are highly appreciated. Please review the patches and provide your valuable input. Thank you. Best regards, Perry. Perry Yuan (11): cpufreq: amd-pstate: optimiza the initial frequency values verification cpufreq: amd-pstate: show CPPC debug message if CPPC is not supported cpufreq: amd-pstate: add debug message while CPPC is supported and disabled by SBIOS Documentation: PM: amd-pstate: introducing recommended reboot requirement during driver switch Documentation: PM: amd-pstate: add debugging section for driver loading failure Documentation: PM: amd-pstate: add guide mode to the Operation mode cpufreq: amd-pstate: switch boot_cpu_has() to cpu_feature_enabled() x86/cpufeatures: Add feature bits for AMD heterogeneous processor cpufreq: amd-pstate: implement heterogeneous core topology for highest performance initialization cpufreq: amd-pstate: fix the highest frequency issue which limit performance cpufreq: amd-pstate: automatically load pstate driver by default Documentation/admin-guide/pm/amd-pstate.rst | 19 +- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/processor.h | 2 + arch/x86/kernel/cpu/amd.c | 19 ++ arch/x86/kernel/cpu/scattered.c | 1 + drivers/cpufreq/amd-pstate.c | 196 ++++++++++++++------ include/linux/amd-pstate.h | 8 + 7 files changed, 185 insertions(+), 61 deletions(-) Acked-by: Mario Limonciello