@@ -397,22 +397,6 @@ scan_microcode(void *data, size_t size, struct ucode_cpu_info *uci, bool save)
397
397
return patch ;
398
398
}
399
399
400
- /*
401
- * Save this microcode patch. It will be loaded early when a CPU is
402
- * hot-added or resumes.
403
- */
404
- static void save_mc_for_early (struct ucode_cpu_info * uci , u8 * mc , unsigned int size )
405
- {
406
- /* Synchronization during CPU hotplug. */
407
- static DEFINE_MUTEX (x86_cpu_microcode_mutex );
408
-
409
- mutex_lock (& x86_cpu_microcode_mutex );
410
-
411
- save_microcode_patch (uci , mc , size );
412
-
413
- mutex_unlock (& x86_cpu_microcode_mutex );
414
- }
415
-
416
400
static bool load_builtin_intel_microcode (struct cpio_data * cp )
417
401
{
418
402
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)
829
813
vfree (uci -> mc );
830
814
uci -> mc = (struct microcode_intel * )new_mc ;
831
815
832
- /*
833
- * If early loading microcode is supported, save this mc into
834
- * permanent memory. So it will be loaded early when a CPU is hot added
835
- * or resumes.
836
- */
837
- save_mc_for_early (uci , new_mc , new_mc_size );
816
+ /* Save for CPU hotplug */
817
+ save_microcode_patch (uci , new_mc , new_mc_size );
838
818
839
819
pr_debug ("CPU%d found a matching microcode update with version 0x%x (current=0x%x)\n" ,
840
820
cpu , new_rev , uci -> cpu_sig .rev );
0 commit comments