Skip to content

Commit

Permalink
x86/microcode: Remove ->request_microcode_user()
Browse files Browse the repository at this point in the history
  181b6f4 ("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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
suryasaimadhu committed Aug 26, 2022
1 parent 3ecf671 commit 8c61eaf
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 27 deletions.
3 changes: 0 additions & 3 deletions arch/x86/include/asm/microcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
7 changes: 0 additions & 7 deletions arch/x86/kernel/cpu/microcode/amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,12 +924,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;
Expand All @@ -938,7 +932,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,
Expand Down
17 changes: 0 additions & 17 deletions arch/x86/kernel/cpu/microcode/intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,24 +916,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,
Expand Down

0 comments on commit 8c61eaf

Please sign in to comment.