aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2015-03-04 19:19:17 -0500
committerRusty Russell <rusty@rustcorp.com.au>2015-03-04 23:55:06 -0500
commit8dd928915a73bf95a727a46037964243eb1e042c (patch)
tree7be1a28772bac74533f3da27ffd41e048c76b8e4
parentd089f8e97d371a662dd233491e03bda377c9d46d (diff)
mips: fix up obsolete cpu function usage.
Thanks to spatch, plus manual removal of "&*". Then a sweep for for_each_cpu_mask => for_each_cpu. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Kevin Cernekee <cernekee@gmail.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: linux-mips@linux-mips.org
-rw-r--r--arch/mips/bcm63xx/irq.c4
-rw-r--r--arch/mips/cavium-octeon/smp.c4
-rw-r--r--arch/mips/kernel/crash.c8
-rw-r--r--arch/mips/kernel/mips-mt-fpaff.c4
-rw-r--r--arch/mips/kernel/process.c2
-rw-r--r--arch/mips/kernel/smp-bmips.c2
-rw-r--r--arch/mips/kernel/smp-cmp.c4
-rw-r--r--arch/mips/kernel/smp-cps.c4
-rw-r--r--arch/mips/kernel/smp-mt.c4
-rw-r--r--arch/mips/kernel/smp.c26
-rw-r--r--arch/mips/kernel/traps.c6
-rw-r--r--arch/mips/loongson/loongson-3/numa.c4
-rw-r--r--arch/mips/loongson/loongson-3/smp.c2
-rw-r--r--arch/mips/paravirt/paravirt-smp.c2
-rw-r--r--arch/mips/sgi-ip27/ip27-init.c2
-rw-r--r--arch/mips/sgi-ip27/ip27-klnuma.c10
-rw-r--r--arch/mips/sgi-ip27/ip27-memory.c2
17 files changed, 45 insertions, 45 deletions
diff --git a/arch/mips/bcm63xx/irq.c b/arch/mips/bcm63xx/irq.c
index b94bf44d8d8e..e3e808a6c542 100644
--- a/arch/mips/bcm63xx/irq.c
+++ b/arch/mips/bcm63xx/irq.c
@@ -58,9 +58,9 @@ static inline int enable_irq_for_cpu(int cpu, struct irq_data *d,
58 58
59#ifdef CONFIG_SMP 59#ifdef CONFIG_SMP
60 if (m) 60 if (m)
61 enable &= cpu_isset(cpu, *m); 61 enable &= cpumask_test_cpu(cpu, m);
62 else if (irqd_affinity_was_set(d)) 62 else if (irqd_affinity_was_set(d))
63 enable &= cpu_isset(cpu, *d->affinity); 63 enable &= cpumask_test_cpu(cpu, d->affinity);
64#endif 64#endif
65 return enable; 65 return enable;
66} 66}
diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c
index 8b1eeffa12ed..56f5d080ef9d 100644
--- a/arch/mips/cavium-octeon/smp.c
+++ b/arch/mips/cavium-octeon/smp.c
@@ -72,7 +72,7 @@ static inline void octeon_send_ipi_mask(const struct cpumask *mask,
72{ 72{
73 unsigned int i; 73 unsigned int i;
74 74
75 for_each_cpu_mask(i, *mask) 75 for_each_cpu(i, mask)
76 octeon_send_ipi_single(i, action); 76 octeon_send_ipi_single(i, action);
77} 77}
78 78
@@ -239,7 +239,7 @@ static int octeon_cpu_disable(void)
239 return -ENOTSUPP; 239 return -ENOTSUPP;
240 240
241 set_cpu_online(cpu, false); 241 set_cpu_online(cpu, false);
242 cpu_clear(cpu, cpu_callin_map); 242 cpumask_clear_cpu(cpu, &cpu_callin_map);
243 octeon_fixup_irqs(); 243 octeon_fixup_irqs();
244 244
245 flush_cache_all(); 245 flush_cache_all();
diff --git a/arch/mips/kernel/crash.c b/arch/mips/kernel/crash.c
index d21264681e97..d434d5d5ae6e 100644
--- a/arch/mips/kernel/crash.c
+++ b/arch/mips/kernel/crash.c
@@ -25,9 +25,9 @@ static void crash_shutdown_secondary(void *ignore)
25 return; 25 return;
26 26
27 local_irq_disable(); 27 local_irq_disable();
28 if (!cpu_isset(cpu, cpus_in_crash)) 28 if (!cpumask_test_cpu(cpu, &cpus_in_crash))
29 crash_save_cpu(regs, cpu); 29 crash_save_cpu(regs, cpu);
30 cpu_set(cpu, cpus_in_crash); 30 cpumask_set_cpu(cpu, &cpus_in_crash);
31 31
32 while (!atomic_read(&kexec_ready_to_reboot)) 32 while (!atomic_read(&kexec_ready_to_reboot))
33 cpu_relax(); 33 cpu_relax();
@@ -50,7 +50,7 @@ static void crash_kexec_prepare_cpus(void)
50 */ 50 */
51 pr_emerg("Sending IPI to other cpus...\n"); 51 pr_emerg("Sending IPI to other cpus...\n");
52 msecs = 10000; 52 msecs = 10000;
53 while ((cpus_weight(cpus_in_crash) < ncpus) && (--msecs > 0)) { 53 while ((cpumask_weight(&cpus_in_crash) < ncpus) && (--msecs > 0)) {
54 cpu_relax(); 54 cpu_relax();
55 mdelay(1); 55 mdelay(1);
56 } 56 }
@@ -66,5 +66,5 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
66 crashing_cpu = smp_processor_id(); 66 crashing_cpu = smp_processor_id();
67 crash_save_cpu(regs, crashing_cpu); 67 crash_save_cpu(regs, crashing_cpu);
68 crash_kexec_prepare_cpus(); 68 crash_kexec_prepare_cpus();
69 cpu_set(crashing_cpu, cpus_in_crash); 69 cpumask_set_cpu(crashing_cpu, &cpus_in_crash);
70} 70}
diff --git a/arch/mips/kernel/mips-mt-fpaff.c b/arch/mips/kernel/mips-mt-fpaff.c
index 362bb3707e62..3e4491aa6d6b 100644
--- a/arch/mips/kernel/mips-mt-fpaff.c
+++ b/arch/mips/kernel/mips-mt-fpaff.c
@@ -114,8 +114,8 @@ asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len,
114 /* Compute new global allowed CPU set if necessary */ 114 /* Compute new global allowed CPU set if necessary */
115 ti = task_thread_info(p); 115 ti = task_thread_info(p);
116 if (test_ti_thread_flag(ti, TIF_FPUBOUND) && 116 if (test_ti_thread_flag(ti, TIF_FPUBOUND) &&
117 cpus_intersects(*new_mask, mt_fpu_cpumask)) { 117 cpumask_intersects(new_mask, &mt_fpu_cpumask)) {
118 cpus_and(*effective_mask, *new_mask, mt_fpu_cpumask); 118 cpumask_and(effective_mask, new_mask, &mt_fpu_cpumask);
119 retval = set_cpus_allowed_ptr(p, effective_mask); 119 retval = set_cpus_allowed_ptr(p, effective_mask);
120 } else { 120 } else {
121 cpumask_copy(effective_mask, new_mask); 121 cpumask_copy(effective_mask, new_mask);
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index bf85cc180d91..4501c7a4bd58 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -49,7 +49,7 @@
49void arch_cpu_idle_dead(void) 49void arch_cpu_idle_dead(void)
50{ 50{
51 /* What the heck is this check doing ? */ 51 /* What the heck is this check doing ? */
52 if (!cpu_isset(smp_processor_id(), cpu_callin_map)) 52 if (!cpumask_test_cpu(smp_processor_id(), &cpu_callin_map))
53 play_dead(); 53 play_dead();
54} 54}
55#endif 55#endif
diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c
index b8bd9340c9c7..fd528d7ea278 100644
--- a/arch/mips/kernel/smp-bmips.c
+++ b/arch/mips/kernel/smp-bmips.c
@@ -362,7 +362,7 @@ static int bmips_cpu_disable(void)
362 pr_info("SMP: CPU%d is offline\n", cpu); 362 pr_info("SMP: CPU%d is offline\n", cpu);
363 363
364 set_cpu_online(cpu, false); 364 set_cpu_online(cpu, false);
365 cpu_clear(cpu, cpu_callin_map); 365 cpumask_clear_cpu(cpu, &cpu_callin_map);
366 clear_c0_status(IE_IRQ5); 366 clear_c0_status(IE_IRQ5);
367 367
368 local_flush_tlb_all(); 368 local_flush_tlb_all();
diff --git a/arch/mips/kernel/smp-cmp.c b/arch/mips/kernel/smp-cmp.c
index e36a859af666..d5e0f949dc48 100644
--- a/arch/mips/kernel/smp-cmp.c
+++ b/arch/mips/kernel/smp-cmp.c
@@ -66,7 +66,7 @@ static void cmp_smp_finish(void)
66#ifdef CONFIG_MIPS_MT_FPAFF 66#ifdef CONFIG_MIPS_MT_FPAFF
67 /* If we have an FPU, enroll ourselves in the FPU-full mask */ 67 /* If we have an FPU, enroll ourselves in the FPU-full mask */
68 if (cpu_has_fpu) 68 if (cpu_has_fpu)
69 cpu_set(smp_processor_id(), mt_fpu_cpumask); 69 cpumask_set_cpu(smp_processor_id(), &mt_fpu_cpumask);
70#endif /* CONFIG_MIPS_MT_FPAFF */ 70#endif /* CONFIG_MIPS_MT_FPAFF */
71 71
72 local_irq_enable(); 72 local_irq_enable();
@@ -110,7 +110,7 @@ void __init cmp_smp_setup(void)
110#ifdef CONFIG_MIPS_MT_FPAFF 110#ifdef CONFIG_MIPS_MT_FPAFF
111 /* If we have an FPU, enroll ourselves in the FPU-full mask */ 111 /* If we have an FPU, enroll ourselves in the FPU-full mask */
112 if (cpu_has_fpu) 112 if (cpu_has_fpu)
113 cpu_set(0, mt_fpu_cpumask); 113 cpumask_set_cpu(0, &mt_fpu_cpumask);
114#endif /* CONFIG_MIPS_MT_FPAFF */ 114#endif /* CONFIG_MIPS_MT_FPAFF */
115 115
116 for (i = 1; i < NR_CPUS; i++) { 116 for (i = 1; i < NR_CPUS; i++) {
diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c
index bed7590e475f..b0fe93e6537e 100644
--- a/arch/mips/kernel/smp-cps.c
+++ b/arch/mips/kernel/smp-cps.c
@@ -284,7 +284,7 @@ static void cps_smp_finish(void)
284#ifdef CONFIG_MIPS_MT_FPAFF 284#ifdef CONFIG_MIPS_MT_FPAFF
285 /* If we have an FPU, enroll ourselves in the FPU-full mask */ 285 /* If we have an FPU, enroll ourselves in the FPU-full mask */
286 if (cpu_has_fpu) 286 if (cpu_has_fpu)
287 cpu_set(smp_processor_id(), mt_fpu_cpumask); 287 cpumask_set_cpu(smp_processor_id(), &mt_fpu_cpumask);
288#endif /* CONFIG_MIPS_MT_FPAFF */ 288#endif /* CONFIG_MIPS_MT_FPAFF */
289 289
290 local_irq_enable(); 290 local_irq_enable();
@@ -307,7 +307,7 @@ static int cps_cpu_disable(void)
307 atomic_sub(1 << cpu_vpe_id(&current_cpu_data), &core_cfg->vpe_mask); 307 atomic_sub(1 << cpu_vpe_id(&current_cpu_data), &core_cfg->vpe_mask);
308 smp_mb__after_atomic(); 308 smp_mb__after_atomic();
309 set_cpu_online(cpu, false); 309 set_cpu_online(cpu, false);
310 cpu_clear(cpu, cpu_callin_map); 310 cpumask_clear_cpu(cpu, &cpu_callin_map);
311 311
312 return 0; 312 return 0;
313} 313}
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c
index 17ea705f6c40..86311a164ef1 100644
--- a/arch/mips/kernel/smp-mt.c
+++ b/arch/mips/kernel/smp-mt.c
@@ -178,7 +178,7 @@ static void vsmp_smp_finish(void)
178#ifdef CONFIG_MIPS_MT_FPAFF 178#ifdef CONFIG_MIPS_MT_FPAFF
179 /* If we have an FPU, enroll ourselves in the FPU-full mask */ 179 /* If we have an FPU, enroll ourselves in the FPU-full mask */
180 if (cpu_has_fpu) 180 if (cpu_has_fpu)
181 cpu_set(smp_processor_id(), mt_fpu_cpumask); 181 cpumask_set_cpu(smp_processor_id(), &mt_fpu_cpumask);
182#endif /* CONFIG_MIPS_MT_FPAFF */ 182#endif /* CONFIG_MIPS_MT_FPAFF */
183 183
184 local_irq_enable(); 184 local_irq_enable();
@@ -239,7 +239,7 @@ static void __init vsmp_smp_setup(void)
239#ifdef CONFIG_MIPS_MT_FPAFF 239#ifdef CONFIG_MIPS_MT_FPAFF
240 /* If we have an FPU, enroll ourselves in the FPU-full mask */ 240 /* If we have an FPU, enroll ourselves in the FPU-full mask */
241 if (cpu_has_fpu) 241 if (cpu_has_fpu)
242 cpu_set(0, mt_fpu_cpumask); 242 cpumask_set_cpu(0, &mt_fpu_cpumask);
243#endif /* CONFIG_MIPS_MT_FPAFF */ 243#endif /* CONFIG_MIPS_MT_FPAFF */
244 if (!cpu_has_mipsmt) 244 if (!cpu_has_mipsmt)
245 return; 245 return;
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 1c0d8c50b7e1..357acd3ac0e6 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -75,30 +75,30 @@ static inline void set_cpu_sibling_map(int cpu)
75{ 75{
76 int i; 76 int i;
77 77
78 cpu_set(cpu, cpu_sibling_setup_map); 78 cpumask_set_cpu(cpu, &cpu_sibling_setup_map);
79 79
80 if (smp_num_siblings > 1) { 80 if (smp_num_siblings > 1) {
81 for_each_cpu_mask(i, cpu_sibling_setup_map) { 81 for_each_cpu(i, &cpu_sibling_setup_map) {
82 if (cpu_data[cpu].package == cpu_data[i].package && 82 if (cpu_data[cpu].package == cpu_data[i].package &&
83 cpu_data[cpu].core == cpu_data[i].core) { 83 cpu_data[cpu].core == cpu_data[i].core) {
84 cpu_set(i, cpu_sibling_map[cpu]); 84 cpumask_set_cpu(i, &cpu_sibling_map[cpu]);
85 cpu_set(cpu, cpu_sibling_map[i]); 85 cpumask_set_cpu(cpu, &cpu_sibling_map[i]);
86 } 86 }
87 } 87 }
88 } else 88 } else
89 cpu_set(cpu, cpu_sibling_map[cpu]); 89 cpumask_set_cpu(cpu, &cpu_sibling_map[cpu]);
90} 90}
91 91
92static inline void set_cpu_core_map(int cpu) 92static inline void set_cpu_core_map(int cpu)
93{ 93{
94 int i; 94 int i;
95 95
96 cpu_set(cpu, cpu_core_setup_map); 96 cpumask_set_cpu(cpu, &cpu_core_setup_map);
97 97
98 for_each_cpu_mask(i, cpu_core_setup_map) { 98 for_each_cpu(i, &cpu_core_setup_map) {
99 if (cpu_data[cpu].package == cpu_data[i].package) { 99 if (cpu_data[cpu].package == cpu_data[i].package) {
100 cpu_set(i, cpu_core_map[cpu]); 100 cpumask_set_cpu(i, &cpu_core_map[cpu]);
101 cpu_set(cpu, cpu_core_map[i]); 101 cpumask_set_cpu(cpu, &cpu_core_map[i]);
102 } 102 }
103 } 103 }
104} 104}
@@ -138,7 +138,7 @@ asmlinkage void start_secondary(void)
138 cpu = smp_processor_id(); 138 cpu = smp_processor_id();
139 cpu_data[cpu].udelay_val = loops_per_jiffy; 139 cpu_data[cpu].udelay_val = loops_per_jiffy;
140 140
141 cpu_set(cpu, cpu_coherent_mask); 141 cpumask_set_cpu(cpu, &cpu_coherent_mask);
142 notify_cpu_starting(cpu); 142 notify_cpu_starting(cpu);
143 143
144 set_cpu_online(cpu, true); 144 set_cpu_online(cpu, true);
@@ -146,7 +146,7 @@ asmlinkage void start_secondary(void)
146 set_cpu_sibling_map(cpu); 146 set_cpu_sibling_map(cpu);
147 set_cpu_core_map(cpu); 147 set_cpu_core_map(cpu);
148 148
149 cpu_set(cpu, cpu_callin_map); 149 cpumask_set_cpu(cpu, &cpu_callin_map);
150 150
151 synchronise_count_slave(cpu); 151 synchronise_count_slave(cpu);
152 152
@@ -210,7 +210,7 @@ void smp_prepare_boot_cpu(void)
210{ 210{
211 set_cpu_possible(0, true); 211 set_cpu_possible(0, true);
212 set_cpu_online(0, true); 212 set_cpu_online(0, true);
213 cpu_set(0, cpu_callin_map); 213 cpumask_set_cpu(0, &cpu_callin_map);
214} 214}
215 215
216int __cpu_up(unsigned int cpu, struct task_struct *tidle) 216int __cpu_up(unsigned int cpu, struct task_struct *tidle)
@@ -220,7 +220,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
220 /* 220 /*
221 * Trust is futile. We should really have timeouts ... 221 * Trust is futile. We should really have timeouts ...
222 */ 222 */
223 while (!cpu_isset(cpu, cpu_callin_map)) 223 while (!cpumask_test_cpu(cpu, &cpu_callin_map))
224 udelay(100); 224 udelay(100);
225 225
226 synchronise_count_master(cpu); 226 synchronise_count_master(cpu);
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 33984c04b60b..b05b9462c728 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -1121,13 +1121,13 @@ static void mt_ase_fp_affinity(void)
1121 * restricted the allowed set to exclude any CPUs with FPUs, 1121 * restricted the allowed set to exclude any CPUs with FPUs,
1122 * we'll skip the procedure. 1122 * we'll skip the procedure.
1123 */ 1123 */
1124 if (cpus_intersects(current->cpus_allowed, mt_fpu_cpumask)) { 1124 if (cpumask_intersects(&current->cpus_allowed, &mt_fpu_cpumask)) {
1125 cpumask_t tmask; 1125 cpumask_t tmask;
1126 1126
1127 current->thread.user_cpus_allowed 1127 current->thread.user_cpus_allowed
1128 = current->cpus_allowed; 1128 = current->cpus_allowed;
1129 cpus_and(tmask, current->cpus_allowed, 1129 cpumask_and(&tmask, &current->cpus_allowed,
1130 mt_fpu_cpumask); 1130 &mt_fpu_cpumask);
1131 set_cpus_allowed_ptr(current, &tmask); 1131 set_cpus_allowed_ptr(current, &tmask);
1132 set_thread_flag(TIF_FPUBOUND); 1132 set_thread_flag(TIF_FPUBOUND);
1133 } 1133 }
diff --git a/arch/mips/loongson/loongson-3/numa.c b/arch/mips/loongson/loongson-3/numa.c
index 6cae0e75de27..12d14ed48778 100644
--- a/arch/mips/loongson/loongson-3/numa.c
+++ b/arch/mips/loongson/loongson-3/numa.c
@@ -233,7 +233,7 @@ static __init void prom_meminit(void)
233 if (node_online(node)) { 233 if (node_online(node)) {
234 szmem(node); 234 szmem(node);
235 node_mem_init(node); 235 node_mem_init(node);
236 cpus_clear(__node_data[(node)]->cpumask); 236 cpumask_clear(&__node_data[(node)]->cpumask);
237 } 237 }
238 } 238 }
239 for (cpu = 0; cpu < loongson_sysconf.nr_cpus; cpu++) { 239 for (cpu = 0; cpu < loongson_sysconf.nr_cpus; cpu++) {
@@ -244,7 +244,7 @@ static __init void prom_meminit(void)
244 if (loongson_sysconf.reserved_cpus_mask & (1<<cpu)) 244 if (loongson_sysconf.reserved_cpus_mask & (1<<cpu))
245 continue; 245 continue;
246 246
247 cpu_set(active_cpu, __node_data[(node)]->cpumask); 247 cpumask_set_cpu(active_cpu, &__node_data[(node)]->cpumask);
248 pr_info("NUMA: set cpumask cpu %d on node %d\n", active_cpu, node); 248 pr_info("NUMA: set cpumask cpu %d on node %d\n", active_cpu, node);
249 249
250 active_cpu++; 250 active_cpu++;
diff --git a/arch/mips/loongson/loongson-3/smp.c b/arch/mips/loongson/loongson-3/smp.c
index e2eb688b5434..e3c68b5da18d 100644
--- a/arch/mips/loongson/loongson-3/smp.c
+++ b/arch/mips/loongson/loongson-3/smp.c
@@ -408,7 +408,7 @@ static int loongson3_cpu_disable(void)
408 return -EBUSY; 408 return -EBUSY;
409 409
410 set_cpu_online(cpu, false); 410 set_cpu_online(cpu, false);
411 cpu_clear(cpu, cpu_callin_map); 411 cpumask_clear_cpu(cpu, &cpu_callin_map);
412 local_irq_save(flags); 412 local_irq_save(flags);
413 fixup_irqs(); 413 fixup_irqs();
414 local_irq_restore(flags); 414 local_irq_restore(flags);
diff --git a/arch/mips/paravirt/paravirt-smp.c b/arch/mips/paravirt/paravirt-smp.c
index 0164b0c48352..42181c7105df 100644
--- a/arch/mips/paravirt/paravirt-smp.c
+++ b/arch/mips/paravirt/paravirt-smp.c
@@ -75,7 +75,7 @@ static void paravirt_send_ipi_mask(const struct cpumask *mask, unsigned int acti
75{ 75{
76 unsigned int cpu; 76 unsigned int cpu;
77 77
78 for_each_cpu_mask(cpu, *mask) 78 for_each_cpu(cpu, mask)
79 paravirt_send_ipi_single(cpu, action); 79 paravirt_send_ipi_single(cpu, action);
80} 80}
81 81
diff --git a/arch/mips/sgi-ip27/ip27-init.c b/arch/mips/sgi-ip27/ip27-init.c
index ee736bd103f8..570098bfdf87 100644
--- a/arch/mips/sgi-ip27/ip27-init.c
+++ b/arch/mips/sgi-ip27/ip27-init.c
@@ -60,7 +60,7 @@ static void per_hub_init(cnodeid_t cnode)
60 nasid_t nasid = COMPACT_TO_NASID_NODEID(cnode); 60 nasid_t nasid = COMPACT_TO_NASID_NODEID(cnode);
61 int i; 61 int i;
62 62
63 cpu_set(smp_processor_id(), hub->h_cpus); 63 cpumask_set_cpu(smp_processor_id(), &hub->h_cpus);
64 64
65 if (test_and_set_bit(cnode, hub_init_mask)) 65 if (test_and_set_bit(cnode, hub_init_mask))
66 return; 66 return;
diff --git a/arch/mips/sgi-ip27/ip27-klnuma.c b/arch/mips/sgi-ip27/ip27-klnuma.c
index ecbb62f339c5..bda90cf87e8c 100644
--- a/arch/mips/sgi-ip27/ip27-klnuma.c
+++ b/arch/mips/sgi-ip27/ip27-klnuma.c
@@ -29,8 +29,8 @@ static cpumask_t ktext_repmask;
29void __init setup_replication_mask(void) 29void __init setup_replication_mask(void)
30{ 30{
31 /* Set only the master cnode's bit. The master cnode is always 0. */ 31 /* Set only the master cnode's bit. The master cnode is always 0. */
32 cpus_clear(ktext_repmask); 32 cpumask_clear(&ktext_repmask);
33 cpu_set(0, ktext_repmask); 33 cpumask_set_cpu(0, &ktext_repmask);
34 34
35#ifdef CONFIG_REPLICATE_KTEXT 35#ifdef CONFIG_REPLICATE_KTEXT
36#ifndef CONFIG_MAPPED_KERNEL 36#ifndef CONFIG_MAPPED_KERNEL
@@ -43,7 +43,7 @@ void __init setup_replication_mask(void)
43 if (cnode == 0) 43 if (cnode == 0)
44 continue; 44 continue;
45 /* Advertise that we have a copy of the kernel */ 45 /* Advertise that we have a copy of the kernel */
46 cpu_set(cnode, ktext_repmask); 46 cpumask_set_cpu(cnode, &ktext_repmask);
47 } 47 }
48 } 48 }
49#endif 49#endif
@@ -99,7 +99,7 @@ void __init replicate_kernel_text()
99 client_nasid = COMPACT_TO_NASID_NODEID(cnode); 99 client_nasid = COMPACT_TO_NASID_NODEID(cnode);
100 100
101 /* Check if this node should get a copy of the kernel */ 101 /* Check if this node should get a copy of the kernel */
102 if (cpu_isset(cnode, ktext_repmask)) { 102 if (cpumask_test_cpu(cnode, &ktext_repmask)) {
103 server_nasid = client_nasid; 103 server_nasid = client_nasid;
104 copy_kernel(server_nasid); 104 copy_kernel(server_nasid);
105 } 105 }
@@ -124,7 +124,7 @@ unsigned long node_getfirstfree(cnodeid_t cnode)
124 loadbase += 16777216; 124 loadbase += 16777216;
125#endif 125#endif
126 offset = PAGE_ALIGN((unsigned long)(&_end)) - loadbase; 126 offset = PAGE_ALIGN((unsigned long)(&_end)) - loadbase;
127 if ((cnode == 0) || (cpu_isset(cnode, ktext_repmask))) 127 if ((cnode == 0) || (cpumask_test_cpu(cnode, &ktext_repmask)))
128 return TO_NODE(nasid, offset) >> PAGE_SHIFT; 128 return TO_NODE(nasid, offset) >> PAGE_SHIFT;
129 else 129 else
130 return KDM_TO_PHYS(PAGE_ALIGN(SYMMON_STK_ADDR(nasid, 0))) >> PAGE_SHIFT; 130 return KDM_TO_PHYS(PAGE_ALIGN(SYMMON_STK_ADDR(nasid, 0))) >> PAGE_SHIFT;
diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c
index 0b68469e063f..8d0eb2643248 100644
--- a/arch/mips/sgi-ip27/ip27-memory.c
+++ b/arch/mips/sgi-ip27/ip27-memory.c
@@ -404,7 +404,7 @@ static void __init node_mem_init(cnodeid_t node)
404 NODE_DATA(node)->node_start_pfn = start_pfn; 404 NODE_DATA(node)->node_start_pfn = start_pfn;
405 NODE_DATA(node)->node_spanned_pages = end_pfn - start_pfn; 405 NODE_DATA(node)->node_spanned_pages = end_pfn - start_pfn;
406 406
407 cpus_clear(hub_data(node)->h_cpus); 407 cpumask_clear(&hub_data(node)->h_cpus);
408 408
409 slot_freepfn += PFN_UP(sizeof(struct pglist_data) + 409 slot_freepfn += PFN_UP(sizeof(struct pglist_data) +
410 sizeof(struct hub_data)); 410 sizeof(struct hub_data));