cpumask: arch_send_call_function_ipi_mask: mips
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 24 Sep 2009 15:34:44 +0000 (09:34 -0600)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 24 Sep 2009 00:04:45 +0000 (09:34 +0930)
We're weaning the core code off handing cpumask's around on-stack.
This introduces arch_send_call_function_ipi_mask(), and by defining
it, the old arch_send_call_function_ipi is defined by the core code.

We also take the chance to wean the implementations off the
obsolescent for_each_cpu_mask(): making send_ipi_mask take the pointer
seemed the most natural way to ensure all implementations used
for_each_cpu.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 files changed:
arch/mips/include/asm/smp-ops.h
arch/mips/include/asm/smp.h
arch/mips/kernel/smp-cmp.c
arch/mips/kernel/smp-mt.c
arch/mips/kernel/smp-up.c
arch/mips/kernel/smp.c
arch/mips/mipssim/sim_smtc.c
arch/mips/mti-malta/malta-smtc.c
arch/mips/pmc-sierra/yosemite/smp.c
arch/mips/sgi-ip27/ip27-smp.c
arch/mips/sibyte/bcm1480/smp.c
arch/mips/sibyte/sb1250/smp.c

index fd54554..9e09af3 100644 (file)
@@ -19,7 +19,7 @@ struct task_struct;
 
 struct plat_smp_ops {
        void (*send_ipi_single)(int cpu, unsigned int action);
-       void (*send_ipi_mask)(cpumask_t mask, unsigned int action);
+       void (*send_ipi_mask)(const struct cpumask *mask, unsigned int action);
        void (*init_secondary)(void);
        void (*smp_finish)(void);
        void (*cpus_done)(void);
index aaa2d4a..48c1967 100644 (file)
@@ -78,6 +78,7 @@ extern void play_dead(void);
 extern asmlinkage void smp_call_function_interrupt(void);
 
 extern void arch_send_call_function_single_ipi(int cpu);
-extern void arch_send_call_function_ipi(cpumask_t mask);
+extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
+#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
 
 #endif /* __ASM_SMP_H */
index ad0ff5d..e5cf5b8 100644 (file)
@@ -80,11 +80,11 @@ void cmp_send_ipi_single(int cpu, unsigned int action)
        local_irq_restore(flags);
 }
 
-static void cmp_send_ipi_mask(cpumask_t mask, unsigned int action)
+static void cmp_send_ipi_mask(const struct cpumask *mask, unsigned int action)
 {
        unsigned int i;
 
-       for_each_cpu_mask(i, mask)
+       for_each_cpu(i, mask)
                cmp_send_ipi_single(i, action);
 }
 
index 6f7ee5a..9538ca4 100644 (file)
@@ -141,11 +141,11 @@ static void vsmp_send_ipi_single(int cpu, unsigned int action)
        local_irq_restore(flags);
 }
 
-static void vsmp_send_ipi_mask(cpumask_t mask, unsigned int action)
+static void vsmp_send_ipi_mask(const struct cpumask *mask, unsigned int action)
 {
        unsigned int i;
 
-       for_each_cpu_mask(i, mask)
+       for_each_cpu(i, mask)
                vsmp_send_ipi_single(i, action);
 }
 
index 2508d55..00500fe 100644 (file)
@@ -18,7 +18,8 @@ static void up_send_ipi_single(int cpu, unsigned int action)
        panic(KERN_ERR "%s called", __func__);
 }
 
-static inline void up_send_ipi_mask(cpumask_t mask, unsigned int action)
+static inline void up_send_ipi_mask(const struct cpumask *mask,
+                                   unsigned int action)
 {
        panic(KERN_ERR "%s called", __func__);
 }
index 64668a9..df2ace9 100644 (file)
@@ -128,7 +128,7 @@ asmlinkage __cpuinit void start_secondary(void)
        cpu_idle();
 }
 
-void arch_send_call_function_ipi(cpumask_t mask)
+void arch_send_call_function_ipi_mask(const struct cpumask *mask)
 {
        mp_ops->send_ipi_mask(mask, SMP_CALL_FUNCTION);
 }
index d6e4f65..5da30b6 100644 (file)
@@ -43,11 +43,12 @@ static void ssmtc_send_ipi_single(int cpu, unsigned int action)
        /* "CPU" may be TC of same VPE, VPE of same CPU, or different CPU */
 }
 
-static inline void ssmtc_send_ipi_mask(cpumask_t mask, unsigned int action)
+static inline void ssmtc_send_ipi_mask(const struct cpumask *mask,
+                                      unsigned int action)
 {
        unsigned int i;
 
-       for_each_cpu_mask(i, mask)
+       for_each_cpu(i, mask)
                ssmtc_send_ipi_single(i, action);
 }
 
index 499ffe5..192cfd2 100644 (file)
@@ -21,11 +21,11 @@ static void msmtc_send_ipi_single(int cpu, unsigned int action)
        smtc_send_ipi(cpu, LINUX_SMP_IPI, action);
 }
 
-static void msmtc_send_ipi_mask(cpumask_t mask, unsigned int action)
+static void msmtc_send_ipi_mask(const struct cpumask *mask, unsigned int action)
 {
        unsigned int i;
 
-       for_each_cpu_mask(i, mask)
+       for_each_cpu(i, mask)
                msmtc_send_ipi_single(i, action);
 }
 
index 8ace277..326fe7a 100644 (file)
@@ -97,11 +97,11 @@ static void yos_send_ipi_single(int cpu, unsigned int action)
        }
 }
 
-static void yos_send_ipi_mask(cpumask_t mask, unsigned int action)
+static void yos_send_ipi_mask(const struct cpumask *mask, unsigned int action)
 {
        unsigned int i;
 
-       for_each_cpu_mask(i, mask)
+       for_each_cpu(i, mask)
                yos_send_ipi_single(i, action);
 }
 
index cbcd7eb..9aa8f29 100644 (file)
@@ -165,11 +165,11 @@ static void ip27_send_ipi_single(int destid, unsigned int action)
        REMOTE_HUB_SEND_INTR(COMPACT_TO_NASID_NODEID(cpu_to_node(destid)), irq);
 }
 
-static void ip27_send_ipi_mask(cpumask_t mask, unsigned int action)
+static void ip27_send_ipi(const struct cpumask *mask, unsigned int action)
 {
        unsigned int i;
 
-       for_each_cpu_mask(i, mask)
+       for_each_cpu(i, mask)
                ip27_send_ipi_single(i, action);
 }
 
index 3146916..47b347c 100644 (file)
@@ -82,11 +82,12 @@ static void bcm1480_send_ipi_single(int cpu, unsigned int action)
        __raw_writeq((((u64)action)<< 48), mailbox_0_set_regs[cpu]);
 }
 
-static void bcm1480_send_ipi_mask(cpumask_t mask, unsigned int action)
+static void bcm1480_send_ipi_mask(const struct cpumask *mask,
+                                 unsigned int action)
 {
        unsigned int i;
 
-       for_each_cpu_mask(i, mask)
+       for_each_cpu(i, mask)
                bcm1480_send_ipi_single(i, action);
 }
 
index cad1400..c00a5cb 100644 (file)
@@ -70,11 +70,12 @@ static void sb1250_send_ipi_single(int cpu, unsigned int action)
        __raw_writeq((((u64)action) << 48), mailbox_set_regs[cpu]);
 }
 
-static inline void sb1250_send_ipi_mask(cpumask_t mask, unsigned int action)
+static inline void sb1250_send_ipi_mask(const struct cpumask *mask,
+                                       unsigned int action)
 {
        unsigned int i;
 
-       for_each_cpu_mask(i, mask)
+       for_each_cpu(i, mask)
                sb1250_send_ipi_single(i, action);
 }