Patch "x86/microcode: Get rid of struct apply_microcode_ctx" has been added to the 4.15-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
x86/microcode: Get rid of struct apply_microcode_ctx
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
x86-microcode-get-rid-of-struct-apply_microcode_ctx.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
854857f5944c59a881ff607b37ed9ed41d031a3bMon Sep 17 00:00:00 2001
From: Borislav Petkov <[email protected]>
Date: Wed, 28 Feb 2018 11:28:40 +0100
Subject: x86/microcode: Get rid of struct apply_microcode_ctx
From: Borislav Petkov <[email protected]>
commit 854857f5944c59a881ff607b37ed9ed41d031a3b upstream.
It is a useless remnant from earlier times. Use the ucode_state enum directly.
No functional change.
--- arch/x86/kernel/cpu/microcode/core.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-)
arch/x86/kernel/cpu/microcode/core.c +8 -11
@@ -373,26 +373,23 @@ static int collect_cpu_info(int cpu)return ret; } -struct apply_microcode_ctx { -enum ucode_state err; -}; -static void apply_microcode_local (void *arg) { -struct apply_microcode_ctx *ctx = arg; +enum ucode_state *err = arg; - ctx->err = microcode_ops->apply_microcode (smp_processor_id ()); + *err = microcode_ops->apply_microcode (smp_processor_id ()); }static int apply_microcode_on_target (int cpu) { -struct apply_microcode_ctx ctx = { .err =0 }; +enum ucode_state err;int ret; - ret =smp_call_function_single (cpu, apply_microcode_local, &ctx,1 ); -if (!ret) - ret = ctx.err; - + ret =smp_call_function_single (cpu, apply_microcode_local, &err,1 ); +if (!ret) { +if (err ==UCODE_ERROR ) + ret =1 ; + }return ret; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.15/x86-microcode-intel-check-microcode-revision-before-updating-sibling-threads.patch queue-4.15/x86-microcode-attempt-late-loading-only-when-new-microcode-is-present.patch queue-4.15/x86-microcode-propagate-return-value-from-updating-functions.patch queue-4.15/x86-cpu-check-cpu-feature-bits-after-microcode-upgrade.patch queue-4.15/x86-microcode-intel-writeback-and-invalidate-caches-before-updating-microcode.patch queue-4.15/x86-microcode-intel-look-into-the-patch-cache-first.patch queue-4.15/edac-mv64x60-fix-an-error-handling-path.patch queue-4.15/x86-microcode-request-microcode-on-the-bsp.patch queue-4.15/x86-microcode-get-rid-of-struct-apply_microcode_ctx.patch queue-4.15/x86-microcode-fix-cpu-synchronization-routine.patch queue-4.15/x86-microcode-synchronize-late-microcode-loading.patch queue-4.15/x86-microcode-do-not-upload-microcode-if-cpus-are-offline.patch queue-4.15/x86-cpu-add-a-microcode-loader-callback.patch