From patchwork Mon Sep 9 15:51:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 827643 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2041.outbound.protection.outlook.com [40.107.212.41]) (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 395FB4D8DA for ; Mon, 9 Sep 2024 15:52:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.212.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725897127; cv=fail; b=NnAM5LT3LK1fBccMZ22mHnqzQRF1ojcuHaCFjqoDwGuzqlk0tYU2w7Z40MKYNP7bTBe4Z09uFH/FVjuktQsFGNBsnxrDE8cDgLnjYjq3iRjEr5lFIHtwAlVLJPAQrq/jKowbZY5FoBZhfPzEgkUBH3OJEGny9rVLiqvRU99/1uc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725897127; c=relaxed/simple; bh=xd+JpyPoIQKSoEMte5nAtODIf4uvYoqkOexBjeN1Ync=; h=Message-ID:Date:To:Cc:From:Subject:Content-Type:MIME-Version; b=t11Wn0YBzmr1KgVF4Ne75Zt6NBYAcbopI/e6hH2KX7yP+eBjFel0Rdd6BKr6aZZoTBtv1HW7Cyreu6QwI1wIpS5BDCqeRqXc9/OHEBrD5zcERXOOpGalQRrWClMUi3UQ6bzdWb2rbefIjS20G1g8dou/7Bu3rvegDp6ChtOGy/I= 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=fOwCh9n7; arc=fail smtp.client-ip=40.107.212.41 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="fOwCh9n7" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=a8BSfD0eo9pfM95XY+8htw/OXCE9VjPQPZTezjfAifMmr98xIRu/NF6m4Wg5iIN4+0O/ZqeaX2GHDJ7nuAtCW7ziK2Bpgbft7QMvzzDLjim1MAuyuehb7FCElQuD9E+bPM9b5dyF1T4Ig2hlK1ofQ2YfmpKbpYqyeHwcq4D7Q28PZS/jmeNTkNL621bENcW4vEI0HCI2Yzd4oXUrpApnucYCucMpOtP9xuBYi056EO9UGcMh0C6rTUQs3u0ZcAq+hp8U/zxx1tENdDUnNJqJpWqG6q1/1MZrJ5TbkE0DPOqh/kullruXfEryhgEb1BBqDX/rJ3X1+BVFWetCRga4SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=sDpguGre7d/zdzxD+Xhi526+KreS5JJc1R/8ICCVaMo=; b=ZiIofzPfORkMqHVR/TJ1Ohm6WoVDWE6cieEot3mKBUo68TSeXXMPyKJZvWY8pdbh7NjjJaIf7dBz41vTO+6F7dCwKfq9oavDVtUW5fX+9MmR3h8J8CztH1pEmjyVgrf0bSypl0IKHf/7YDor2Kt9MVo3hEl6lXkCWplq0LOTXiZTn9n8IjqVvJyDOG3I1HgoJpwACTJHMSbK8dYdBZulI2ee9P8gPyPJQeSUQmN5SV3jIH6vUjrmj49bmIn35o75wVJ2ACrYnvE9D7BjiVToQlUvACdMBqwZVQH9tMDG4hZ6xh8R4HKMxOZUDy/qskWxQMH0lY5VIJV58SKI/lMZAQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sDpguGre7d/zdzxD+Xhi526+KreS5JJc1R/8ICCVaMo=; b=fOwCh9n72/jsSuRjh21GOWMHxRymtWHJ9kDoje123/3vOSCwoIRpivJhql5dxrSMarhaFnRGq7fhb6E5lRzNxf3XWA+tnVSELs9jeHqfKzQZewQiIi/B6bDUMO+3DGqc0u4or8AX6w6fuk2EG+Wz56ZG5XrZAJh6qaEeaOCerLc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MN0PR12MB6101.namprd12.prod.outlook.com (2603:10b6:208:3cb::10) by DS0PR12MB8574.namprd12.prod.outlook.com (2603:10b6:8:166::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.17; Mon, 9 Sep 2024 15:52:01 +0000 Received: from MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::37ee:a763:6d04:81ca]) by MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::37ee:a763:6d04:81ca%7]) with mapi id 15.20.7939.022; Mon, 9 Sep 2024 15:52:01 +0000 Message-ID: Date: Mon, 9 Sep 2024 10:51:57 -0500 User-Agent: Mozilla Thunderbird Content-Language: en-US To: "Rafael J. Wysocki" Cc: Linux PM From: Mario Limonciello Subject: Second round of amd-pstate 6.12 content X-ClientProxiedBy: BN8PR15CA0019.namprd15.prod.outlook.com (2603:10b6:408:c0::32) To MN0PR12MB6101.namprd12.prod.outlook.com (2603:10b6:208:3cb::10) Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN0PR12MB6101:EE_|DS0PR12MB8574:EE_ X-MS-Office365-Filtering-Correlation-Id: 965699ea-851c-44d4-5422-08dcd0e757e1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?3IWxgJKUDLZFIjoTPZBwc89DyrCtxU3?= =?utf-8?q?TtF1z4Uuhu7KLRG6m0sZS49TusT3uS2fSc+ySvuIv4AP3Md1wOpcRKUF+ySpcLpoQ?= =?utf-8?q?MGjywpJtUiF0eNB+BoyZUk/8FJBbUiE09swlQpCrWMdLJyjCHH34Vpxis55iiy8an?= =?utf-8?q?oJapqfmFcdJ/1LJiMsw3izFwKr9ywXXLaTzdMAD2rLahUgYXyMHAc7JYq1HxaJixS?= =?utf-8?q?2Qzy96uUMwjJh8i110mwEDakfjhWiGzSPfS5UyYrCAqS9m6yjrUFXDXEGSzWkAPez?= =?utf-8?q?1XCG8/w+g2be1aM30uMZko2rAULACNRg/CJXdpHkAxyH9dAxTrEI7gOK94fPccJrz?= =?utf-8?q?SMEtC9K6P5heoamKYDVrJ4kOfCIyZDPevcdGGCcM3dGHFPcg1hpUyBr3fwXMItAJu?= =?utf-8?q?WEz2H3Y6j+tgCHPOhDhXpbwZbTopSEYWWTzx20cwB0alrnPJArrEfJ7q3hDhHHQoj?= =?utf-8?q?QOJVxcMRg4+uCC039P8E50My7/eF6VCqV9EEepjp4UuGyRT5eOd2nwYqQIK4K6Y5m?= =?utf-8?q?iZ2XzVcRC82Xbl9r7ii7ALfXj+qGTMaAOuNMlOZTGO9wTw+2aWryUUPKeVazwstLm?= =?utf-8?q?1fVENgLmbMeMyvWdLoEqC5UdUw+96pEbL1I7k6MTHU6t/yeD68ks/S5dIsZ5+P3yk?= =?utf-8?q?PcmDCc8OXnXneYmWsylC5Yk4LI4A4rudHfkCujfRpm9gki4MqxtO/5pefWKNltW+0?= =?utf-8?q?+aetEjnIcvvIjzmjgKy6+bcsodqYuMBL2+e7saVDeit9invkpS+18BPQOMRRi1KhC?= =?utf-8?q?S9OPQPi4B6Eab2C5jY3l39ao/TucCNgYzN+A8HLUU1G/igNYzUvlDD8GuZ7tolqct?= =?utf-8?q?ObBU5sPQRwuytx2c4T6A0x1O4sllJ1WSoe7JiZ+AOoxZGTFayR5cII9bxIs4kCe9v?= =?utf-8?q?SMBHRQTLLwXXjadinrO6O5S2SVabp7lo7gyUXWf/6PeyeCChE8iqSRwPjsTSRflt+?= =?utf-8?q?DiA9e2n8qULzAN3Y2nX27UbdN2f9q2sDkJ2+g8Q3ge0J1tKgO+6SRfy3YsCaYnUSL?= =?utf-8?q?jaYQywG0WIIYkaL2K1dXSa2VbxQFofhm/e0FRfu22zcri6goa4eYnON0JziH8Gxsy?= =?utf-8?q?9lVRPQMf18MBmyHxv10iZ1W6HT8anbKJx5r/DLjVUMsIjzZ5h2yBjIC1lIDweX8qH?= =?utf-8?q?PvL1iKXPsMx6T+lIOwVTX/+ORvNSeb0OdnRmfXvIydk0eO5HHNaLyyLTmY+aEeYQe?= =?utf-8?q?I1fcmxQRehOYsT6exqVYV+yPoIeaFCfrN8JxVVtpbmNB0uBKBArvgr0KHr+nqSuh7?= =?utf-8?q?/We4NMYA6u+QlppqM31vmWoK12C7cPmROyw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN0PR12MB6101.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?92r155xewFiXTQyhxaCmrbm0bYbj?= =?utf-8?q?opvExLp8DtSJG68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UX7R6pssyLzzJZeBOOW+pjL02PZ2dA3oVtR+/2BagfFs39rQQTg1uL2lZNGH?= =?utf-8?q?0zfXDEu3tTqBtnsRJHEL17jQrcudcFKfUniA8l8WbBTmwxE1LKtvqpkcfvKZNluQs?= =?utf-8?q?M2+8IJHceAqQGpgfRqQVP5HcH3TgVv4Gfglx4lbqNPVEDh/Qe53hIlkhDPK6g9/q3?= =?utf-8?q?QWheI8HICROz6Ba7e9KjWQhJxRRoOez3djkRn9neIsXgYpPpRcbceQBwCDKaYKe/b?= =?utf-8?q?CsGaBObKP6/Wo4CgU+uhg/5EYvRjsI//JOxoIHe/zOcNwBCX/vvazQfJD7lKRP4qY?= =?utf-8?q?NwwUKeeFGV8jNmpR/yZlY/fKPdWgAdmSCuK1fxq94uzl8Z+BSJE3X7C4Md1s5hygh?= =?utf-8?q?Wskaey3Ru1WXiVNBomv+I2VMmEaZu0Jr4NJ+pyNwxEBoRwcmvefJkpr/Y89+pY0ea?= =?utf-8?q?Mx9Sm1zYQJuoef7I9l8nsxtxjVNYgEyuvl98JZ4Ly3HpMdKRrfr/6mfoG45qHm75h?= =?utf-8?q?7nj96Bkl5q7g0YKV718lCqnWFm1AuyWybvdeFpZS6t4ieIooj6ZsisUH3jDZWlygo?= =?utf-8?q?oSkD2AYYtLWuZgteTJBXBqakYwhldeVNFinGRKzJ3U13FvuquZMPZ+DnHXaYegDKv?= =?utf-8?q?p/R3mhli4vgK?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 965699ea-851c-44d4-5422-08dcd0e757e1 X-MS-Exchange-CrossTenant-AuthSource: MN0PR12MB6101.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2024 15:52:01.4239 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 98u4pvutxnPrEJAlngWk3qq68f7eLusuUjxKDh/8aLfthOOtPKsq5IcHrU89d/44IavBBfV56nw4Lnwr4MMoUA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB8574 Hi, The following changes since commit 8cc214312cf8a0c3702edd1aa52e507262adccb9: Merge branch 'pm-opp' into linux-next (2024-09-06 20:53:58 +0200) are available in the Git repository at: ssh://git@gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux.git tags/amd-pstate-v6.12-2024-09-09 for you to fetch changes up to e121c01c0422fc56033d0dfa1bf3f0366115d2d5: cpufreq/amd-pstate-ut: Add test case for mode switches (2024-09-09 10:26:26 -0500) ---------------------------------------------------------------- second round of amd-pstate changes for 6.12: * Move the calculation of the AMD boost numerator outside of amd-pstate, correcting acpi-cpufreq on systems with preferred cores * Harden preferred core detection to avoid potential false positives * Add extra unit test coverage for mode state machine ---------------------------------------------------------------- Mario Limonciello (13): x86/amd: Move amd_get_highest_perf() from amd.c to cppc.c ACPI: CPPC: Adjust return code for inline functions in !CONFIG_ACPI_CPPC_LIB x86/amd: Rename amd_get_highest_perf() to amd_get_boost_ratio_numerator() ACPI: CPPC: Drop check for non zero perf ratio ACPI: CPPC: Adjust debug messages in amd_set_max_freq_ratio() to warn x86/amd: Move amd_get_highest_perf() out of amd-pstate x86/amd: Detect preferred cores in amd_get_boost_ratio_numerator() cpufreq: amd-pstate: Merge amd_pstate_highest_perf_set() into amd_get_boost_ratio_numerator() cpufreq: amd-pstate: Optimize amd_pstate_update_limits() cpufreq: amd-pstate: Add documentation for `amd_pstate_hw_prefcore` amd-pstate: Add missing documentation for `amd_pstate_prefcore_ranking` cpufreq/amd-pstate: Export symbols for changing modes cpufreq/amd-pstate-ut: Add test case for mode switches Documentation/admin-guide/pm/amd-pstate.rst | 15 ++++++++++++++- arch/x86/include/asm/processor.h | 3 --- arch/x86/kernel/acpi/cppc.c | 172 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------- arch/x86/kernel/cpu/amd.c | 16 ---------------- drivers/cpufreq/acpi-cpufreq.c | 12 +++++++++--- drivers/cpufreq/amd-pstate-ut.c | 41 ++++++++++++++++++++++++++++++++++++++++- drivers/cpufreq/amd-pstate.c | 151 +++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------------------------------------------------- drivers/cpufreq/amd-pstate.h | 14 ++++++++++++++ include/acpi/cppc_acpi.h | 41 ++++++++++++++++++++++++++++------------- 9 files changed, 305 insertions(+), 160 deletions(-)