From nobody Fri Dec 19 19:16:29 2025 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 847B3215F55; Thu, 9 Jan 2025 09:15:45 +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=1736414147; cv=none; b=VLJDtHsvpXDuA2AK0zmZDtAVQy2GpO1lqSS+5ZpsNG9AIwlNYohAdNdAwWl80vNFp5a1kmfn5O0w/0qhAG0eKPKZhips9Kd7iZbWa6W1tL38yV/ooO/nzhjml+M9BpdQj05jYQpSpCotGS3+RtMoc8+td/O7VNTOENCyoCLoftY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736414147; c=relaxed/simple; bh=e/+sacZCFkCG39s9IXFa/5m+tHptiwllXatX10ooLCs=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=rKKdgDLRh92MttB8FgohkRpbqIcSsxeKW4R7avnm7IEwDQNISHNEbufLXc71ZtfQ9a5uCCInnmpmTCeyT+jcjRTmcLrYqMclOqXdYwvacVsZQ/FnMtR4y+LVKkjKfCZRRLIsT55JqROQsZofpo0HWjEzArhxgUkTK3/zkFJTCsk= 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=TGOBxeJe; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Nvd+lMeI; 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="TGOBxeJe"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Nvd+lMeI" Date: Thu, 09 Jan 2025 09:15:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1736414144; 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=PEhzFSjfKm9huY+OCyP30FGfY8EvzWxYgL387e1fO7Y=; b=TGOBxeJekV9wXjIFdhgXJpNjnGKY7wm5d48z5PjSFP4ySfOGFr6unzZJtWStl95BjnCrcc qhczhRcluXUS4PbtroF9mzRP/9gYnr6NDVbSKvbzLPQcgbovdj875KnOQnc3XZ+mUzoMUW 3d55W0RSWpZyXXtYmZq5jzEyTRL8AcoY6sLTbm1izx5vUW8RIsWRApR39ZESxlDs/mbn/Q ybzdiuPNjFg+85mojQgbGQLD/L96IaCQBBOwRg/XTLQcIULQ7oQSAkGKaoLdXSMb+aqYFg k0783iuiFWU9l8FWRmRtS6/MY3lRm7CGFxQIIFkkP78aOejnTKwNOr8ENJDfHA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1736414144; 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=PEhzFSjfKm9huY+OCyP30FGfY8EvzWxYgL387e1fO7Y=; b=Nvd+lMeIFf5Aq+Kt+qxHNVkR2B7qTtEzlKh16rvO9dZo/vKVvQdQwBQMBiLo/XOzjA2gbH FUgOR3uXkMEgymBQ== From: "tip-bot2 for Yazen Ghannam" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/misc] x86/amd_nb: Clean up early_is_amd_nb() Cc: Yazen Ghannam , "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20241206161210.163701-4-yazen.ghannam@amd.com> References: <20241206161210.163701-4-yazen.ghannam@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <173641414349.399.5243780810714383252.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/misc branch of tip: Commit-ID: e13f51b51814e2527c51998d2dae594ef9cb633a Gitweb: https://git.kernel.org/tip/e13f51b51814e2527c51998d2dae594ef= 9cb633a Author: Yazen Ghannam AuthorDate: Fri, 06 Dec 2024 16:11:56=20 Committer: Borislav Petkov (AMD) CommitterDate: Wed, 08 Jan 2025 10:47:22 +01:00 x86/amd_nb: Clean up early_is_amd_nb() The check for early_is_amd_nb() is only useful for systems with GART or the NB_CFG register. Zen-based systems (both AMD and Hygon) have neither, so return early for them. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20241206161210.163701-4-yazen.ghannam@amd.c= om --- arch/x86/kernel/amd_nb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c index 37b8244..ee20071 100644 --- a/arch/x86/kernel/amd_nb.c +++ b/arch/x86/kernel/amd_nb.c @@ -385,7 +385,6 @@ static int amd_cache_northbridges(void) */ bool __init early_is_amd_nb(u32 device) { - const struct pci_device_id *misc_ids =3D amd_nb_misc_ids; const struct pci_device_id *id; u32 vendor =3D device & 0xffff; =20 @@ -393,11 +392,11 @@ bool __init early_is_amd_nb(u32 device) boot_cpu_data.x86_vendor !=3D X86_VENDOR_HYGON) return false; =20 - if (boot_cpu_data.x86_vendor =3D=3D X86_VENDOR_HYGON) - misc_ids =3D hygon_nb_misc_ids; + if (cpu_feature_enabled(X86_FEATURE_ZEN)) + return false; =20 device >>=3D 16; - for (id =3D misc_ids; id->vendor; id++) + for (id =3D amd_nb_misc_ids; id->vendor; id++) if (vendor =3D=3D id->vendor && device =3D=3D id->device) return true; return false;