From patchwork Mon Oct 21 17:55:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 13844492 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2089.outbound.protection.outlook.com [40.107.94.89]) (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 729A81F4FDA; Mon, 21 Oct 2024 17:56:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.89 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729533412; cv=fail; b=Y3IdLci50Bv0jAXUmMPmigtTqLwKOXpkTZL214R95y9C7jsxfhI+ZWfEurllFgErfZwEkxJN0ejSYu83kCgf63aNyG4KHqbrLEe3sgTietbEGipkoZhREkAK9b8FKuSiXRdAu/6XSZ1Xrmyp6Xb026W7S9FV9EKfCV5YBuwpezM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729533412; c=relaxed/simple; bh=r3PEmNLKPEql0NWR7ArVrrPHRhYpZwQnGkTrzTrXSwM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=QCcp/S/aQqYDQq02ctbP0aYGpASpCv6Qje774KuQBzOMK5DWQwuSmu9pgty798Bswsde+YvDxcG+Casx9FoXP0Xb7IpzNHqJjDrhuhJVw7gfyg4HJGsB8PIPzhrW4L6o8BW21Mfz4fS1YETw+sxUQWpiYSqrnnf/FbvqoFadOao= 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=NwKBNAz0; arc=fail smtp.client-ip=40.107.94.89 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="NwKBNAz0" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xfw1CFgmu6e9AQsCj0K16D20TP6VYFm0cULT2Bd1GLqvsrtQ/GJM6EwkUUDRaKSTzlrExXNTH+tEJpyvWpk57AxDbS2UJ0Dnxq2NCLbtSDjyRgg101jSI56uIC+HQbIFddD5pIoGzNvCaF2fLMb8I3uOnbhrLBfhGezf59l/90I5ts4q/m0nfT5l8AjoZZPRgDtPLmF5rxoGePnd43e6/WMOuDyyA1bYESK+vUQEPsAvCJjtqnr8gdKMEb1ptOuIYnQztO1QoY6SeUQDjhZcrya+yI6K+BCj9RsSM5ztcKSn32vASCqRiCGbnOpWBc+e7MLJNRewxzn4dq49IKl90w== 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=myB7c7oo5B4U+KMcQwNALFB0ZB7w8rT0m5nRMD2atQw=; b=xCF9nNaBs3DcY8lbKninKPJEz6kG3dxYg+jUdHxMWqBRy+XYWplM4Rjg5bI7qbXKWlYQcwI+IfjI/4XX4ESJmA2zrul+jkEyhXxhC6v6qOpFu6Z1F1hSxtlNiWViqwkv7ofMtjeAEyA01GTJZWureh2PLAa/ZGN+MbM0TuZ/Ej/uG2UxSkDRD9h+vxBXT24YkVB/4+Ivsl7SghsPuRsKTjgCk1csyfIhiOm3WDi35Jw6ozhvlLojM4eJ8HGv4n0psRj0HSF20axEfeP4ISEivDBix42xnK+8otTqh0ILpzdU7ejAXfujKg6PfIOjda2Ty3sL9yM5foSDNrnmmZ2F0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=alien8.de 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=myB7c7oo5B4U+KMcQwNALFB0ZB7w8rT0m5nRMD2atQw=; b=NwKBNAz0WlhPVHZuDVI4k6CCV7SZenKAXzUNmB18N8B+rwjlIweCWHI+gZeUfgR7LXqiduhNJPjVBPCddDuFVrh++yjuYLWeBUOh0ocCimc2/inP4Kafi46qA7WvfER083LlQXMyUC27aybJQnQoqK8jPfhZs54zigh/42qR3qU= Received: from MW4PR04CA0388.namprd04.prod.outlook.com (2603:10b6:303:81::33) by IA1PR12MB6257.namprd12.prod.outlook.com (2603:10b6:208:3e7::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.29; Mon, 21 Oct 2024 17:56:43 +0000 Received: from BN2PEPF000044A4.namprd02.prod.outlook.com (2603:10b6:303:81:cafe::e1) by MW4PR04CA0388.outlook.office365.com (2603:10b6:303:81::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28 via Frontend Transport; Mon, 21 Oct 2024 17:56:42 +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 BN2PEPF000044A4.mail.protection.outlook.com (10.167.243.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8093.14 via Frontend Transport; Mon, 21 Oct 2024 17:56:42 +0000 Received: from AUS-P9-MLIMONCI.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.39; Mon, 21 Oct 2024 12:56:41 -0500 From: Mario Limonciello To: Borislav Petkov CC: Thomas Gleixner , Ingo Molnar , "Dave Hansen" , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H . Peter Anvin" , "Rafael J . Wysocki" , "Gautham R . Shenoy" , Mario Limonciello , Perry Yuan , Brijesh Singh , Peter Zijlstra , Li RongQing , "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "open list:ACPI" , "open list:AMD PSTATE DRIVER" Subject: [PATCH 1/4] x86/cpufeatures: Rename X86_FEATURE_FAST_CPPC to have AMD prefix Date: Mon, 21 Oct 2024 12:55:06 -0500 Message-ID: <20241021175509.2079-2-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241021175509.2079-1-mario.limonciello@amd.com> References: <20241021175509.2079-1-mario.limonciello@amd.com> Precedence: bulk X-Mailing-List: linux-acpi@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: BN2PEPF000044A4:EE_|IA1PR12MB6257:EE_ X-MS-Office365-Filtering-Correlation-Id: dad8b7e6-163c-4f54-1a08-08dcf1f9b8b1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 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/hiGUjEyJUpJ4N8L/Pa4HHzrDGgyUf1sTf1OrIsWwhXfeu8O+fAMbypzGo/W7VszIxGan/cRQC7aIDazV8PSBW9yYaRWxI7Uq6Ef58+BNsQGwZfteX6e8y8FJTB1TG/7aSe3W+IM13fCGqXLz7+y1X2UwI8yWrGX5bzogSKTeL9y14mEHUWOXUE1dBOadtJboa8nBa513gP4RHONIluLzc2gNRqk19sZ1ZmeiQaLGNesEfR3KunIrAWzCn690prI5wrvtS+fegwaxbho8PTVE7m5uLWcmNlE9aYp40oAoQLGkM9HNXAL2pbJ3h/hbNwi6d1W9479wfatKbWFC6b5zBZ+a1Ts+3DX3oantPrGR+CUhC2F2Vqo1xLLshQvOQwKxPfoDkjA4i3U1dvqQnR9tcc68x/WGcHK4euE3hXnocLx20wTr5A== 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:(13230040)(82310400026)(1800799024)(36860700013)(7416014)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 17:56:42.6907 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dad8b7e6-163c-4f54-1a08-08dcf1f9b8b1 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: BN2PEPF000044A4.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6257 This feature is an AMD unique feature of some processors, so put AMD into the name. Signed-off-by: Mario Limonciello --- arch/x86/include/asm/cpufeatures.h | 2 +- arch/x86/kernel/cpu/scattered.c | 2 +- drivers/cpufreq/amd-pstate.c | 2 +- tools/arch/x86/include/asm/cpufeatures.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index cea1ed82aeb48..424bb7ae8914a 100644 --- a/arch/x86/include/asm/cpufeatures.h +++ b/arch/x86/include/asm/cpufeatures.h @@ -472,7 +472,7 @@ #define X86_FEATURE_BHI_CTRL (21*32+ 2) /* BHI_DIS_S HW control available */ #define X86_FEATURE_CLEAR_BHB_HW (21*32+ 3) /* BHI_DIS_S HW control enabled */ #define X86_FEATURE_CLEAR_BHB_LOOP_ON_VMEXIT (21*32+ 4) /* Clear branch history at vmexit using SW loop */ -#define X86_FEATURE_FAST_CPPC (21*32 + 5) /* AMD Fast CPPC */ +#define X86_FEATURE_AMD_FAST_CPPC (21*32 + 5) /* Fast CPPC */ #define X86_FEATURE_HETERO_CORE_TOPOLOGY (21*32 + 6) /* Heterogeneous Core Topology */ /* diff --git a/arch/x86/kernel/cpu/scattered.c b/arch/x86/kernel/cpu/scattered.c index 3bba55323163b..d7f2c19abce33 100644 --- a/arch/x86/kernel/cpu/scattered.c +++ b/arch/x86/kernel/cpu/scattered.c @@ -45,7 +45,7 @@ static const struct cpuid_bit cpuid_bits[] = { { X86_FEATURE_HW_PSTATE, CPUID_EDX, 7, 0x80000007, 0 }, { X86_FEATURE_CPB, CPUID_EDX, 9, 0x80000007, 0 }, { X86_FEATURE_PROC_FEEDBACK, CPUID_EDX, 11, 0x80000007, 0 }, - { X86_FEATURE_FAST_CPPC, CPUID_EDX, 15, 0x80000007, 0 }, + { X86_FEATURE_AMD_FAST_CPPC, CPUID_EDX, 15, 0x80000007, 0 }, { X86_FEATURE_MBA, CPUID_EBX, 6, 0x80000008, 0 }, { X86_FEATURE_SMBA, CPUID_EBX, 2, 0x80000020, 0 }, { X86_FEATURE_BMEC, CPUID_EBX, 3, 0x80000020, 0 }, diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index 3c14962adeb22..2670bdcad6eda 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -844,7 +844,7 @@ static u32 amd_pstate_get_transition_delay_us(unsigned int cpu) transition_delay_ns = cppc_get_transition_latency(cpu); if (transition_delay_ns == CPUFREQ_ETERNAL) { - if (cpu_feature_enabled(X86_FEATURE_FAST_CPPC)) + if (cpu_feature_enabled(X86_FEATURE_AMD_FAST_CPPC)) return AMD_PSTATE_FAST_CPPC_TRANSITION_DELAY; else return AMD_PSTATE_TRANSITION_DELAY; diff --git a/tools/arch/x86/include/asm/cpufeatures.h b/tools/arch/x86/include/asm/cpufeatures.h index dd4682857c120..23698d0f4bb47 100644 --- a/tools/arch/x86/include/asm/cpufeatures.h +++ b/tools/arch/x86/include/asm/cpufeatures.h @@ -472,7 +472,7 @@ #define X86_FEATURE_BHI_CTRL (21*32+ 2) /* BHI_DIS_S HW control available */ #define X86_FEATURE_CLEAR_BHB_HW (21*32+ 3) /* BHI_DIS_S HW control enabled */ #define X86_FEATURE_CLEAR_BHB_LOOP_ON_VMEXIT (21*32+ 4) /* Clear branch history at vmexit using SW loop */ -#define X86_FEATURE_FAST_CPPC (21*32 + 5) /* AMD Fast CPPC */ +#define X86_FEATURE_AMD_FAST_CPPC (21*32 + 5) /* AMD Fast CPPC */ /* * BUG word(s) From patchwork Mon Oct 21 17:55:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 13844491 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2052.outbound.protection.outlook.com [40.107.94.52]) (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 5F1BC1F8936; Mon, 21 Oct 2024 17:56:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.52 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729533412; cv=fail; b=PGcW9R8aknhjOCURHCEWFpqlFFAmi0bt3AsAw0IAxAEFceE82eKEXyh6dJ+yfEhGbbnmjdKdnWzDRS6zUB4AXs3RSPUlp/MXJVpd9CXdRiX9PIG4VTRaeyux0VoXqDRXU5w5d+zM732hRgKDMmAjLdCmP3chz8vmHn1It4Q7k+0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729533412; c=relaxed/simple; bh=nDGIV0v7K/0AkiJ9BrBxmC21oPccnZwCWYK3DSuqpQE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=JjE85UPEmVVlqTCUAlL1HI/0Olg5FE8JyZvbO9qsR66MdVMD7OeZlNR8Iuhd0n5rMdc2j2N9h+KmOyivLwWsZIPPkk9mGvFdDyH6oJebQMiCLWovJPxgy1m8NiVW4damVPzcEfLgMWLB6uHEj20tMi99f0Rj5ATMlTr4ij7PXfA= 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=dcfCBvFn; arc=fail smtp.client-ip=40.107.94.52 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="dcfCBvFn" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cOLD8kbtv/QmUHrr8212pHijS4eGxdFDUc9753+saQCAIVagFDLphr4lZhCsM6MrlGzeTmJZaA+EGJevGGZNezwRwv1OJQ9pN9N7dNc7UPO7/tBeli6ujR3byiRob38n1l0S3CtHI+7IItyP2u6Z5//h9OV4Ljq+JTOX25j3KfmwMlu8dHTk5AvKuCrPxFVN5V5aKye+spxGCrHA89R88HyRfe5B2CDUWJLxYWioTLi+rmws9xuma+CiNJ22B5UeDRQtqoUK2h31ARqePaCA6Fmh8VuFDK19a55/NVibz0SZUFwhyZlDsyxqC9oBne+fEjEc2vpMUFqwUtT/nv4iRQ== 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=AYLoUgLmRnlydaqi6hoIgYaqMLuAe+kuc9J3jYNTx6U=; b=lVrid1xT0xWmLwtVufMQ4MfAF8jEbR8taEd1gldZcOmVMc/DI+sdOIMK79A4yNwZzAImIInU4FsOvQPqHZzvx1zUqu3oW9F8qUO7/9YwxyU9uZGQ9i5n1v9Zac4SDaNksR55ir6ILwyoOBzWYy4SmxiUvQ/ygvblP2soYHH2W4VhesSyhKQH+MjJelw9xACmsum8sabAXxI8kxSacKZ50q8a4Zy2+rs1gP2hk5fIrP5C5YcUJVC5NhO/GcKLZrn7CsFih5kMdSQOnH/oYnBOK3cH767efOpqkr3ndx8Ry1F03O8z/eLz9TXzE0vkbopjlqMzbLsl59P7ICuLtJpXsg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=alien8.de 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=AYLoUgLmRnlydaqi6hoIgYaqMLuAe+kuc9J3jYNTx6U=; b=dcfCBvFnkj6zb5ajIETyzMbaDvNVgKp0ijvG3q+2cw3z+0yFzJGHQUznPMSOAHp/T/e+2IJ2mcQd8bgoYiVddbxF4t3Cjw8Iz0RYdL9p+58dxMO2CbLIj3U/2LEJ6AyLQxFV0iPa2TmRKUkJ2OLbc0YNDkKYdbfE794JsXam0gM= Received: from MW4PR04CA0370.namprd04.prod.outlook.com (2603:10b6:303:81::15) by PH0PR12MB7908.namprd12.prod.outlook.com (2603:10b6:510:28e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 21 Oct 2024 17:56:45 +0000 Received: from BN2PEPF000044A4.namprd02.prod.outlook.com (2603:10b6:303:81:cafe::94) by MW4PR04CA0370.outlook.office365.com (2603:10b6:303:81::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28 via Frontend Transport; Mon, 21 Oct 2024 17:56:44 +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 BN2PEPF000044A4.mail.protection.outlook.com (10.167.243.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8093.14 via Frontend Transport; Mon, 21 Oct 2024 17:56:44 +0000 Received: from AUS-P9-MLIMONCI.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.39; Mon, 21 Oct 2024 12:56:42 -0500 From: Mario Limonciello To: Borislav Petkov CC: Thomas Gleixner , Ingo Molnar , "Dave Hansen" , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H . Peter Anvin" , "Rafael J . Wysocki" , "Gautham R . Shenoy" , Mario Limonciello , Perry Yuan , Brijesh Singh , Peter Zijlstra , Li RongQing , "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "open list:ACPI" , "open list:AMD PSTATE DRIVER" Subject: [PATCH 2/4] x86/cpufeatures: Rename X86_FEATURE_HETERO_CORE_TOPOLOGY to X86_FEATURE_AMD_HETEROGENEOUS_CORES Date: Mon, 21 Oct 2024 12:55:07 -0500 Message-ID: <20241021175509.2079-3-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241021175509.2079-1-mario.limonciello@amd.com> References: <20241021175509.2079-1-mario.limonciello@amd.com> Precedence: bulk X-Mailing-List: linux-acpi@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: BN2PEPF000044A4:EE_|PH0PR12MB7908:EE_ X-MS-Office365-Filtering-Correlation-Id: 1e570c69-355d-4e0b-e875-08dcf1f9b9a1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|1800799024|36860700013|7416014|376014; X-Microsoft-Antispam-Message-Info: sMFwpu5QArpROinCYJ5MA0NbahYVdrCAME6JMjVCuCB+ZE7WffFG+X5IUUtV+K11w22qM8t07AKOVk6mVYIyCsgE52ZKC/ao4zicGfGbdapZbO0qI+0XCVLBVxkuamADFCxSzRFdnpN0XAnO/sl91zQ2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B/XlAzTggRTLyy3ZNpavtTVpEB4tfi7e3lSvzDFDvvuyTcG7r7o2CQKd00CjAZ5pSkC6pbNAVBwsliL3YTtJb2ia6FcAorEAhdE/nray1t6e/xB9N46xShmutg4jM5GyaCVJ+u1f1MlKs9ruC0m0wI/np7s/i98uIXup1XF6W9IifpT7QBZ8guBOAIS1Ww+w== 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:(13230040)(82310400026)(1800799024)(36860700013)(7416014)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 17:56:44.2220 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1e570c69-355d-4e0b-e875-08dcf1f9b9a1 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: BN2PEPF000044A4.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7908 X86_FEATURE_AMD_HETEROGENEOUS_CORES makes it clear this is an AMD feature and matches the APM value of HeterogeneousCores Suggested-by: Borislav Petkov Signed-off-by: Mario Limonciello --- arch/x86/include/asm/cpufeatures.h | 2 +- arch/x86/kernel/cpu/amd.c | 2 +- arch/x86/kernel/cpu/scattered.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index 424bb7ae8914a..7f6c9fc465293 100644 --- a/arch/x86/include/asm/cpufeatures.h +++ b/arch/x86/include/asm/cpufeatures.h @@ -473,7 +473,7 @@ #define X86_FEATURE_CLEAR_BHB_HW (21*32+ 3) /* BHI_DIS_S HW control enabled */ #define X86_FEATURE_CLEAR_BHB_LOOP_ON_VMEXIT (21*32+ 4) /* Clear branch history at vmexit using SW loop */ #define X86_FEATURE_AMD_FAST_CPPC (21*32 + 5) /* Fast CPPC */ -#define X86_FEATURE_HETERO_CORE_TOPOLOGY (21*32 + 6) /* Heterogeneous Core Topology */ +#define X86_FEATURE_AMD_HETEROGENEOUS_CORES (21*32 + 6) /* Heterogeneous Core Topology */ /* * BUG word(s) diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 8ad5f1385f0ec..0f533e6260d29 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -1223,7 +1223,7 @@ enum amd_core_type amd_get_core_type(void) core_type :4; } props; - if (!cpu_feature_enabled(X86_FEATURE_HETERO_CORE_TOPOLOGY)) + if (!cpu_feature_enabled(X86_FEATURE_AMD_HETEROGENEOUS_CORES)) return CPU_CORE_TYPE_NO_HETERO_SUP; cpuid_leaf_reg(0x80000026, CPUID_EBX, &props); diff --git a/arch/x86/kernel/cpu/scattered.c b/arch/x86/kernel/cpu/scattered.c index d7f2c19abce33..307a917415343 100644 --- a/arch/x86/kernel/cpu/scattered.c +++ b/arch/x86/kernel/cpu/scattered.c @@ -52,7 +52,7 @@ static const struct cpuid_bit cpuid_bits[] = { { X86_FEATURE_PERFMON_V2, CPUID_EAX, 0, 0x80000022, 0 }, { X86_FEATURE_AMD_LBR_V2, CPUID_EAX, 1, 0x80000022, 0 }, { X86_FEATURE_AMD_LBR_PMC_FREEZE, CPUID_EAX, 2, 0x80000022, 0 }, - { X86_FEATURE_HETERO_CORE_TOPOLOGY, CPUID_EAX, 30, 0x80000026, 0 }, + { X86_FEATURE_AMD_HETEROGENEOUS_CORES, CPUID_EAX, 30, 0x80000026, 0 }, { 0, 0, 0, 0, 0 } }; From patchwork Mon Oct 21 17:55:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 13844494 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2041.outbound.protection.outlook.com [40.107.243.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 436831F707F; Mon, 21 Oct 2024 17:56:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.243.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729533415; cv=fail; b=tLZwbqKbQTSZxRG6dfGLnjDxy1cwjX2+x5hcfYSZQj5flslba1bqaqBNV1DoCETlpwwIyK05pVJES1GQfY1EqhmcOTiEgcLnz7BHh6NAhvXi1g4jZ/Pd1KiJZfnwgAwZndGyxK9U8BAEVUxWHAGNXBWCvYemIMUR4A8LkWxToUs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729533415; c=relaxed/simple; bh=7HxiLM96a66bvTgj1JOg44niaVlqWwzj7vq05ju5vHY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XflBc5CqmV2IzNvbktjby10k+/+y54p1uaq+2P+PIaX4fEjIsud3vrUs4niSjmd0Y3oSMlWhuZ1ncOkLg8K0ZKqDwaY+kt394HNBaSHV0kDceUEUCet1Vsnhu9i+Sebi3r68VczmKZD0BZT4/ORmPCUzlxhWUsjqUy9yOYB6IiE= 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=AsdNZ3fG; arc=fail smtp.client-ip=40.107.243.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="AsdNZ3fG" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DNHB6/vvALIhY7Br096zXgIsn7fo2Ex8rG5DQvUbYVusgR2beqXHiLQTwrp0rk6rjVWp3H4a/sHLlkvZHLBMa+hLOpugEdjOk87MtmROgPwIu1NbDwuUZ6QoQ3a98Xw+imNZwzxS3e7WD14NFNv3hfk1ZrWeSEGWbDR+7yhfvFs1SRIyri9Rj0jwpJVpOfnIpQDRrXoka3NdOXMAyvdPisJTr5v2TVKiX7ty4Ann7isPnrx9voSWu60W99vLweUU1KJnZGryt277ku3AARUacGRVod3+t/o0aCtWti+qdMWUyLlem7F9iaDVho6CyzydAJsNkz6T1xvue3GI3vSy+w== 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=72Ltp69SdFXvdS7XP2fG/0VBuWMBscLFbvmR3zn1GfM=; b=XYfhA+YAt+LPv5HvhFsrJXHKcbgsPUUwg1OW98NJpNlP2NuWTpamQR+GgiCm5fiPNYEuZ0FPCsRCv3mBepbF5u7U36YaB/1gqlVDGi2pc9AhnqYJcn50YxualoLFw0TCFYNBr8GijOBYW9ClLfbTkUwCGs48e8bKMv4yqoNEhPKW6SIUpI0q0XKYNtDIoLCNj9k77Akd1C4O7K5W4sfF+gjc/lv6M5+o99dTH9xJnBw89VUt7q0sTYzOzRXW2ZMwgnBB9rke78mGhMK5hr9dh6UVnlPh7ZAuMWtcRpG/srbAtbQYy8ExvPB+Fm9CAOcY5o2mrRUYlbZ/y+tevr4+Lw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=alien8.de 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=72Ltp69SdFXvdS7XP2fG/0VBuWMBscLFbvmR3zn1GfM=; b=AsdNZ3fGvVtGJX4kj9e6x0XtCfgU7VvXiw/P+ndJLrZZmQILSuDb6L0P6DwvsQ0e5UY/LPg6rVpnyv5UqYAk01pF3jPxOwatMtxgtAXlzHIxqdYwWIRqp3xO8t7NCjvaQ7TTNRKhllqI55atZ8/zpXlM9F+r1r17t/I1GCOSWJM= Received: from MW4PR04CA0365.namprd04.prod.outlook.com (2603:10b6:303:81::10) by MW4PR12MB7168.namprd12.prod.outlook.com (2603:10b6:303:22d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 21 Oct 2024 17:56:46 +0000 Received: from BN2PEPF000044A4.namprd02.prod.outlook.com (2603:10b6:303:81:cafe::e4) by MW4PR04CA0365.outlook.office365.com (2603:10b6:303:81::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28 via Frontend Transport; Mon, 21 Oct 2024 17:56:46 +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 BN2PEPF000044A4.mail.protection.outlook.com (10.167.243.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8093.14 via Frontend Transport; Mon, 21 Oct 2024 17:56:45 +0000 Received: from AUS-P9-MLIMONCI.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.39; Mon, 21 Oct 2024 12:56:42 -0500 From: Mario Limonciello To: Borislav Petkov CC: Thomas Gleixner , Ingo Molnar , "Dave Hansen" , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H . Peter Anvin" , "Rafael J . Wysocki" , "Gautham R . Shenoy" , Mario Limonciello , Perry Yuan , Brijesh Singh , Peter Zijlstra , Li RongQing , "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "open list:ACPI" , "open list:AMD PSTATE DRIVER" Subject: [PATCH 3/4] x86/cpu: Enable SD_ASYM_PACKING for PKG Domain on AMD Processors Date: Mon, 21 Oct 2024 12:55:08 -0500 Message-ID: <20241021175509.2079-4-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241021175509.2079-1-mario.limonciello@amd.com> References: <20241021175509.2079-1-mario.limonciello@amd.com> Precedence: bulk X-Mailing-List: linux-acpi@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: BN2PEPF000044A4:EE_|MW4PR12MB7168:EE_ X-MS-Office365-Filtering-Correlation-Id: 4f2090fb-22c2-49b5-1ba4-08dcf1f9ba57 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700013|1800799024|7416014|376014; X-Microsoft-Antispam-Message-Info: PTJE0znKWrEyCrlux8MzZDo0p4SxZPOXvtqeZEGZAmfPIheLBq6msrItQ5BuUrtNar1768oSNec94RYrwwVSiJeI6fVNHEyctteLJ0SzwV0Ka+1nWuj1myHfF/0T5bja8zsLIPcMMGZqsP7Q6DjA04+LFfMDc2TYCSw57qQi1QGOBK+sNYil0lRDgbXHqXQdHAr+fOIDqOaRtfdyULHc7DTlYjDerQfuq/ZW7DmT8u6ayto9tebXA/ClIThY32s/LHDuugx2chHtPCOVKPYNBf+T+t3Ydkoqz4mfF2SRzS5iCNZExEK2wZ7kdcKEiezduPk5DFMOChH3kjvJZ4zYIHtgnl0RZaayS4/ht7f1xxDArg7LLj8JtWpa84V1maMQ9IFNmb5vBy4HXQy5tfSCN1XSC4vUytXCzxekNU/LXEWAsYXzVVF2g7yLHdTsBzBAA3DE5HbuSE+Bo1OyWhvMzmiNPEIoV5lRRgDTHHyJlcEE1bVKuiu1aPjG3Tg4iwx6mIV3MbhMsihxgiFafkzQBb+1kT+UzureeyGoKBgln+7TEYbUbkHQlJUe3yjGLq6xGs7sxJlxkHoxzd8tyLfIImbubFZESowaAbFVz3EvOrxTODuSpt7Rrz9CftZyLd5v5c5y3FHHVRbqGeyRhB9uUG7Fai/e7uG6ozHjIAzxQp0EgG1pfaMARml4Bm9ZlPAClE2KC2m7UT92IGbs6pqkEFMIEB1cJlsWB/PZLZ63pe9cgbouJ+hT3FHh2eTT0T2KJ9uhgJg5/1t/qW9lg4H1D9rTiWbEGLqk6RGnpSio3zM74xSDqemg+YQ7BHSlVWD1GAqGYCwcqUj4T4Mtkw1fOOZUI0MQ/mFJnVT195fNNYl38VTOIo02UD5ngP+Ba3BmWZv/T96DOMIVMDNArVCJDxNeYDzbBiJGLDPe6YdoCtst3q6vTNZ0RMpqu60GRUneCuPGRdqD5h8RUM/yMleY3wkAK7y4UmcUVuVy0/QI23PJj+W4ftDNvxFp4rqhRr3imhCtTGd3K8RoFx3GXRJah/tWRr+av2AT2BxwQW3ialEEkx7SXPDtYw4tYSaOkZrUUYWRYgxdDbx7Z9v4+Y/fs6WjvnRn+Lvdpl73sizWL1PzdvBv3zd/xh0XDbJ0aRA+zuGvJJ7hDO2vLy+Q4XzIgAUlffMfWPlBcIymAfltZdRQHwA7fDquPCGOK2ClY7ybcnAzYLz1EeXQzuh6/yF3uYeaMhrpP9JYphmg9Zp97mCqBITosWeWWX1WFL2xPV6LAmkqq/kqeaA2NNB/Ox530zjcSC2Wuu6Ver/xJMf5rSafqhtZ8qXtORrTbAZ+ycUIqzup8c/qPa/qKp6xqkBnOuOMxp0EHXp1ajQglrDNyEiD7ZIL7xKrVSuHHUgKRd3KfpGCVMjVHEghjuRxk5orIQ== 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:(13230040)(82310400026)(36860700013)(1800799024)(7416014)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 17:56:45.4095 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4f2090fb-22c2-49b5-1ba4-08dcf1f9ba57 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: BN2PEPF000044A4.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7168 From: Perry Yuan Enable the SD_ASYM_PACKING domain flag for the PKG domain on AMD heterogeneous processors. This flag is beneficial for processors with one or more CCDs and relies on x86_sched_itmt_flags(). Signed-off-by: Perry Yuan Co-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello --- Rename to match correct x86 feature name --- arch/x86/kernel/smpboot.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 766f092dab80b..b5a8f0891135b 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -497,8 +497,9 @@ static int x86_cluster_flags(void) static int x86_die_flags(void) { - if (cpu_feature_enabled(X86_FEATURE_HYBRID_CPU)) - return x86_sched_itmt_flags(); + if (cpu_feature_enabled(X86_FEATURE_HYBRID_CPU) || + cpu_feature_enabled(X86_FEATURE_AMD_HETEROGENEOUS_CORES)) + return x86_sched_itmt_flags(); return 0; } From patchwork Mon Oct 21 17:55:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 13844493 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2046.outbound.protection.outlook.com [40.107.223.46]) (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 AA05E1F893D; Mon, 21 Oct 2024 17:56:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.46 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729533412; cv=fail; b=Z6SJZOg8Ypg7lRNIlVTlAw3BhiVmH3EpXGTKfjtmSjaFwMpDJUaNELvPZB6xrqLFwamZuKnGrP0WJnQHYU9yoZ71Hr1NOr1r8/ptq1fks7fJHMhGTCP1yK3+TRQdChgwG1UnB4OtiewzVtI/BH+1A/iTVeABePoWKV4TPzZjQao= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729533412; c=relaxed/simple; bh=9ZNwRkgnVPDvBfpMjjWjDa1rp3P8rW9lCzYbEWwjzHY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HylKX4xwNJ1SDHgmITMg8jOyn9RZDsDSqWDJAhGtUCUKXljXSkySx8uEIJNZfua1EiISjdD8sjSh9A4B/mx+dL/MmiEqrZ1Y7K+MJ1k2LG8mfMa3z6I9Qnu3lYpPCuDaiOyl/W3svTbSbcNWDLGyyDBtlifgiwjfBoQ51I6uga0= 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=mSsosy8V; arc=fail smtp.client-ip=40.107.223.46 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="mSsosy8V" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jiaapM1oMWiDqG/bHFlA8p4QselTr6Ajk4jjU6lVxGRyjxXq8qeeBwejE70FVawgT+/VSW3TQS1Lhr7TF9OZPhKQ+73/nc/w3X6ZjneT2XWQY2EpD/eEx/cg2ePjsL34zX91lSylFV7alcfLxzUVAzsFLc1X598ydjU1AYl2XrVKvN0pzjfMMamxJeiqOh+Go9IjRzdKgRiF5lBJH8fnS8uJX0H5giRTmDvpg5v2aW4GIJuT1w/cBbIoY+z5rv9QIJz8KQ2E1RKt6V0sBEG2cSmgMvbA/QQCIfxlsoL9rXEbxCPPLgMRW+r7YyoWeCnesx1/7sczz5BOGSttAM6qww== 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=5dEPNPj1REky0DUHnc5vOmsfFrXJ7emWcYWHsykmZ7A=; b=BXfpc7Hy5InHQDTA/cf4YYCeySFm10W5igNEs1vc66tv+ZJt+xehCzCCul85gUBulMXPXYztZ5ik/O30Xct1Aqqm3HjTtWTksK3aPTU+Yo5i7BbYc/yrMHeeAzDkxDjgu8b0esJ+MIKzzLcI2YQ1aWSDcrdkCBqnBgHJaY49R3mTFCeus9hkcfZW/9rQiUNHqKaxYtBw3/8TbtJw+iVXi6iqF/W1BATx+CX4lEeN5CGobSOHdT/JM1+iSQJBTvsl2chCVId2Lju6LPbZZ80FyrOhM7MkajuxAMkW7Oj9CpS9otmLstWSepn5zc7vAsGosHWIBTJ4NdLuxe43w3/qMQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=alien8.de 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=5dEPNPj1REky0DUHnc5vOmsfFrXJ7emWcYWHsykmZ7A=; b=mSsosy8V85HMzeXuorMIumFZNadXqNMFBh0/x15sEDe6Jzxh+ftg+T64eMDa+B+dq+7h2sHFrAVCy2c6Qgng2zUa2D1Em8xMurKh0c2m9mFGQp95t/k4vvKcnH7H70gcQEMoJhW4ytSCF7Wqdjg795ndJCDwyWm7D13XewhKygk= Received: from MW4PR04CA0361.namprd04.prod.outlook.com (2603:10b6:303:81::6) by PH7PR12MB9076.namprd12.prod.outlook.com (2603:10b6:510:2f6::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 21 Oct 2024 17:56:47 +0000 Received: from BN2PEPF000044A4.namprd02.prod.outlook.com (2603:10b6:303:81:cafe::43) by MW4PR04CA0361.outlook.office365.com (2603:10b6:303:81::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.29 via Frontend Transport; Mon, 21 Oct 2024 17:56:46 +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 BN2PEPF000044A4.mail.protection.outlook.com (10.167.243.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8093.14 via Frontend Transport; Mon, 21 Oct 2024 17:56:46 +0000 Received: from AUS-P9-MLIMONCI.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.39; Mon, 21 Oct 2024 12:56:43 -0500 From: Mario Limonciello To: Borislav Petkov CC: Thomas Gleixner , Ingo Molnar , "Dave Hansen" , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H . Peter Anvin" , "Rafael J . Wysocki" , "Gautham R . Shenoy" , Mario Limonciello , Perry Yuan , Brijesh Singh , Peter Zijlstra , Li RongQing , "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "open list:ACPI" , "open list:AMD PSTATE DRIVER" Subject: [PATCH 4/4] x86/amd: Move AMD core type identification code Date: Mon, 21 Oct 2024 12:55:09 -0500 Message-ID: <20241021175509.2079-5-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241021175509.2079-1-mario.limonciello@amd.com> References: <20241021175509.2079-1-mario.limonciello@amd.com> Precedence: bulk X-Mailing-List: linux-acpi@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: BN2PEPF000044A4:EE_|PH7PR12MB9076:EE_ X-MS-Office365-Filtering-Correlation-Id: 56044947-3120-4ca8-76a1-08dcf1f9baf4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|7416014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: d5LazVxW/yNiCt6tsHr6KuDIdsPRiKtooMsyoZKKCbaTqD8DbiRHeqjtQtjSwV/DASZH6ZR7cOpnrxfFHnynp5ZcswXiq+imNR1I0Ek8a6Bfytss71kiXBmvltNdyl3aMC70UAczuK1rId88QH1rWuJ/Q+8qY3b2T2obdASncdG4gecojHHySakHxC8g1q+06xG35QtHVRYZIqR81gHIjd8T+uHBe9FSfVPLO2v3yXJmzPAYq31qfj1n/whnG3amC6Mah/r+0soB4jgICzKCTOFjqtCW0nqjP2st4YDPEYMQ4xtOuFaatAhR1ByPBek02NIaFx78BtagyPJuy0CLndlYoWqDCUmImCTzUEPIKyS46GZa1g6Xq8WWMJsJUrNtvNkxb4sMLtLtpJjoEpR6mwy+Ax2H2ynS3w76UUtn7m41VxqbAnVdfl0IBWZNGuo/eQ+xmZCFEGUR3RH6z9NvAE4it02CXwXi3wdn8vUDh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800799024)(376014)(7416014)(36860700013)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 17:56:46.4876 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 56044947-3120-4ca8-76a1-08dcf1f9baf4 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: BN2PEPF000044A4.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB9076 The enum used for AMD core type identification is AMD specific so it should only be in the definition for CONFIG_CPU_SUP_AMD. Move the enum into this scope and adjust function return types since enum amd_core_type won't be available in the non CONFIG_CPU_SUP_AMD case. Instead of a dedicated enum definition of no hetero support use -EINVAL. Suggested-by: Borislav Petkov Signed-off-by: Mario Limonciello --- arch/x86/include/asm/processor.h | 15 +++++++-------- arch/x86/kernel/acpi/cppc.c | 2 +- arch/x86/kernel/cpu/amd.c | 7 +++---- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index d81a6efa81bb0..5b772036f6e83 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -691,15 +691,14 @@ static inline u32 per_cpu_l2c_id(unsigned int cpu) return per_cpu(cpu_info.topo.l2c_id, cpu); } +#ifdef CONFIG_CPU_SUP_AMD /* defined by CPUID_Fn80000026_EBX BIT [31:28] */ enum amd_core_type { - CPU_CORE_TYPE_NO_HETERO_SUP = -1, - CPU_CORE_TYPE_PERFORMANCE = 0, - CPU_CORE_TYPE_EFFICIENCY = 1, - CPU_CORE_TYPE_UNDEFINED = 2, + CPU_CORE_TYPE_PERFORMANCE, + CPU_CORE_TYPE_EFFICIENCY, + CPU_CORE_TYPE_UNDEFINED, }; -#ifdef CONFIG_CPU_SUP_AMD /* * Issue a DIV 0/1 insn to clear any division data from previous DIV * operations. @@ -711,13 +710,13 @@ static __always_inline void amd_clear_divider(void) } extern void amd_check_microcode(void); -extern enum amd_core_type amd_get_core_type(void); +extern int amd_get_core_type(void); #else static inline void amd_clear_divider(void) { } static inline void amd_check_microcode(void) { } -static inline enum amd_core_type amd_get_core_type(void) +static inline int amd_get_core_type(void) { - return CPU_CORE_TYPE_NO_HETERO_SUP; + return -EINVAL; } #endif diff --git a/arch/x86/kernel/acpi/cppc.c b/arch/x86/kernel/acpi/cppc.c index ca289e6ec82c9..e25494212d964 100644 --- a/arch/x86/kernel/acpi/cppc.c +++ b/arch/x86/kernel/acpi/cppc.c @@ -273,7 +273,7 @@ int amd_get_boost_ratio_numerator(unsigned int cpu, u64 *numerator) /* detect if running on heterogeneous design */ smp_call_function_single(cpu, amd_do_get_core_type, &core_type, 1); switch (core_type) { - case CPU_CORE_TYPE_NO_HETERO_SUP: + case -EINVAL: break; case CPU_CORE_TYPE_PERFORMANCE: /* use the max scale for performance cores */ diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 0f533e6260d29..a0d17993d52ce 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -1211,10 +1211,9 @@ void amd_check_microcode(void) * Returns the CPU type [31:28] (i.e., performance or efficient) of * a CPU in the processor. * - * If the processor has no core type support, returns - * CPU_CORE_TYPE_NO_HETERO_SUP. + * If the processor has no core type support, returns -EINVAL. */ -enum amd_core_type amd_get_core_type(void) +int amd_get_core_type(void) { struct { u32 num_processors :16, @@ -1224,7 +1223,7 @@ enum amd_core_type amd_get_core_type(void) } props; if (!cpu_feature_enabled(X86_FEATURE_AMD_HETEROGENEOUS_CORES)) - return CPU_CORE_TYPE_NO_HETERO_SUP; + return -EINVAL; cpuid_leaf_reg(0x80000026, CPUID_EBX, &props); if (props.core_type >= CPU_CORE_TYPE_UNDEFINED)