x86/apic: Add NMI_VECTOR wait to IPI shorthand
authorThomas Gleixner <tglx@linutronix.de>
Mon, 22 Jul 2019 18:47:20 +0000 (20:47 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 25 Jul 2019 14:11:59 +0000 (16:11 +0200)
To support NMI shorthand broadcasts add the safe wait for ICR idle for NMI
vector delivery.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20190722105220.185838026@linutronix.de
arch/x86/kernel/apic/ipi.c

index 50c9dcc6f60e1e6486a13253ee32b86e921bc728..7236fefde396a8bb78618bcef841679bffd944a9 100644 (file)
@@ -30,7 +30,10 @@ void __default_send_IPI_shortcut(unsigned int shortcut, int vector)
        /*
         * Wait for idle.
         */
-       __xapic_wait_icr_idle();
+       if (unlikely(vector == NMI_VECTOR))
+               safe_apic_wait_icr_idle();
+       else
+               __xapic_wait_icr_idle();
 
        /*
         * No need to touch the target chip field. Also the destination