diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2015-11-04 17:57:07 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-11-05 07:07:53 -0500 |
commit | 7e29393b20a1a863a5f9bf48dc71e5cff4035ff5 (patch) | |
tree | 76e9a9166b0d205e15457399e7115ac1b6aef3e4 | |
parent | 4727da2eb1ec79fdc2acdd2f764b5b2aacab998c (diff) |
x86/apic: Provide default send single IPI wrapper
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@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/20151104220849.631111846@linutronix.de
-rw-r--r-- | arch/x86/include/asm/ipi.h | 1 | ||||
-rw-r--r-- | arch/x86/kernel/apic/ipi.c | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/include/asm/ipi.h b/arch/x86/include/asm/ipi.h index 22998a8f8d28..cfc9a0d2d07c 100644 --- a/arch/x86/include/asm/ipi.h +++ b/arch/x86/include/asm/ipi.h | |||
@@ -119,6 +119,7 @@ static inline void | |||
119 | native_apic_mem_write(APIC_ICR, cfg); | 119 | native_apic_mem_write(APIC_ICR, cfg); |
120 | } | 120 | } |
121 | 121 | ||
122 | extern void default_send_IPI_single(int cpu, int vector); | ||
122 | extern void default_send_IPI_single_phys(int cpu, int vector); | 123 | extern void default_send_IPI_single_phys(int cpu, int vector); |
123 | extern void default_send_IPI_mask_sequence_phys(const struct cpumask *mask, | 124 | extern void default_send_IPI_mask_sequence_phys(const struct cpumask *mask, |
124 | int vector); | 125 | int vector); |
diff --git a/arch/x86/kernel/apic/ipi.c b/arch/x86/kernel/apic/ipi.c index 4fcffbf024c9..eb45fc9b6124 100644 --- a/arch/x86/kernel/apic/ipi.c +++ b/arch/x86/kernel/apic/ipi.c | |||
@@ -65,6 +65,14 @@ void default_send_IPI_mask_allbutself_phys(const struct cpumask *mask, | |||
65 | local_irq_restore(flags); | 65 | local_irq_restore(flags); |
66 | } | 66 | } |
67 | 67 | ||
68 | /* | ||
69 | * Helper function for APICs which insist on cpumasks | ||
70 | */ | ||
71 | void default_send_IPI_single(int cpu, int vector) | ||
72 | { | ||
73 | apic->send_IPI_mask(cpumask_of(cpu), vector); | ||
74 | } | ||
75 | |||
68 | #ifdef CONFIG_X86_32 | 76 | #ifdef CONFIG_X86_32 |
69 | 77 | ||
70 | void default_send_IPI_mask_sequence_logical(const struct cpumask *mask, | 78 | void default_send_IPI_mask_sequence_logical(const struct cpumask *mask, |