[patch 12/14] x86/apic: Provide default send single IPI wrapper

From: Thomas Gleixner
Date: Wed Nov 04 2015 - 17:58:53 EST


Instead of doing the wrapping in the smp code we can provide a default
wrapper for those APICs which insist on cpumasks.

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
arch/x86/include/asm/ipi.h | 1 +
arch/x86/kernel/apic/ipi.c | 8 ++++++++
2 files changed, 9 insertions(+)

Index: linux/arch/x86/include/asm/ipi.h
===================================================================
--- linux.orig/arch/x86/include/asm/ipi.h
+++ linux/arch/x86/include/asm/ipi.h
@@ -119,6 +119,7 @@ static inline void
native_apic_mem_write(APIC_ICR, cfg);
}

+extern void default_send_IPI_single(int cpu, int vector);
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);
Index: linux/arch/x86/kernel/apic/ipi.c
===================================================================
--- linux.orig/arch/x86/kernel/apic/ipi.c
+++ linux/arch/x86/kernel/apic/ipi.c
@@ -65,6 +65,14 @@ void default_send_IPI_mask_allbutself_ph
local_irq_restore(flags);
}

+/*
+ * Helper function for APICs which insist on cpumasks
+ */
+void default_send_IPI_single(int cpu, int vector)
+{
+ apic->send_IPI_mask(cpumask_of(cpu), vector);
+}
+
#ifdef CONFIG_X86_32

void default_send_IPI_mask_sequence_logical(const struct cpumask *mask,


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/