mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
x86/microcode/intel: Remove pointless mutex
There is no concurrency. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20230812195728.069849788@linutronix.de
This commit is contained in:
parent
d44450c593
commit
d2700f4067
1 changed files with 2 additions and 22 deletions
|
@ -397,22 +397,6 @@ next:
|
|||
return patch;
|
||||
}
|
||||
|
||||
/*
|
||||
* Save this microcode patch. It will be loaded early when a CPU is
|
||||
* hot-added or resumes.
|
||||
*/
|
||||
static void save_mc_for_early(struct ucode_cpu_info *uci, u8 *mc, unsigned int size)
|
||||
{
|
||||
/* Synchronization during CPU hotplug. */
|
||||
static DEFINE_MUTEX(x86_cpu_microcode_mutex);
|
||||
|
||||
mutex_lock(&x86_cpu_microcode_mutex);
|
||||
|
||||
save_microcode_patch(uci, mc, size);
|
||||
|
||||
mutex_unlock(&x86_cpu_microcode_mutex);
|
||||
}
|
||||
|
||||
static bool load_builtin_intel_microcode(struct cpio_data *cp)
|
||||
{
|
||||
unsigned int eax = 1, ebx, ecx = 0, edx;
|
||||
|
@ -829,12 +813,8 @@ static enum ucode_state generic_load_microcode(int cpu, struct iov_iter *iter)
|
|||
vfree(uci->mc);
|
||||
uci->mc = (struct microcode_intel *)new_mc;
|
||||
|
||||
/*
|
||||
* If early loading microcode is supported, save this mc into
|
||||
* permanent memory. So it will be loaded early when a CPU is hot added
|
||||
* or resumes.
|
||||
*/
|
||||
save_mc_for_early(uci, new_mc, new_mc_size);
|
||||
/* Save for CPU hotplug */
|
||||
save_microcode_patch(uci, new_mc, new_mc_size);
|
||||
|
||||
pr_debug("CPU%d found a matching microcode update with version 0x%x (current=0x%x)\n",
|
||||
cpu, new_rev, uci->cpu_sig.rev);
|
||||
|
|
Loading…
Add table
Reference in a new issue