From nobody Tue Oct 7 13:23:04 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 EA7CD28F93E; Wed, 9 Jul 2025 11:38:02 +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=1752061085; cv=none; b=ouwMBH2CLt80OMHN9uLVcemQ1rLda7RCXopCuhbJ8sBaQzF6/Kyn6lDv0w9/CC/+cY0MnAo0KrWmBy41yEUCwwt3/QytYO2pAtxpNzi4s4Pj1WNFKgCrP/7cSLXMwp/G6VspptYm0VUgE5IQK4VzrrH9PlGhYYY+U4vXG+P4ALA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752061085; c=relaxed/simple; bh=0HXZTf2+zftvPNshPrkGK7w5FUdfDehbYy8eoBGWk1M=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=V+IMsxITsjLRIlFD3iE4VU0PY0YEFNspKAaQ5D62VCSogZ0SNmoGTFGlvM+jxgaSGPnxEaoO9b+R0f9kWrgiCxKKGHo8icFeHPPs8MhWmpMqhWCNOTbTV7bvSMlQOOCaIr5MFLj+lvghnJ3jb79Hd5QelenvzxcDM4Hkchh1/jg= 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=u8/9tHlz; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=yZ9XNvbi; 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="u8/9tHlz"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="yZ9XNvbi" Date: Wed, 09 Jul 2025 11:37:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1752061080; 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=pQ/FyDJSiGA6TA+ud5XGfY1EFfdC9QJcR+VoS1anZ9w=; b=u8/9tHlzSTSYHOnnm3ctrZiJcR5rGOV0HH8MFY4xzXK2bEbuWBoFZLAh41mljQmxFOtz7v pTwIpxsQaVFnyOSmNpeGG0B2kvMGVztJICO5wSiVWh03myroi7NLrA/0oVZuvS3D5cN1Dp JxiNzVo7fx1SW/Fm8XfPjxSLSE9mZ4omSp0FEQv5G7aOMHjYOctxI/8i3GlLHI4677xEXB 741IaHTCLApKE6sYGdJAGov80H7V0l9AXTG2AM4GH8mS/gN9aDwUqKM9qYVAab8i4Ugb6I Rj62aZYOPPuDkXIpu6RcrfNzCdijOZ6mm2RC8SWj9kp1L+9aAuV5KCwLK95ueA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1752061080; 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=pQ/FyDJSiGA6TA+ud5XGfY1EFfdC9QJcR+VoS1anZ9w=; b=yZ9XNvbi8KYt9yE9DhxJO5+2CT8TQRnJGUNfrY4xalJX1Z7bTi/1QUL/BMXpN88riLrgM8 RF66JFqeEh7Ys4Ag== From: "tip-bot2 for Greg Kroah-Hartman" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/microcode] x86/microcode: Move away from using a fake platform device Cc: "Greg Kroah-Hartman" , "Borislav Petkov (AMD)" , Sohil Mehta , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <2025070121-omission-small-9308@gregkh> References: <2025070121-omission-small-9308@gregkh> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <175206107968.406.11106963441390730546.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/microcode branch of tip: Commit-ID: 9b355cdb63b1e43434d7ac57430d3e68de58338d Gitweb: https://git.kernel.org/tip/9b355cdb63b1e43434d7ac57430d3e68d= e58338d Author: Greg Kroah-Hartman AuthorDate: Tue, 01 Jul 2025 12:54:22 +02:00 Committer: Borislav Petkov (AMD) CommitterDate: Wed, 09 Jul 2025 13:12:08 +02:00 x86/microcode: Move away from using a fake platform device Downloading firmware needs a device to hang off of, and so a platform device seemed like the simplest way to do this. Now that we have a faux device interface, use that instead as this "microcode device" is not anything resembling a platform device at all. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Sohil Mehta Link: https://lore.kernel.org/2025070121-omission-small-9308@gregkh --- arch/x86/kernel/cpu/microcode/core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/mic= rocode/core.c index fe50eb5..b92e09a 100644 --- a/arch/x86/kernel/cpu/microcode/core.c +++ b/arch/x86/kernel/cpu/microcode/core.c @@ -17,8 +17,8 @@ =20 #define pr_fmt(fmt) "microcode: " fmt =20 -#include #include +#include #include #include #include @@ -249,7 +249,7 @@ static void reload_early_microcode(unsigned int cpu) } =20 /* fake device for request_firmware */ -static struct platform_device *microcode_pdev; +static struct faux_device *microcode_fdev; =20 #ifdef CONFIG_MICROCODE_LATE_LOADING /* @@ -690,7 +690,7 @@ static int load_late_locked(void) if (!setup_cpus()) return -EBUSY; =20 - switch (microcode_ops->request_microcode_fw(0, µcode_pdev->dev)) { + switch (microcode_ops->request_microcode_fw(0, µcode_fdev->dev)) { case UCODE_NEW: return load_late_stop_cpus(false); case UCODE_NEW_SAFE: @@ -841,9 +841,9 @@ static int __init microcode_init(void) if (early_data.new_rev) pr_info_once("Updated early from: 0x%08x\n", early_data.old_rev); =20 - microcode_pdev =3D platform_device_register_simple("microcode", -1, NULL,= 0); - if (IS_ERR(microcode_pdev)) - return PTR_ERR(microcode_pdev); + microcode_fdev =3D faux_device_create("microcode", NULL, NULL); + if (!microcode_fdev) + return -ENODEV; =20 dev_root =3D bus_get_dev_root(&cpu_subsys); if (dev_root) { @@ -862,7 +862,7 @@ static int __init microcode_init(void) return 0; =20 out_pdev: - platform_device_unregister(microcode_pdev); + faux_device_destroy(microcode_fdev); return error; =20 }