diff options
| -rw-r--r-- | arch/x86/kernel/microcode_intel_early.c | 5 |
1 files changed, 3 insertions, 2 deletions
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) | |||
| 487 | #endif | 487 | #endif |
| 488 | 488 | ||
| 489 | #if defined(CONFIG_MICROCODE_INTEL_EARLY) && defined(CONFIG_HOTPLUG_CPU) | 489 | #if defined(CONFIG_MICROCODE_INTEL_EARLY) && defined(CONFIG_HOTPLUG_CPU) |
| 490 | static DEFINE_MUTEX(x86_cpu_microcode_mutex); | ||
| 490 | /* | 491 | /* |
| 491 | * Save this mc into mc_saved_data. So it will be loaded early when a CPU is | 492 | * Save this mc into mc_saved_data. So it will be loaded early when a CPU is |
| 492 | * hot added or resumes. | 493 | * hot added or resumes. |
| @@ -507,7 +508,7 @@ int save_mc_for_early(u8 *mc) | |||
| 507 | * Hold hotplug lock so mc_saved_data is not accessed by a CPU in | 508 | * Hold hotplug lock so mc_saved_data is not accessed by a CPU in |
| 508 | * hotplug. | 509 | * hotplug. |
| 509 | */ | 510 | */ |
| 510 | cpu_hotplug_driver_lock(); | 511 | mutex_lock(&x86_cpu_microcode_mutex); |
| 511 | 512 | ||
| 512 | mc_saved_count_init = mc_saved_data.mc_saved_count; | 513 | mc_saved_count_init = mc_saved_data.mc_saved_count; |
| 513 | mc_saved_count = mc_saved_data.mc_saved_count; | 514 | mc_saved_count = mc_saved_data.mc_saved_count; |
| @@ -544,7 +545,7 @@ int save_mc_for_early(u8 *mc) | |||
| 544 | } | 545 | } |
| 545 | 546 | ||
| 546 | out: | 547 | out: |
| 547 | cpu_hotplug_driver_unlock(); | 548 | mutex_unlock(&x86_cpu_microcode_mutex); |
| 548 | 549 | ||
| 549 | return ret; | 550 | return ret; |
| 550 | } | 551 | } |
