aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/ipi.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/ipi.h')
-rw-r--r--arch/x86/include/asm/ipi.h38
1 files changed, 20 insertions, 18 deletions
diff --git a/arch/x86/include/asm/ipi.h b/arch/x86/include/asm/ipi.h
index c745a306f7d3..a8d717f2c7e7 100644
--- a/arch/x86/include/asm/ipi.h
+++ b/arch/x86/include/asm/ipi.h
@@ -55,8 +55,9 @@ static inline void __xapic_wait_icr_idle(void)
55 cpu_relax(); 55 cpu_relax();
56} 56}
57 57
58static inline void __send_IPI_shortcut(unsigned int shortcut, int vector, 58static inline void
59 unsigned int dest) 59__default_send_IPI_shortcut(unsigned int shortcut,
60 int vector, unsigned int dest)
60{ 61{
61 /* 62 /*
62 * Subtle. In the case of the 'never do double writes' workaround 63 * Subtle. In the case of the 'never do double writes' workaround
@@ -87,8 +88,8 @@ static inline void __send_IPI_shortcut(unsigned int shortcut, int vector,
87 * This is used to send an IPI with no shorthand notation (the destination is 88 * This is used to send an IPI with no shorthand notation (the destination is
88 * specified in bits 56 to 63 of the ICR). 89 * specified in bits 56 to 63 of the ICR).
89 */ 90 */
90static inline void __send_IPI_dest_field(unsigned int mask, int vector, 91static inline void
91 unsigned int dest) 92 __default_send_IPI_dest_field(unsigned int mask, int vector, unsigned int dest)
92{ 93{
93 unsigned long cfg; 94 unsigned long cfg;
94 95
@@ -117,11 +118,11 @@ static inline void __send_IPI_dest_field(unsigned int mask, int vector,
117 native_apic_mem_write(APIC_ICR, cfg); 118 native_apic_mem_write(APIC_ICR, cfg);
118} 119}
119 120
120static inline void send_IPI_mask_sequence(const struct cpumask *mask, 121static inline void
121 int vector) 122default_send_IPI_mask_sequence(const struct cpumask *mask, int vector)
122{ 123{
123 unsigned long flags;
124 unsigned long query_cpu; 124 unsigned long query_cpu;
125 unsigned long flags;
125 126
126 /* 127 /*
127 * Hack. The clustered APIC addressing mode doesn't allow us to send 128 * Hack. The clustered APIC addressing mode doesn't allow us to send
@@ -130,27 +131,28 @@ static inline void send_IPI_mask_sequence(const struct cpumask *mask,
130 */ 131 */
131 local_irq_save(flags); 132 local_irq_save(flags);
132 for_each_cpu(query_cpu, mask) { 133 for_each_cpu(query_cpu, mask) {
133 __send_IPI_dest_field(per_cpu(x86_cpu_to_apicid, query_cpu), 134 __default_send_IPI_dest_field(per_cpu(x86_cpu_to_apicid,
134 vector, APIC_DEST_PHYSICAL); 135 query_cpu), vector, APIC_DEST_PHYSICAL);
135 } 136 }
136 local_irq_restore(flags); 137 local_irq_restore(flags);
137} 138}
138 139
139static inline void send_IPI_mask_allbutself(const struct cpumask *mask, 140static inline void
140 int vector) 141default_send_IPI_mask_allbutself(const struct cpumask *mask, int vector)
141{ 142{
142 unsigned long flags;
143 unsigned int query_cpu;
144 unsigned int this_cpu = smp_processor_id(); 143 unsigned int this_cpu = smp_processor_id();
144 unsigned int query_cpu;
145 unsigned long flags;
145 146
146 /* See Hack comment above */ 147 /* See Hack comment above */
147 148
148 local_irq_save(flags); 149 local_irq_save(flags);
149 for_each_cpu(query_cpu, mask) 150 for_each_cpu(query_cpu, mask) {
150 if (query_cpu != this_cpu) 151 if (query_cpu == this_cpu)
151 __send_IPI_dest_field( 152 continue;
152 per_cpu(x86_cpu_to_apicid, query_cpu), 153 __default_send_IPI_dest_field(per_cpu(x86_cpu_to_apicid,
153 vector, APIC_DEST_PHYSICAL); 154 query_cpu), vector, APIC_DEST_PHYSICAL);
155 }
154 local_irq_restore(flags); 156 local_irq_restore(flags);
155} 157}
156 158