diff options
| author | Scott Wood <swood@redhat.com> | 2018-05-24 11:44:20 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2018-05-27 15:50:09 -0400 |
| commit | ff987fcf011d20c53b3a613edf6e2055ea48e26e (patch) | |
| tree | 08371cc583f07acdd3c0089ecfe16391b9bfd168 | |
| parent | ec30dcf7f425dc811ac365b5c4b0f097f98e569f (diff) | |
x86/microcode: Make the late update update_lock a raw lock for RT
__reload_late() is called from stop_machine context and thus cannot
acquire a non-raw spinlock on PREEMPT_RT.
Signed-off-by: Scott Wood <swood@redhat.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Clark Williams <williams@redhat.com>
Cc: Pei Zhang <pezhang@redhat.com>
Cc: x86-ml <x86@kernel.org>
Link: http://lkml.kernel.org/r/20180524154420.24455-1-swood@redhat.com
| -rw-r--r-- | arch/x86/kernel/cpu/microcode/core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c index 77e201301528..08286269fd24 100644 --- a/arch/x86/kernel/cpu/microcode/core.c +++ b/arch/x86/kernel/cpu/microcode/core.c | |||
| @@ -70,7 +70,7 @@ static DEFINE_MUTEX(microcode_mutex); | |||
| 70 | /* | 70 | /* |
| 71 | * Serialize late loading so that CPUs get updated one-by-one. | 71 | * Serialize late loading so that CPUs get updated one-by-one. |
| 72 | */ | 72 | */ |
| 73 | static DEFINE_SPINLOCK(update_lock); | 73 | static DEFINE_RAW_SPINLOCK(update_lock); |
| 74 | 74 | ||
| 75 | struct ucode_cpu_info ucode_cpu_info[NR_CPUS]; | 75 | struct ucode_cpu_info ucode_cpu_info[NR_CPUS]; |
| 76 | 76 | ||
| @@ -560,9 +560,9 @@ static int __reload_late(void *info) | |||
| 560 | if (__wait_for_cpus(&late_cpus_in, NSEC_PER_SEC)) | 560 | if (__wait_for_cpus(&late_cpus_in, NSEC_PER_SEC)) |
| 561 | return -1; | 561 | return -1; |
| 562 | 562 | ||
| 563 | spin_lock(&update_lock); | 563 | raw_spin_lock(&update_lock); |
| 564 | apply_microcode_local(&err); | 564 | apply_microcode_local(&err); |
| 565 | spin_unlock(&update_lock); | 565 | raw_spin_unlock(&update_lock); |
| 566 | 566 | ||
| 567 | /* siblings return UCODE_OK because their engine got updated already */ | 567 | /* siblings return UCODE_OK because their engine got updated already */ |
| 568 | if (err > UCODE_NFOUND) { | 568 | if (err > UCODE_NFOUND) { |
