From patchwork Wed Sep 11 16:01:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 827608 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2084.outbound.protection.outlook.com [40.107.220.84]) (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 A58F04084C for ; Wed, 11 Sep 2024 16:01:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.84 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726070492; cv=fail; b=GdtQK5RYE6eJW+goQvqWO9qhIypR0+AMyso+hk+FnDJW7LljLAQB/E/HrJfI23Eh0FatSTyC9zUprkAyPW9u4nlKQJoCvuso6WI/PcsS737+B34GdxDudRxGyCazSNqPi8lEb9VMdkuI74WVZVrZM280XJ4eFy68ezNyroi/tMM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726070492; c=relaxed/simple; bh=GDKTQFr8CJPc11NDuQm4IYc+Y7u7wb0yR4hHtNv0xjU=; h=Message-ID:Date:To:Cc:From:Subject:Content-Type:MIME-Version; b=VPZqUgUeiqTYRalnwG5aFIvj+zRpxgO7mf5yWeeB9nOcAF/S+x89znzbYw2TKMQo2unntuxEMnLqJ4V3vAHKzDIi8Kg30tcrtY92slJ6G8zjc/z1S3Hq4B4PpCHllAkx0OgG2r4Nd0HgdOgVoUAHDj/pgwQcisvHgsZK20OMVYo= 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=kDbUhoHn; arc=fail smtp.client-ip=40.107.220.84 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="kDbUhoHn" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gWE+rKpreGvB6aad5oIWhvas/HzbwA6H5ZW5Ur740iW91Z1f+1DvsZID1xwUGBOtfiBgsNo5Awe7jt5PcYFkAhMIbCsHamq5MeBr9//rLSlk79rcvqnRpr3M8HMe8s+xGEAM4/azi5Lckh6KTU92P0BsjGqrTA1wNNcMAhJsAXjtDcQrMyUVQUNE/LuG9j6eHHdopjFjyS3b2XhOilWmdRbgbkTtO49uZxl5J9tAom5SplnBsDCKLIIKRK7ccoSToxYKPGtnfS0qt/KbZu+9k9jj/fS8GU1Do77oHOen2Ua/x+l8hOzBF83vwrY1dc2RBB33itfKOVJ7SbjsyXYBbQ== 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=U7ga0kegOvm5pZ/4n1djdEh1bdVFtzScf7/1fBZr2Zc=; b=i17oOw3EEHpXq+vskGLaz7ioP4GukIJRAB6DSN8p4nG3mcsOQvUCqwyR67inXkwc8LJZlVqceAOqE1KaEdK/9Yw6EHjy2SGOi4caHJdbr1o3q/YoDzccMSSBdjjKzE59dwtfNgXURXcS5f8HHcMtBMvsxWERIhN+pQcsjU+FlIFMeX4+KHVU9GmoNQyRLX9Pgz5gyApOorUhs/AGOK7Q5ur0N17d0SAJvldFzkVO6Cfel9enrQaM0xyziAGBzk+OLhqUOdPgQKSHBWrtzk2Yphv3pUqQZmrL7kZv7EZPZHSntS2r6AtHVTc/0rcWoY51TsiQrFek8UK7HCiRkijrAg== 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=U7ga0kegOvm5pZ/4n1djdEh1bdVFtzScf7/1fBZr2Zc=; b=kDbUhoHnabmXPU6OPGudkDsirm/YGEXjUBEH7fo/GWZkS6dK0B/uTt+2t2n9ToBqPAo7q9PLfcOJUD7uu5VdUh1BV5jDYGPqGXaSuPFq1XIJjntr0FmucC5C3nzl10tD5PPlM8zyfIGqNnI5f5VrVOK6n3VvJ4m3G+b2JGKv5jo= 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 SJ0PR12MB6805.namprd12.prod.outlook.com (2603:10b6:a03:44f::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.25; Wed, 11 Sep 2024 16:01:27 +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; Wed, 11 Sep 2024 16:01:27 +0000 Message-ID: <0f490e10-bab5-44d2-aa9f-efd80d306083@amd.com> Date: Wed, 11 Sep 2024 11:01:23 -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 changess for 6.12 (second try) X-ClientProxiedBy: SA0PR11CA0167.namprd11.prod.outlook.com (2603:10b6:806:1bb::22) 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_|SJ0PR12MB6805:EE_ X-MS-Office365-Filtering-Correlation-Id: 5792b1b9-20c8-4ef9-d935-08dcd27afe39 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?V6CXTtPwC3rn5kRUHIZi69HJDxyNk/f?= =?utf-8?q?C23x3f6J3GQHodTjKzZ4GSWkLaRSYMyDI06pRXjOCPOuA+owQHXrfT+YKFPJ4LF9B?= =?utf-8?q?zDOmBx0bW5p06iEaml/SVsJvUP390MgSnG2S0q4NNzZd/fzP2WmBrdNKPb6g8ZmYS?= =?utf-8?q?54OXfHQRxrErsjeIJYo5i5A0Ldc3B16DmGkC9MO08/iQ9x5YVVl2F/VXSENNvsOKb?= =?utf-8?q?epBhM+JCNoeh8nvNydbO1acM8/7qkgrgA2vktDnyYHS/+zXNbNAUT0OorHst5bM5s?= =?utf-8?q?RNdf9hJXeICGcrot4DmzBGo9fKCHV9mU1uTyzPQpbKWwnd00Y95eujdL0DBe7vyTI?= =?utf-8?q?o6ND2+5C5OEYrnDGHznN8/OocFzBiBYh+HxiBbs63sK6V19fhrQmQqfII7qeA38qP?= =?utf-8?q?KsNS5pndaLaXrMq+/5tNOtk2st6q5wGPzHE5Ga4sAI2K7SgqCBT29/K4FoaTYuEOl?= =?utf-8?q?1c2c3Dj0ZDqzMkueCq24OtuQXQ5h9LhYZ2alnlwKBebDXyvwwAZUvkMi4QAdk3CVn?= =?utf-8?q?RhPkhZCbn6H7XDS0rVJhEJl+Ka0/Iw22tXj/nCB6xJeZFzIt2lh8m6HCgJkOQ+aPY?= =?utf-8?q?nlscq/Qv6A5QWnkH2BqP14Ej7XFMpAPnudj0/iNbymsrxk4o2XhhZYD4ngmHiUo7u?= =?utf-8?q?1MBW5n95tvPEqSwua+dTyWzU/YXVk/R3aPu2Y890sKxmhoCd+yGUmsPjak7jlS/wv?= =?utf-8?q?tXqdXuXlVZcQ/ouOzvUF/BfyPa6HN4q5x03w+RL3MxGLeQR2P9fhaUSWRSZ8tK1Be?= =?utf-8?q?s4y9/COpyCYwZVnJifG6r3mPm4xbKauE8B8crO+yIBOGxamO/l8V0w1luov2TjN6B?= =?utf-8?q?nPZfv4CwPO+Xkt9Hpts3YzQjpUq33dr2vQ3liFNe5VDxpccj+Ql51TsywtnvXEzcm?= =?utf-8?q?eQJgKsQ63jweFN7b5waqnRujxnC1vWPfLghuB+sRBL6gooHL5ERcVOwjZ6ZGrce27?= =?utf-8?q?4c0ScCk7DNLnw3wgcDOINeIlGQeoCTs6v1x3UozCK7jKhnrwNufKtyzPVLwjSCaEH?= =?utf-8?q?AMsgJ833lbV2od9Y94gMV1GXp3pZ7xu3+nSxE7CwjIou65qAKtpXcI8ElneV6juFb?= =?utf-8?q?CSJ3aw2Xjhk4Hn/L70u1HcugILWY2ZKyCmqzeSEaXE/Fd7EvRzLTBH/trd4xyw2ub?= =?utf-8?q?1UkMyMO4kJsAJqQM66xQx7/EQt+fJ/TDPXyvNTxlkDF/TDeZfrrvKAslf7VLjewTA?= =?utf-8?q?KzYrLvM1OKT+frr/v4YPivl1xj+1nHBl5U9IbGMUf/sATee7BLD5OD0J8yooFg2kO?= =?utf-8?q?WBrZPbMiEtLqujMS2QKjM+fWwLhUOaTPBdw=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)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-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zJksAVFSShj+OYsc7i+g0rAQBhuE+iR?= =?utf-8?q?RFeQuTFQ7O5pS9Ke6XzCTNbUUcApoy+AtcbbfwHP9NfP8tX5EOrhEKkR5F3NCwIjk?= =?utf-8?q?E2LuK6HZkj0uplBp99g3VF2MCtoIOhA4vJo8YldncWaS5EK01HM4wCN74hmLmFg6f?= =?utf-8?q?1G0a0JTh0q/iJZhiko/TF3LDKFYjTvK0sPWnjmd9MdMPINNI7SxfA2H2cWFch5k2q?= =?utf-8?q?q/dClSOF7ebEvLc3dTJhB/VvGKMsRVNcpxyS1k3ECT6YGTVsAKYXbv6vjvjdVKNej?= =?utf-8?q?XcreyHZZC1AloQSNEr/X1mamCjWGadV1X06JncfvT69ZcBg5hnchYRwIvbQVHEn2O?= =?utf-8?q?jUw6Ykx7zSOJHXoOmz/XihvrPbKcn6pRzlQp8NsTvjGdb4Wfi4BQuF/RtYbDtUpJ6?= =?utf-8?q?4IB+bmrzNGh2Qmno0BztPUq3cZC1c2JFe3q7c2k1stBxhDBiXDYdrNWcJADI8a2mb?= =?utf-8?q?9pIk3FxscWFvKsv1729hY34xhyteRmnTLHtPAx/UH7ynGOIUBeukv+s6/JvPIxGxF?= =?utf-8?q?BZFmXwm9spmGZIDyn75LJV5f21DYJOjMrJW/3deagU21XpZCIrXA1cKJrFZkRIMif?= =?utf-8?q?hmfW2fCU7P30tKKBUH0DpixSpoKaAHsNLWdfo2Ez9c/XO8gQ1ksRlp6M6+NCKM7NI?= =?utf-8?q?WmK7AnBlF20P?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5792b1b9-20c8-4ef9-d935-08dcd27afe39 X-MS-Exchange-CrossTenant-AuthSource: MN0PR12MB6101.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2024 16:01:27.4014 (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: X34BnHzpO3uwnRe2AiVTDMP5YICDGJAdJvhS9stP/vQGz6Mu4GZq7Ztkyt1zjevFymalAHaQdkUZqQ1WxA8xFw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6805 The following changes since commit 6b612d1bac67b0f483fde7779a45f6310274d4eb: cpufreq: ti-cpufreq: Use socinfo to get revision in AM62 family (2024-09-04 20:43:59 +0530) 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-11 for you to fetch changes up to 93497752dfed196b41d2804503e80b9a04318adb: cpufreq/amd-pstate-ut: Fix an "Uninitialized variables" issue (2024-09-11 10:53:03 -0500) ---------------------------------------------------------------- second round of amd-pstate changes for 6.12 (second try): * 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 Qianqiang Liu (1): cpufreq/amd-pstate-ut: Fix an "Uninitialized variables" issue 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(-)