From nobody Fri Oct 2 12:21:09 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 68BFF376475; Fri, 31 Jul 2026 22:24:13 +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=1785536654; cv=none; b=lVszQXsUZh38BQ4x32GqbtMXZHDyzx5rols/jUOA09E496mfMjgSHMx4/PUrCmBlDYMjQzy+jM54uDmGk0wXq//m+7TheL3pD2VAt9aQ5ZHg6vD3gpKpYbjHvBYzqAHuoMxjWHZbAdWrjh9fglbkgcAqwKSwcMsIBbtRnsmNBcg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785536654; c=relaxed/simple; bh=PWUFFLT6hckNZlKExGOs6a11rnJrsofMgwtbUIm15VY=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=NQChn9i/Bn72QRFo8Mm+C2ScP00UmRzqcHWqcwMICCS+hZraL1RFIuQYPLHjGTYxfCeioiamqizPC+2+PXSZmWdXD3yx76g67bBcIIwwDBHFNj5grfJqxgite4G4FYkw6Mj96pA+Nx3BDLVG07qHoTWx8M8zXg/yVE0F8aAcSeo= 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=W3vzUOQx; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=h+Z++zwo; 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="W3vzUOQx"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="h+Z++zwo" Date: Fri, 31 Jul 2026 22:24:03 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1785536645; 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=NI3MLzAQctKgf2waN79anxLxr/RFGwXrnvX/9hwo+ho=; b=W3vzUOQxq8b7HJRHlLUYsGW/RhQzPb6DpNW418um+q/xcM2AKx2SGBlBRAWD5UwiBaXuZ+ UUQBtnk+uz6Oejwfxp3lbCnPdYj3Bbf2kjCCruzOlnNJWW3kQ6KhVvCQADU6raIOBol9EN YygG8QkDe5ydEf5i1z5Ned7u0fqvUsvRdP9KKgeofM5CefC1FNEuGzAU1SVKGWRZhFE7KZ rQMQwjN9ZSO2GFHjHM13esmK3iR1G1DEMhllv/w331NqtuZyPBbUavIxlDcdvWZxoFeMZy aZEwQO8bnHc8j8AoVzSoE12fYOUae/Us6sICH7n+sWoQqpgmfRTtiRDzbRmBxQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1785536645; 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=NI3MLzAQctKgf2waN79anxLxr/RFGwXrnvX/9hwo+ho=; b=h+Z++zwocBfRuPV8o8pQVFNVr+WnGgT5lQ2yzd+MUOf5AYZj7TwJKaXTt6UvKUtk8rJ4Is fUzAehpNeE422wAg== From: "tip-bot2 for Ahmed S. Darwish" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cpu] x86/cpu: Use parsed CPUID(0x0) Cc: "Ahmed S. Darwish" , "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260528153923.403473-10-darwi@linutronix.de> References: <20260528153923.403473-10-darwi@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178553664375.112641.11958109755514486498.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: 21532edff7b08c9f9de743114375d635f95813f3 Gitweb: https://git.kernel.org/tip/21532edff7b08c9f9de743114375d635f= 95813f3 Author: Ahmed S. Darwish AuthorDate: Thu, 28 May 2026 17:37:31 +02:00 Committer: Borislav Petkov (AMD) CommitterDate: Fri, 31 Jul 2026 13:38:26 -07:00 x86/cpu: Use parsed CPUID(0x0) Use parsed CPUID(0x0) instead of a direct CPUID query. [ bp: Drop the unnecessary NULL check. ] Signed-off-by: Ahmed S. Darwish Signed-off-by: Borislav Petkov (AMD) Link: https://patch.msgid.link/20260528153923.403473-10-darwi@linutronix.de --- arch/x86/kernel/cpu/common.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index b381261..e658f76 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -942,11 +942,12 @@ void get_cpu_vendor(struct cpuinfo_x86 *c) =20 void cpu_detect(struct cpuinfo_x86 *c) { - /* Get vendor name */ - cpuid(0x00000000, (unsigned int *)&c->cpuid_level, - (unsigned int *)&c->x86_vendor_id[0], - (unsigned int *)&c->x86_vendor_id[8], - (unsigned int *)&c->x86_vendor_id[4]); + const struct leaf_0x0_0 *l0 =3D cpuid_leaf(c, 0x0); + + c->cpuid_level =3D l0->max_std_leaf; + *(u32 *)&c->x86_vendor_id[0] =3D l0->cpu_vendorid_0; + *(u32 *)&c->x86_vendor_id[4] =3D l0->cpu_vendorid_1; + *(u32 *)&c->x86_vendor_id[8] =3D l0->cpu_vendorid_2; =20 c->x86 =3D 4; /* Intel-defined flags: level 0x00000001 */