From nobody Mon Mar 23 19:52:08 2026 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 4E2B625CC40; Mon, 23 Mar 2026 15:42:15 +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=1774280536; cv=none; b=MtLnucbAQygiBItopVdWQbKkMwrbeKLTx8BTYIVDib2AcgdqFgluDmJT2ZuBqUraAwR3p8q16Oa591TEDpxCgOwoC9YilSHVU50+wXEB4L1M/KaGhM3nYlwskCV+9eQcYNT+GonMMSEU47gId9g3sUT8tWU38gs92Z7WvW6t+uY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774280536; c=relaxed/simple; bh=n1Vl2MbennidaTcq5L5EFSfd2vgCWgoPqcR3t1kzAXU=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=A+RtLf8dGWcbIErmQti9dEDwjwpO/U+vaTWDD4Q0dzg06Hrp0OOiRwU3ZnegLgMgj2AyeflgfqJj8f1dmPN28pu1IWYaAMRrWBp6YhErdQCPsonH+Xdck7MH/1/wYq7ZQROr4wAyDRawAuQ+2atDAXF19WlzX0/lbiY3KePP2Kg= 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=0e+91iaW; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=mZVmPepk; 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="0e+91iaW"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="mZVmPepk" Date: Mon, 23 Mar 2026 15:42:11 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1774280533; 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=9j9qWVn/NqDyCHCy0kOiowgCzNUjtDh6wbrnHM1/l7w=; b=0e+91iaWG4zDS0F+L6lvtjgPUxYrkn2zz6tgKqL0Re03gs7B26O/Wq21t1mp5qXS/hWV/L 8/bMvmq4UGZEmW2HuNiZUydO0HbVdgWCVgrLyNOug72t5ovdrB34YFB6engqQuBx51Z/Qv ivE0l3ivSXuqymIouf8CpUs10RvaXaRtOJuo67RxGyAMV6AZq/UQJnuj9LPAPaJ5HLmx3l b+lBCpQ+3Mmeg0frjYOe3JlDUomXacfALH/7QDhwx2QPrClt9cX0JoGg3rJ2owwhcgf2d1 QC2nNRQkHxWeMTxDR0cQ0JBPnbOXxCPxczSL3vBZHIRaJ5oEVgopqLxX7C3BlQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1774280533; 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=9j9qWVn/NqDyCHCy0kOiowgCzNUjtDh6wbrnHM1/l7w=; b=mZVmPepkZO/gNRnR8ImV136fKJfxF2Q1rLYsqrYgloec9axQN9ayBRSCbXgPISyS2VyynZ Zy3PaFAN5OrvGSCQ== From: "tip-bot2 for Wei Wang" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cleanups] x86/cpu/topology: Consolidate AMD and Hygon cases in parse_topology() Cc: Wei Wang , "Borislav Petkov (AMD)" , Yongwei Xu , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: =?utf-8?q?=3CSI2PR01MB4393D6B7E17AB05612AEE925DC4BA=40SI2PR01MB?= =?utf-8?q?4393=2Eapcprd01=2Eprod=2Eexchangelabs=2Ecom=3E?= References: =?utf-8?q?=3CSI2PR01MB4393D6B7E17AB05612AEE925DC4BA=40SI2PR01MB4?= =?utf-8?q?393=2Eapcprd01=2Eprod=2Eexchangelabs=2Ecom=3E?= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177428053184.1647592.12203519461865542446.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/cleanups branch of tip: Commit-ID: 6a9fe1ad908df12ef71dea12373f25826ea29a8d Gitweb: https://git.kernel.org/tip/6a9fe1ad908df12ef71dea12373f25826= ea29a8d Author: Wei Wang AuthorDate: Mon, 23 Mar 2026 16:07:19 +08:00 Committer: Borislav Petkov (AMD) CommitterDate: Mon, 23 Mar 2026 16:25:26 +01:00 x86/cpu/topology: Consolidate AMD and Hygon cases in parse_topology() Merge the two separate switch cases for AMD and Hygon as they share the common cpu_parse_topology_amd(). Also drop the IS_ENABLED(CONFIG_CPU_SUP_AMD/HYGON) guards, because 1) they are dead code: when a vendor's CONFIG_CPU_SUP_* is disabled, its vendor detection code (in amd.c / hygon.c) is not compiled, so x86_vendor will never be set to X86_VENDOR_AMD / X86_VENDOR_HYGON, instead it will default to X86_VENDOR_UNKNOWN and those switch cases are unreachable. 2) topology_amd.o is always built (obj-y), so cpu_parse_topology_amd() is always available regardless of CPU_SUP_* configuration. Signed-off-by: Wei Wang Signed-off-by: Borislav Petkov (AMD) Tested-by: Yongwei Xu Link: https://patch.msgid.link/SI2PR01MB4393D6B7E17AB05612AEE925DC4BA@SI2PR= 01MB4393.apcprd01.prod.exchangelabs.com --- arch/x86/kernel/cpu/topology_common.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/x86/kernel/cpu/topology_common.c b/arch/x86/kernel/cpu/to= pology_common.c index 7162579..d0d79d5 100644 --- a/arch/x86/kernel/cpu/topology_common.c +++ b/arch/x86/kernel/cpu/topology_common.c @@ -157,8 +157,8 @@ static void parse_topology(struct topo_scan *tscan, boo= l early) =20 switch (c->x86_vendor) { case X86_VENDOR_AMD: - if (IS_ENABLED(CONFIG_CPU_SUP_AMD)) - cpu_parse_topology_amd(tscan); + case X86_VENDOR_HYGON: + cpu_parse_topology_amd(tscan); break; case X86_VENDOR_CENTAUR: case X86_VENDOR_ZHAOXIN: @@ -170,10 +170,6 @@ static void parse_topology(struct topo_scan *tscan, bo= ol early) if (c->cpuid_level >=3D 0x1a) c->topo.cpu_type =3D cpuid_eax(0x1a); break; - case X86_VENDOR_HYGON: - if (IS_ENABLED(CONFIG_CPU_SUP_HYGON)) - cpu_parse_topology_amd(tscan); - break; } } =20