forked from rpms/kernel
95 lines
3.2 KiB
Diff
95 lines
3.2 KiB
Diff
|
From a53f36400559990c1a3716f11ecb46c03cc7cde7 Mon Sep 17 00:00:00 2001
|
||
|
From: Borislav Petkov <bp@suse.de>
|
||
|
Date: Thu, 25 Aug 2022 09:51:57 +0200
|
||
|
Subject: [PATCH 17/36] 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 <bp@suse.de>
|
||
|
Link: https://lore.kernel.org/r/20220825075445.28171-1-bp@alien8.de
|
||
|
(cherry picked from commit 8c61eafd22d7207039bff85c6e1d386f15abd17e)
|
||
|
Signed-off-by: Mridula Shastry <mridula.c.shastry@oracle.com>
|
||
|
Reviewed-by: Todd Vierling <todd.vierling@oracle.com>
|
||
|
---
|
||
|
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/microcode.h
|
||
|
index a930a63d1260..215ea340e7f9 100644
|
||
|
--- a/arch/x86/include/asm/microcode.h
|
||
|
+++ b/arch/x86/include/asm/microcode.h
|
||
|
@@ -32,9 +32,6 @@ enum ucode_state {
|
||
|
};
|
||
|
|
||
|
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);
|
||
|
|
||
|
diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c
|
||
|
index 0b557d04be22..9d15b7e5a13e 100644
|
||
|
--- a/arch/x86/kernel/cpu/microcode/amd.c
|
||
|
+++ b/arch/x86/kernel/cpu/microcode/amd.c
|
||
|
@@ -929,12 +929,6 @@ static enum ucode_state request_microcode_amd(int cpu, struct device *device,
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
-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 = ucode_cpu_info + cpu;
|
||
|
@@ -943,7 +937,6 @@ static void microcode_fini_cpu_amd(int cpu)
|
||
|
}
|
||
|
|
||
|
static struct microcode_ops microcode_amd_ops = {
|
||
|
- .request_microcode_user = request_microcode_user,
|
||
|
.request_microcode_fw = request_microcode_amd,
|
||
|
.collect_cpu_info = collect_cpu_info_amd,
|
||
|
.apply_microcode = apply_microcode_amd,
|
||
|
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
|
||
|
index 5f8223909db4..6fa667192bd9 100644
|
||
|
--- a/arch/x86/kernel/cpu/microcode/intel.c
|
||
|
+++ b/arch/x86/kernel/cpu/microcode/intel.c
|
||
|
@@ -952,24 +952,7 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device,
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
-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 = (void __user *)buf;
|
||
|
- iov.iov_len = size;
|
||
|
- iov_iter_init(&iter, WRITE, &iov, 1, size);
|
||
|
-
|
||
|
- return generic_load_microcode(cpu, &iter);
|
||
|
-}
|
||
|
-
|
||
|
static struct microcode_ops microcode_intel_ops = {
|
||
|
- .request_microcode_user = request_microcode_user,
|
||
|
.request_microcode_fw = request_microcode_fw,
|
||
|
.collect_cpu_info = collect_cpu_info,
|
||
|
.apply_microcode = apply_microcode_intel,
|
||
|
--
|
||
|
2.39.3
|
||
|
|