Lines Matching +full:cpu +full:- +full:core
1 /* SPDX-License-Identifier: GPL-2.0 */
13 * threads per core and the same number for each core in the system
15 * as the CPU numbers are still allocated, just not brought online).
35 /* cpu_thread_mask_to_cores - Return a cpumask of one per cores
40 * This function returns a cpumask which will have one online cpu's
41 * bit set for each core that has at least one thread set in the argument.
44 * since those need to be done only once per core/TLB
49 int i, cpu; in cpu_thread_mask_to_cores() local
55 cpu = cpumask_next_and(-1, &tmp, cpu_online_mask); in cpu_thread_mask_to_cores()
56 if (cpu < nr_cpu_ids) in cpu_thread_mask_to_cores()
57 cpumask_set_cpu(cpu, &res); in cpu_thread_mask_to_cores()
74 int cpu_core_index_of_thread(int cpu);
75 int cpu_first_thread_of_core(int core);
77 static inline int cpu_core_index_of_thread(int cpu) { return cpu; } in cpu_core_index_of_thread() argument
78 static inline int cpu_first_thread_of_core(int core) { return core; } in cpu_first_thread_of_core() argument
81 static inline int cpu_thread_in_core(int cpu) in cpu_thread_in_core() argument
83 return cpu & (threads_per_core - 1); in cpu_thread_in_core()
86 static inline int cpu_thread_in_subcore(int cpu) in cpu_thread_in_subcore() argument
88 return cpu & (threads_per_subcore - 1); in cpu_thread_in_subcore()
91 static inline int cpu_first_thread_sibling(int cpu) in cpu_first_thread_sibling() argument
93 return cpu & ~(threads_per_core - 1); in cpu_first_thread_sibling()
96 static inline int cpu_last_thread_sibling(int cpu) in cpu_last_thread_sibling() argument
98 return cpu | (threads_per_core - 1); in cpu_last_thread_sibling()