From nobody Thu Dec 18 04:17:39 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81CCFECAAA3 for ; Fri, 26 Aug 2022 10:07:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343493AbiHZKHH (ORCPT ); Fri, 26 Aug 2022 06:07:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343491AbiHZKGh (ORCPT ); Fri, 26 Aug 2022 06:06:37 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5BB4D5DCB; Fri, 26 Aug 2022 03:05:19 -0700 (PDT) Date: Fri, 26 Aug 2022 10:05:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1661508318; 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=8Vkeal0AztGkEtbXmbLzaghy0nAXJByD5CEpU8ihtJ4=; b=qDToFtGfrV8hGKn+rPvW46yzDCBp/UIG4Sfn9CB3wTr04CDOPK/Cptb7OS12pVLbmse951 I7iVfHCsabc2Dpv4Q+LM+dSEi+NR9HL80HkB12e7cRf0qVP7wO3xevzLC5nSfjU5CMz934 LldgKD9Z/jC57BluDRRmtuRYVkTFtiTVSs4FuFh8JjhPlyeJzHla4vEY73aCEL+PMNQbTs tm478/grsHV3bk7pBRaYba5ZKkK3vloT3GdQivD9k7eNPwvObTsYC64Ie+wqyDoF9qkqWk 9Ty3JnxULZZ7lZ0pyte9MNcqNIsYvNLJK4F/Fgg7Hx5Ci9QDB6hO8pQIgCEPYg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1661508318; 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=8Vkeal0AztGkEtbXmbLzaghy0nAXJByD5CEpU8ihtJ4=; b=GiZk9SLqbMVE7CYdUn6FDdfknqsba/kC6BqI89ixbgY6J2DWiJxCz2RL0WlBGzrbVAP6M8 GggUugkaQNGs/TBg== From: "tip-bot2 for Borislav Petkov" 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: Remove ->request_microcode_user() Cc: Borislav Petkov , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20220825075445.28171-1-bp@alien8.de> References: <20220825075445.28171-1-bp@alien8.de> MIME-Version: 1.0 Message-ID: <166150831648.401.9089001181596106367.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/microcode branch of tip: Commit-ID: 8c61eafd22d7207039bff85c6e1d386f15abd17e Gitweb: https://git.kernel.org/tip/8c61eafd22d7207039bff85c6e1d386f1= 5abd17e Author: Borislav Petkov AuthorDate: Thu, 25 Aug 2022 09:51:57 +02:00 Committer: Borislav Petkov CommitterDate: Fri, 26 Aug 2022 11:56:08 +02:00 x86/microcode: Remove ->request_microcode_user() 181b6f40e9ea ("x86/microcode: Rip out the OLD_INTERFACE") removed the old microcode loading interface but forgot to remove the related ->request_microcode_user() functionality which it uses. Rip it out now too. Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20220825075445.28171-1-bp@alien8.de --- arch/x86/include/asm/microcode.h | 3 --- arch/x86/kernel/cpu/microcode/amd.c | 7 ------- arch/x86/kernel/cpu/microcode/intel.c | 17 ----------------- 3 files changed, 27 deletions(-) diff --git a/arch/x86/include/asm/microcode.h b/arch/x86/include/asm/microc= ode.h index 0c3d344..7f7800e 100644 --- a/arch/x86/include/asm/microcode.h +++ b/arch/x86/include/asm/microcode.h @@ -32,9 +32,6 @@ enum ucode_state { }; =20 struct microcode_ops { - enum ucode_state (*request_microcode_user) (int cpu, - const void __user *buf, size_t size); - enum ucode_state (*request_microcode_fw) (int cpu, struct device *, bool refresh_fw); =20 diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/micr= ocode/amd.c index 8b2fcdf..5f38dd7 100644 --- a/arch/x86/kernel/cpu/microcode/amd.c +++ b/arch/x86/kernel/cpu/microcode/amd.c @@ -924,12 +924,6 @@ static enum ucode_state request_microcode_amd(int cpu,= struct device *device, return ret; } =20 -static enum ucode_state -request_microcode_user(int cpu, const void __user *buf, size_t size) -{ - return UCODE_ERROR; -} - static void microcode_fini_cpu_amd(int cpu) { struct ucode_cpu_info *uci =3D ucode_cpu_info + cpu; @@ -938,7 +932,6 @@ static void microcode_fini_cpu_amd(int cpu) } =20 static struct microcode_ops microcode_amd_ops =3D { - .request_microcode_user =3D request_microcode_user, .request_microcode_fw =3D request_microcode_amd, .collect_cpu_info =3D collect_cpu_info_amd, .apply_microcode =3D apply_microcode_amd, diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/mi= crocode/intel.c index 025c8f0..1fcbd67 100644 --- a/arch/x86/kernel/cpu/microcode/intel.c +++ b/arch/x86/kernel/cpu/microcode/intel.c @@ -916,24 +916,7 @@ static enum ucode_state request_microcode_fw(int cpu, = struct device *device, return ret; } =20 -static enum ucode_state -request_microcode_user(int cpu, const void __user *buf, size_t size) -{ - struct iov_iter iter; - struct iovec iov; - - if (is_blacklisted(cpu)) - return UCODE_NFOUND; - - iov.iov_base =3D (void __user *)buf; - iov.iov_len =3D size; - iov_iter_init(&iter, WRITE, &iov, 1, size); - - return generic_load_microcode(cpu, &iter); -} - static struct microcode_ops microcode_intel_ops =3D { - .request_microcode_user =3D request_microcode_user, .request_microcode_fw =3D request_microcode_fw, .collect_cpu_info =3D collect_cpu_info, .apply_microcode =3D apply_microcode_intel,