X-Git-Url: https://git.stricted.de/?a=blobdiff_plain;f=arch%2Fx86%2Fkernel%2Fmicrocode_intel_early.c;h=2e9e12871c2b51a9fe48068369f8dd4346a4db51;hb=df91ed6d46a79bb8d3227939c0a84a78e7cf4e8e;hp=d893e8ed8ac96559b2175b00c3d68d71658a4105;hpb=a8c4b90e670be3b01e9395c7310639c8109fc77e;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git diff --git a/arch/x86/kernel/microcode_intel_early.c b/arch/x86/kernel/microcode_intel_early.c index d893e8ed8ac9..2e9e12871c2b 100644 --- a/arch/x86/kernel/microcode_intel_early.c +++ b/arch/x86/kernel/microcode_intel_early.c @@ -487,6 +487,7 @@ static inline void show_saved_mc(void) #endif #if defined(CONFIG_MICROCODE_INTEL_EARLY) && defined(CONFIG_HOTPLUG_CPU) +static DEFINE_MUTEX(x86_cpu_microcode_mutex); /* * Save this mc into mc_saved_data. So it will be loaded early when a CPU is * hot added or resumes. @@ -507,7 +508,7 @@ int save_mc_for_early(u8 *mc) * Hold hotplug lock so mc_saved_data is not accessed by a CPU in * hotplug. */ - cpu_hotplug_driver_lock(); + mutex_lock(&x86_cpu_microcode_mutex); mc_saved_count_init = mc_saved_data.mc_saved_count; mc_saved_count = mc_saved_data.mc_saved_count; @@ -544,7 +545,7 @@ int save_mc_for_early(u8 *mc) } out: - cpu_hotplug_driver_unlock(); + mutex_unlock(&x86_cpu_microcode_mutex); return ret; }