Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / arch / x86 / kernel / smpboot.c
index 85dc05a3aa02b3251b64ae0406b95716c714cb85..a32da804252e374b5d266e6788653f24fc98705d 100644 (file)
@@ -1312,6 +1312,12 @@ void cpu_disable_common(void)
 
 int native_cpu_disable(void)
 {
+       int ret;
+
+       ret = check_irq_vectors_for_cpu_disable();
+       if (ret)
+               return ret;
+
        clear_local_APIC();
 
        cpu_disable_common();
@@ -1417,7 +1423,9 @@ static inline void mwait_play_dead(void)
                 * The WBINVD is insufficient due to the spurious-wakeup
                 * case where we return around the loop.
                 */
+               mb();
                clflush(mwait_ptr);
+               mb();
                __monitor(mwait_ptr, 0, 0);
                mb();
                __mwait(eax, 0);