Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Milton Miller and committed by
Benjamin Herrenschmidt
d5a1c193 7ef71d75

+10 -10
+8 -8
arch/powerpc/platforms/cell/interrupt.c
··· 176 176 #ifdef CONFIG_SMP 177 177 178 178 /* Use the highest interrupt priorities for IPI */ 179 - static inline int iic_ipi_to_irq(int ipi) 179 + static 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 184 - void iic_cause_IPI(int cpu, int mesg) 184 + void 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 189 189 struct irq_host *iic_get_irq_host(int node) ··· 192 192 } 193 193 EXPORT_SYMBOL_GPL(iic_get_irq_host); 194 194 195 - static void iic_request_ipi(int ipi) 195 + static void iic_request_ipi(int msg) 196 196 { 197 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 200 if (virq == NO_IRQ) { 201 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 203 return; 204 204 } 205 205 ··· 207 207 * If smp_request_message_ipi encounters an error it will notify 208 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 211 irq_dispose_mapping(virq); 212 212 } 213 213
+1 -1
arch/powerpc/platforms/cell/interrupt.h
··· 75 75 }; 76 76 77 77 extern void iic_init_IRQ(void); 78 - extern void iic_cause_IPI(int cpu, int mesg); 78 + extern void iic_message_pass(int cpu, int msg); 79 79 extern void iic_request_IPIs(void); 80 80 extern void iic_setup_cpu(void); 81 81
+1 -1
arch/powerpc/platforms/cell/smp.c
··· 152 152 return 1; 153 153 } 154 154 static struct smp_ops_t bpa_iic_smp_ops = { 155 - .message_pass = iic_cause_IPI, 155 + .message_pass = iic_message_pass, 156 156 .probe = smp_iic_probe, 157 157 .kick_cpu = smp_cell_kick_cpu, 158 158 .setup_cpu = smp_cell_setup_cpu,