From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 6620A30B51E; Sat, 25 Jul 2026 01:40:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784943601; cv=none; b=ipJMFnKS9j+jR8lL5fgLvDkSpWYgvIg2mGSyTCouforwb3KvwQEmkgmU/sIjZ937lKsbJivpXcVbTiLjXyajv8kF8Fy8OwaXjgZgCzZP3MLK2pVaybZml45rlhrgthISSR1v5fkmCSkHBf+BLuYkdvZvlw05dkSMDcamW5Il8Bo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784943601; c=relaxed/simple; bh=pyMJoc5rJNJoS4Tjoj3FLrb4ZeoSefCzqDfHmW3intc=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=n3ent63VTLDvAtP7mGitxtwtHdX76AIxN68CaZ0j2AES8nB29CUcd9E2YEGZsAktICzwoqH64zfDquyCQT+qORt2CUHxgsY7sab91D2MRU4Vz5Y4LDgDHaGyVBH7+bRoL2BC/Fcxc1PmF7FP3EtoGFDsBH+/IzVivnHfVkjeQ7o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=WfIPNYZi; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=PqezeA/8; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="WfIPNYZi"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="PqezeA/8" Date: Sat, 25 Jul 2026 01:39:56 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1784943598; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q/N7CkTfbSsSOuAmPczgLqlKxvlxsqrsZo6XwDsX44A=; b=WfIPNYZi8aaA1HHRkVZngGR3aKqippazZibpgNxoMEQ8GK4kmf1h0wXFSBTadjxFbQ78Mx qreGWQm+K3HLh4IeZr+58p2rrRdtH2B190H1b+U/Qsgnl1geu1+qF2pRWX7mm/sgTndYxo r75uschL3l907jBmda7GMzu8MzPw/PveWF4xfKxVHxt5Z1B99imKhkzaXd33Wz+SGkz4I0 GW7cNqWBS2Fw7EAt8NnXhZFjm+HW2/WR+g/B1WDUbzLrqx1JwppTlR2FjloaPT1juVKdxR bFFRXE01xuPXwHXJVMrUrTZZVcdCLhwOmBymqtSodeV2KaA1vGYjUmVdK5UDFw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1784943598; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q/N7CkTfbSsSOuAmPczgLqlKxvlxsqrsZo6XwDsX44A=; b=PqezeA/8wIaBXSRsdg0t2lDzywRHdz6LxSLLm/bNP5RNVLfnQVDIGKARlvRIL5WrwjW+4s f29HWtf+NOOfZJBw== From: "tip-bot2 for Vishal Badole" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cpu] x86/topology: Name the AMD core-type values Cc: "Borislav Petkov (AMD)" , Vishal Badole , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260721154514.2506972-3-Vishal.Badole@amd.com> References: <20260721154514.2506972-3-Vishal.Badole@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178494359681.112641.1888322837045781762.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the x86/cpu branch of tip: Commit-ID: bdb1b1f03b9b1cc1cde7d54f8b5b2f9a6bdda782 Gitweb: https://git.kernel.org/tip/bdb1b1f03b9b1cc1cde7d54f8b5b2f9a6bd= da782 Author: Vishal Badole AuthorDate: Tue, 21 Jul 2026 21:15:13 +05:30 Committer: Borislav Petkov (AMD) CommitterDate: Thu, 23 Jul 2026 14:23:27 -07:00 x86/topology: Name the AMD core-type values Replace the bare 0/1 in get_topology_cpu_type() with named constants that mirror what the AMD APM publishes for CPUID Fn0x80000026 EBX[31:28] (Extended CPU Topology, Core Type): 0 - Performance core 1 - Efficient core 2 - Low-power core (used by a follow-up) No functional change. Suggested-by: Borislav Petkov (AMD) Signed-off-by: Vishal Badole Signed-off-by: Borislav Petkov (AMD) Link: https://patch.msgid.link/20260721154514.2506972-3-Vishal.Badole@amd.com --- arch/x86/include/asm/topology.h | 6 ++++++ arch/x86/kernel/cpu/topology_common.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h index ef76ba6..1825691 100644 --- a/arch/x86/include/asm/topology.h +++ b/arch/x86/include/asm/topology.h @@ -114,6 +114,12 @@ enum x86_topology_domains { TOPO_MAX_DOMAIN, }; =20 +enum amd_cpu_type { + AMD_CPU_TYPE_PERFORMANCE =3D 0, + AMD_CPU_TYPE_EFFICIENCY =3D 1, + AMD_CPU_TYPE_LOW_POWER =3D 2, +}; + struct x86_topology_system { unsigned int dom_shifts[TOPO_MAX_DOMAIN]; unsigned int dom_size[TOPO_MAX_DOMAIN]; diff --git a/arch/x86/kernel/cpu/topology_common.c b/arch/x86/kernel/cpu/topo= logy_common.c index b9d025f..71b6c33 100644 --- a/arch/x86/kernel/cpu/topology_common.c +++ b/arch/x86/kernel/cpu/topology_common.c @@ -42,8 +42,8 @@ enum x86_topology_cpu_type get_topology_cpu_type(struct cpu= info_x86 *c) } if (c->x86_vendor =3D=3D X86_VENDOR_AMD) { switch (c->topo.amd_type) { - case 0: return TOPO_CPU_TYPE_PERFORMANCE; - case 1: return TOPO_CPU_TYPE_EFFICIENCY; + case AMD_CPU_TYPE_PERFORMANCE: return TOPO_CPU_TYPE_PERFORMANCE; + case AMD_CPU_TYPE_EFFICIENCY: return TOPO_CPU_TYPE_EFFICIENCY; } } =20