aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorMilton Miller <miltonm@bga.com>2011-05-24 16:34:18 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-05-25 23:38:58 -0400
commitd5a1c1937090d72c08c72e8abaa906b26459608e (patch)
treec76aca30793f0234fb9a6853d3d16ffa903b09b7 /arch/powerpc
parent7ef71d753ea0286bfeb4251b9ba592716ebdd9e8 (diff)
powerpc/cell: Rename ipi functions to match current abstractions
Rename functions and arguments to reflect current usage. iic_cause_ipi becomes iic_message_pass and iic_ipi_to_irq becomes iic_msg_to_irq, and iic_request_ipi now takes a message (msg) instead of an ipi number. Also mesg is renamed to msg. Commit f1072939b6 (powerpc: Remove checks for MSG_ALL and MSG_ALL_BUT_SELF) connected the smp_message_pass hook for cell to the underlying iic_cause_IPI, a platform unique name. Later 23d72bfd8f (powerpc: Consolidate ipi message mux and demux) added a cause_ipi hook to the smp_ops, also used in message passing, but for controllers that can not send 4 unique messages and require multiplexing. It is even more confusing that the both take two arguments, but one is the small message ordinal and the other is an opaque long data associated with the cpu. Since cell iic maps messages one to one to ipi irqs, rename the function and argument to translate from ipi to message. Also make it clear that iic_request_ipi takes a message number as the argument for which ipi to create and request. No functionional change, just renames to avoid future confusion. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/cell/interrupt.c16
-rw-r--r--arch/powerpc/platforms/cell/interrupt.h2
-rw-r--r--arch/powerpc/platforms/cell/smp.c2
3 files changed, 10 insertions, 10 deletions
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c
index 4469be609a31..3e4eba603e6b 100644
--- a/arch/powerpc/platforms/cell/interrupt.c
+++ b/arch/powerpc/platforms/cell/interrupt.c
@@ -176,14 +176,14 @@ EXPORT_SYMBOL_GPL(iic_get_target_id);
176#ifdef CONFIG_SMP 176#ifdef CONFIG_SMP
177 177
178/* Use the highest interrupt priorities for IPI */ 178/* Use the highest interrupt priorities for IPI */
179static inline int iic_ipi_to_irq(int ipi) 179static inline int iic_msg_to_irq(int msg)
180{ 180{
181 return IIC_IRQ_TYPE_IPI + 0xf - ipi; 181 return IIC_IRQ_TYPE_IPI + 0xf - msg;
182} 182}
183 183
184void iic_cause_IPI(int cpu, int mesg) 184void iic_message_pass(int cpu, int msg)
185{ 185{
186 out_be64(&per_cpu(cpu_iic, cpu).regs->generate, (0xf - mesg) << 4); 186 out_be64(&per_cpu(cpu_iic, cpu).regs->generate, (0xf - msg) << 4);
187} 187}
188 188
189struct irq_host *iic_get_irq_host(int node) 189struct irq_host *iic_get_irq_host(int node)
@@ -192,14 +192,14 @@ struct irq_host *iic_get_irq_host(int node)
192} 192}
193EXPORT_SYMBOL_GPL(iic_get_irq_host); 193EXPORT_SYMBOL_GPL(iic_get_irq_host);
194 194
195static void iic_request_ipi(int ipi) 195static void iic_request_ipi(int msg)
196{ 196{
197 int virq; 197 int virq;
198 198
199 virq = irq_create_mapping(iic_host, iic_ipi_to_irq(ipi)); 199 virq = irq_create_mapping(iic_host, iic_msg_to_irq(msg));
200 if (virq == NO_IRQ) { 200 if (virq == NO_IRQ) {
201 printk(KERN_ERR 201 printk(KERN_ERR
202 "iic: failed to map IPI %s\n", smp_ipi_name[ipi]); 202 "iic: failed to map IPI %s\n", smp_ipi_name[msg]);
203 return; 203 return;
204 } 204 }
205 205
@@ -207,7 +207,7 @@ static void iic_request_ipi(int ipi)
207 * If smp_request_message_ipi encounters an error it will notify 207 * If smp_request_message_ipi encounters an error it will notify
208 * the error. If a message is not needed it will return non-zero. 208 * the error. If a message is not needed it will return non-zero.
209 */ 209 */
210 if (smp_request_message_ipi(virq, ipi)) 210 if (smp_request_message_ipi(virq, msg))
211 irq_dispose_mapping(virq); 211 irq_dispose_mapping(virq);
212} 212}
213 213
diff --git a/arch/powerpc/platforms/cell/interrupt.h b/arch/powerpc/platforms/cell/interrupt.h
index 942dc39d6045..4f60ae6ca358 100644
--- a/arch/powerpc/platforms/cell/interrupt.h
+++ b/arch/powerpc/platforms/cell/interrupt.h
@@ -75,7 +75,7 @@ enum {
75}; 75};
76 76
77extern void iic_init_IRQ(void); 77extern void iic_init_IRQ(void);
78extern void iic_cause_IPI(int cpu, int mesg); 78extern void iic_message_pass(int cpu, int msg);
79extern void iic_request_IPIs(void); 79extern void iic_request_IPIs(void);
80extern void iic_setup_cpu(void); 80extern void iic_setup_cpu(void);
81 81
diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c
index d176e6148e3f..dbb641ea90dd 100644
--- a/arch/powerpc/platforms/cell/smp.c
+++ b/arch/powerpc/platforms/cell/smp.c
@@ -152,7 +152,7 @@ static int smp_cell_cpu_bootable(unsigned int nr)
152 return 1; 152 return 1;
153} 153}
154static struct smp_ops_t bpa_iic_smp_ops = { 154static struct smp_ops_t bpa_iic_smp_ops = {
155 .message_pass = iic_cause_IPI, 155 .message_pass = iic_message_pass,
156 .probe = smp_iic_probe, 156 .probe = smp_iic_probe,
157 .kick_cpu = smp_cell_kick_cpu, 157 .kick_cpu = smp_cell_kick_cpu,
158 .setup_cpu = smp_cell_setup_cpu, 158 .setup_cpu = smp_cell_setup_cpu,