summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/microcode_intel_early.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-15 21:07:53 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-15 21:07:53 (GMT)
commitae3b29e67ca361f0876dad6be2061699de95d126 (patch)
tree26063709aa45ac714b2b10e22b62d23247a5a19d /arch/x86/kernel/microcode_intel_early.c
parent652df602f8c5e99a3cec7d8e0c114e29d93b342f (diff)
parentcf8b166d5c1c89aad6c436a954fa40fd18a75bfb (diff)
downloadlinux-fsl-qoriq-ae3b29e67ca361f0876dad6be2061699de95d126.tar.xz
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Thomas Gleixner: - Fix for a CPU hot-add deadlock in microcode update code - Fix for idle consolidation fallout - Documentation update for initial kernel direct mapping * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Add missing comments for initial kernel direct mapping x86/microcode: Add local mutex to fix physical CPU hot-add deadlock x86: Fix idle consolidation fallout
Diffstat (limited to 'arch/x86/kernel/microcode_intel_early.c')
-rw-r--r--arch/x86/kernel/microcode_intel_early.c5
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 d893e8e..2e9e128 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;
}