aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-20 13:19:03 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-20 13:19:03 -0400
commit6496edfce95f943e1da43631c2f437509e56af7f (patch)
tree6b6e3b6bcc74c038b707a2facf45ee98fd61544e /arch/mips/kernel
parentb19a42e3cb9e73cad59e60ab7403e5afe7f4b262 (diff)
parente4afa120c98252e44390067c3a6cc775cde30659 (diff)
Merge tag 'cpumask-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux
Pull final removal of deprecated cpus_* cpumask functions from Rusty Russell: "This is the final removal (after several years!) of the obsolete cpus_* functions, prompted by their mis-use in staging. With these function removed, all cpu functions should only iterate to nr_cpu_ids, so we finally only allocate that many bits when cpumasks are allocated offstack" * tag 'cpumask-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (25 commits) cpumask: remove __first_cpu / __next_cpu cpumask: resurrect CPU_MASK_CPU0 linux/cpumask.h: add typechecking to cpumask_test_cpu cpumask: only allocate nr_cpumask_bits. Fix weird uses of num_online_cpus(). cpumask: remove deprecated functions. mips: fix obsolete cpumask_of_cpu usage. x86: fix more deprecated cpu function usage. ia64: remove deprecated cpus_ usage. powerpc: fix deprecated CPU_MASK_CPU0 usage. CPU_MASK_ALL/CPU_MASK_NONE: remove from deprecated region. staging/lustre/o2iblnd: Don't use cpus_weight staging/lustre/libcfs: replace deprecated cpus_ calls with cpumask_ staging/lustre/ptlrpc: Do not use deprecated cpus_* functions blackfin: fix up obsolete cpu function usage. parisc: fix up obsolete cpu function usage. tile: fix up obsolete cpu function usage. arm64: fix up obsolete cpu function usage. mips: fix up obsolete cpu function usage. x86: fix up obsolete cpu function usage. ...
Diffstat (limited to 'arch/mips/kernel')
-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
9 files changed, 30 insertions, 30 deletions
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 d295bd1e4996..f2975d4d1e44 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 d5589bedd0a4..7e011f95bb8e 100644
--- a/arch/mips/kernel/smp-cps.c
+++ b/arch/mips/kernel/smp-cps.c
@@ -290,7 +290,7 @@ static void cps_smp_finish(void)
290#ifdef CONFIG_MIPS_MT_FPAFF 290#ifdef CONFIG_MIPS_MT_FPAFF
291 /* If we have an FPU, enroll ourselves in the FPU-full mask */ 291 /* If we have an FPU, enroll ourselves in the FPU-full mask */
292 if (cpu_has_fpu) 292 if (cpu_has_fpu)
293 cpu_set(smp_processor_id(), mt_fpu_cpumask); 293 cpumask_set_cpu(smp_processor_id(), &mt_fpu_cpumask);
294#endif /* CONFIG_MIPS_MT_FPAFF */ 294#endif /* CONFIG_MIPS_MT_FPAFF */
295 295
296 local_irq_enable(); 296 local_irq_enable();
@@ -313,7 +313,7 @@ static int cps_cpu_disable(void)
313 atomic_sub(1 << cpu_vpe_id(&current_cpu_data), &core_cfg->vpe_mask); 313 atomic_sub(1 << cpu_vpe_id(&current_cpu_data), &core_cfg->vpe_mask);
314 smp_mb__after_atomic(); 314 smp_mb__after_atomic();
315 set_cpu_online(cpu, false); 315 set_cpu_online(cpu, false);
316 cpu_clear(cpu, cpu_callin_map); 316 cpumask_clear_cpu(cpu, &cpu_callin_map);
317 317
318 return 0; 318 return 0;
319} 319}
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 5b020bda3e05..193ace7955fb 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
@@ -208,7 +208,7 @@ void smp_prepare_boot_cpu(void)
208{ 208{
209 set_cpu_possible(0, true); 209 set_cpu_possible(0, true);
210 set_cpu_online(0, true); 210 set_cpu_online(0, true);
211 cpu_set(0, cpu_callin_map); 211 cpumask_set_cpu(0, &cpu_callin_map);
212} 212}
213 213
214int __cpu_up(unsigned int cpu, struct task_struct *tidle) 214int __cpu_up(unsigned int cpu, struct task_struct *tidle)
@@ -218,7 +218,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
218 /* 218 /*
219 * Trust is futile. We should really have timeouts ... 219 * Trust is futile. We should really have timeouts ...
220 */ 220 */
221 while (!cpu_isset(cpu, cpu_callin_map)) 221 while (!cpumask_test_cpu(cpu, &cpu_callin_map))
222 udelay(100); 222 udelay(100);
223 223
224 synchronise_count_master(cpu); 224 synchronise_count_master(cpu);
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index e334c641a81b..ba32e48d4697 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -1153,13 +1153,13 @@ static void mt_ase_fp_affinity(void)
1153 * restricted the allowed set to exclude any CPUs with FPUs, 1153 * restricted the allowed set to exclude any CPUs with FPUs,
1154 * we'll skip the procedure. 1154 * we'll skip the procedure.
1155 */ 1155 */
1156 if (cpus_intersects(current->cpus_allowed, mt_fpu_cpumask)) { 1156 if (cpumask_intersects(&current->cpus_allowed, &mt_fpu_cpumask)) {
1157 cpumask_t tmask; 1157 cpumask_t tmask;
1158 1158
1159 current->thread.user_cpus_allowed 1159 current->thread.user_cpus_allowed
1160 = current->cpus_allowed; 1160 = current->cpus_allowed;
1161 cpus_and(tmask, current->cpus_allowed, 1161 cpumask_and(&tmask, &current->cpus_allowed,
1162 mt_fpu_cpumask); 1162 &mt_fpu_cpumask);
1163 set_cpus_allowed_ptr(current, &tmask); 1163 set_cpus_allowed_ptr(current, &tmask);
1164 set_thread_flag(TIF_FPUBOUND); 1164 set_thread_flag(TIF_FPUBOUND);
1165 } 1165 }