aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/cputhreads.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/include/asm/cputhreads.h')
-rw-r--r--arch/powerpc/include/asm/cputhreads.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/powerpc/include/asm/cputhreads.h b/arch/powerpc/include/asm/cputhreads.h
index f71bb4c118b4..ce516e5eb0d3 100644
--- a/arch/powerpc/include/asm/cputhreads.h
+++ b/arch/powerpc/include/asm/cputhreads.h
@@ -37,16 +37,16 @@ extern cpumask_t threads_core_mask;
37 * This can typically be used for things like IPI for tlb invalidations 37 * This can typically be used for things like IPI for tlb invalidations
38 * since those need to be done only once per core/TLB 38 * since those need to be done only once per core/TLB
39 */ 39 */
40static inline cpumask_t cpu_thread_mask_to_cores(cpumask_t threads) 40static inline cpumask_t cpu_thread_mask_to_cores(const struct cpumask *threads)
41{ 41{
42 cpumask_t tmp, res; 42 cpumask_t tmp, res;
43 int i; 43 int i;
44 44
45 res = CPU_MASK_NONE; 45 cpumask_clear(&res);
46 for (i = 0; i < NR_CPUS; i += threads_per_core) { 46 for (i = 0; i < NR_CPUS; i += threads_per_core) {
47 cpus_shift_left(tmp, threads_core_mask, i); 47 cpumask_shift_left(&tmp, &threads_core_mask, i);
48 if (cpus_intersects(threads, tmp)) 48 if (cpumask_intersects(threads, &tmp))
49 cpu_set(i, res); 49 cpumask_set_cpu(i, &res);
50 } 50 }
51 return res; 51 return res;
52} 52}
@@ -58,7 +58,7 @@ static inline int cpu_nr_cores(void)
58 58
59static inline cpumask_t cpu_online_cores_map(void) 59static inline cpumask_t cpu_online_cores_map(void)
60{ 60{
61 return cpu_thread_mask_to_cores(cpu_online_map); 61 return cpu_thread_mask_to_cores(cpu_online_mask);
62} 62}
63 63
64#ifdef CONFIG_SMP 64#ifdef CONFIG_SMP