x86/apic: Implement default single target IPI function
authorThomas Gleixner <tglx@linutronix.de>
Wed, 4 Nov 2015 22:57:01 +0000 (22:57 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 5 Nov 2015 12:07:52 +0000 (13:07 +0100)
apic_physflat and bigsmp_apic can share that implementation.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Borislav Petkov <bp@alien.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Travis <travis@sgi.com>
Cc: Daniel J Blueman <daniel@numascale.com>
Link: http://lkml.kernel.org/r/20151104220848.898543767@linutronix.de
arch/x86/include/asm/ipi.h
arch/x86/kernel/apic/ipi.c

index 615fa9061b57cde4f8cdb10ac574904eec6e1147..22998a8f8d2871da2d151cc05e76d6b4787d851b 100644 (file)
@@ -119,6 +119,7 @@ static inline void
        native_apic_mem_write(APIC_ICR, cfg);
 }
 
+extern void default_send_IPI_single_phys(int cpu, int vector);
 extern void default_send_IPI_mask_sequence_phys(const struct cpumask *mask,
                                                 int vector);
 extern void default_send_IPI_mask_allbutself_phys(const struct cpumask *mask,
index 62071569bd50d8137758a64be8b5b1c32329b240..4fcffbf024c93859ea8adcd99abeebc187940939 100644 (file)
 #include <asm/proto.h>
 #include <asm/ipi.h>
 
+void default_send_IPI_single_phys(int cpu, int vector)
+{
+       unsigned long flags;
+
+       local_irq_save(flags);
+       __default_send_IPI_dest_field(per_cpu(x86_cpu_to_apicid, cpu),
+                                     vector, APIC_DEST_PHYSICAL);
+       local_irq_restore(flags);
+}
+
 void default_send_IPI_mask_sequence_phys(const struct cpumask *mask, int vector)
 {
        unsigned long query_cpu;