aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2015-05-26 09:11:28 -0400
committerIngo Molnar <mingo@kernel.org>2015-05-27 09:22:15 -0400
commit06931e62246844c73fba24d7aeb4a5dc897a2739 (patch)
tree7c2be9a70a7da591739116049b14bebab8fb0a9b
parent0fb0328d3458ff2d6ffbb280b75053c99a8a4b1f (diff)
sched/topology: Rename topology_thread_cpumask() to topology_sibling_cpumask()
Rename topology_thread_cpumask() to topology_sibling_cpumask() for more consistency with scheduler code. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Benoit Cousson <bcousson@baylibre.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Jean Delvare <jdelvare@suse.de> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Drokin <oleg.drokin@intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: Russell King <linux@arm.linux.org.uk> Cc: Viresh Kumar <viresh.kumar@linaro.org> Link: http://lkml.kernel.org/r/1432645896-12588-2-git-send-email-bgolaszewski@baylibre.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--Documentation/cputopology.txt2
-rw-r--r--arch/arm/include/asm/topology.h2
-rw-r--r--arch/arm64/include/asm/topology.h2
-rw-r--r--arch/ia64/include/asm/topology.h2
-rw-r--r--arch/mips/include/asm/topology.h2
-rw-r--r--arch/powerpc/include/asm/topology.h2
-rw-r--r--arch/powerpc/mm/tlb_nohash.c2
-rw-r--r--arch/s390/include/asm/topology.h3
-rw-r--r--arch/sparc/include/asm/topology_64.h2
-rw-r--r--arch/tile/include/asm/topology.h2
-rw-r--r--arch/x86/include/asm/topology.h2
-rw-r--r--arch/x86/kernel/cpu/perf_event_intel.c6
-rw-r--r--block/blk-mq-cpumap.c2
-rw-r--r--drivers/acpi/acpi_pad.c2
-rw-r--r--drivers/base/topology.c2
-rw-r--r--drivers/net/ethernet/sfc/efx.c2
-rw-r--r--drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c2
-rw-r--r--drivers/staging/lustre/lustre/ptlrpc/service.c4
-rw-r--r--include/linux/topology.h6
-rw-r--r--lib/cpu_rmap.c2
20 files changed, 26 insertions, 25 deletions
diff --git a/Documentation/cputopology.txt b/Documentation/cputopology.txt
index 0aad6deb2d96..428a961ff063 100644
--- a/Documentation/cputopology.txt
+++ b/Documentation/cputopology.txt
@@ -44,7 +44,7 @@ these macros in include/asm-XXX/topology.h:
44#define topology_physical_package_id(cpu) 44#define topology_physical_package_id(cpu)
45#define topology_core_id(cpu) 45#define topology_core_id(cpu)
46#define topology_book_id(cpu) 46#define topology_book_id(cpu)
47#define topology_thread_cpumask(cpu) 47#define topology_sibling_cpumask(cpu)
48#define topology_core_cpumask(cpu) 48#define topology_core_cpumask(cpu)
49#define topology_book_cpumask(cpu) 49#define topology_book_cpumask(cpu)
50 50
diff --git a/arch/arm/include/asm/topology.h b/arch/arm/include/asm/topology.h
index 2fe85fff5cca..370f7a732900 100644
--- a/arch/arm/include/asm/topology.h
+++ b/arch/arm/include/asm/topology.h
@@ -18,7 +18,7 @@ extern struct cputopo_arm cpu_topology[NR_CPUS];
18#define topology_physical_package_id(cpu) (cpu_topology[cpu].socket_id) 18#define topology_physical_package_id(cpu) (cpu_topology[cpu].socket_id)
19#define topology_core_id(cpu) (cpu_topology[cpu].core_id) 19#define topology_core_id(cpu) (cpu_topology[cpu].core_id)
20#define topology_core_cpumask(cpu) (&cpu_topology[cpu].core_sibling) 20#define topology_core_cpumask(cpu) (&cpu_topology[cpu].core_sibling)
21#define topology_thread_cpumask(cpu) (&cpu_topology[cpu].thread_sibling) 21#define topology_sibling_cpumask(cpu) (&cpu_topology[cpu].thread_sibling)
22 22
23void init_cpu_topology(void); 23void init_cpu_topology(void);
24void store_cpu_topology(unsigned int cpuid); 24void store_cpu_topology(unsigned int cpuid);
diff --git a/arch/arm64/include/asm/topology.h b/arch/arm64/include/asm/topology.h
index 7ebcd31ce51c..225ec3524fbf 100644
--- a/arch/arm64/include/asm/topology.h
+++ b/arch/arm64/include/asm/topology.h
@@ -18,7 +18,7 @@ extern struct cpu_topology cpu_topology[NR_CPUS];
18#define topology_physical_package_id(cpu) (cpu_topology[cpu].cluster_id) 18#define topology_physical_package_id(cpu) (cpu_topology[cpu].cluster_id)
19#define topology_core_id(cpu) (cpu_topology[cpu].core_id) 19#define topology_core_id(cpu) (cpu_topology[cpu].core_id)
20#define topology_core_cpumask(cpu) (&cpu_topology[cpu].core_sibling) 20#define topology_core_cpumask(cpu) (&cpu_topology[cpu].core_sibling)
21#define topology_thread_cpumask(cpu) (&cpu_topology[cpu].thread_sibling) 21#define topology_sibling_cpumask(cpu) (&cpu_topology[cpu].thread_sibling)
22 22
23void init_cpu_topology(void); 23void init_cpu_topology(void);
24void store_cpu_topology(unsigned int cpuid); 24void store_cpu_topology(unsigned int cpuid);
diff --git a/arch/ia64/include/asm/topology.h b/arch/ia64/include/asm/topology.h
index 6437ca21f61b..3ad8f6988363 100644
--- a/arch/ia64/include/asm/topology.h
+++ b/arch/ia64/include/asm/topology.h
@@ -53,7 +53,7 @@ void build_cpu_to_node_map(void);
53#define topology_physical_package_id(cpu) (cpu_data(cpu)->socket_id) 53#define topology_physical_package_id(cpu) (cpu_data(cpu)->socket_id)
54#define topology_core_id(cpu) (cpu_data(cpu)->core_id) 54#define topology_core_id(cpu) (cpu_data(cpu)->core_id)
55#define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) 55#define topology_core_cpumask(cpu) (&cpu_core_map[cpu])
56#define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu)) 56#define topology_sibling_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu))
57#endif 57#endif
58 58
59extern void arch_fix_phys_package_id(int num, u32 slot); 59extern void arch_fix_phys_package_id(int num, u32 slot);
diff --git a/arch/mips/include/asm/topology.h b/arch/mips/include/asm/topology.h
index 3e307ec2afba..7afda4150a59 100644
--- a/arch/mips/include/asm/topology.h
+++ b/arch/mips/include/asm/topology.h
@@ -15,7 +15,7 @@
15#define topology_physical_package_id(cpu) (cpu_data[cpu].package) 15#define topology_physical_package_id(cpu) (cpu_data[cpu].package)
16#define topology_core_id(cpu) (cpu_data[cpu].core) 16#define topology_core_id(cpu) (cpu_data[cpu].core)
17#define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) 17#define topology_core_cpumask(cpu) (&cpu_core_map[cpu])
18#define topology_thread_cpumask(cpu) (&cpu_sibling_map[cpu]) 18#define topology_sibling_cpumask(cpu) (&cpu_sibling_map[cpu])
19#endif 19#endif
20 20
21#endif /* __ASM_TOPOLOGY_H */ 21#endif /* __ASM_TOPOLOGY_H */
diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h
index 5f1048eaa5b6..8b3b46b7b0f2 100644
--- a/arch/powerpc/include/asm/topology.h
+++ b/arch/powerpc/include/asm/topology.h
@@ -87,7 +87,7 @@ static inline int prrn_is_enabled(void)
87#include <asm/smp.h> 87#include <asm/smp.h>
88 88
89#define topology_physical_package_id(cpu) (cpu_to_chip_id(cpu)) 89#define topology_physical_package_id(cpu) (cpu_to_chip_id(cpu))
90#define topology_thread_cpumask(cpu) (per_cpu(cpu_sibling_map, cpu)) 90#define topology_sibling_cpumask(cpu) (per_cpu(cpu_sibling_map, cpu))
91#define topology_core_cpumask(cpu) (per_cpu(cpu_core_map, cpu)) 91#define topology_core_cpumask(cpu) (per_cpu(cpu_core_map, cpu))
92#define topology_core_id(cpu) (cpu_to_core_id(cpu)) 92#define topology_core_id(cpu) (cpu_to_core_id(cpu))
93#endif 93#endif
diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c
index cbd3d069897f..723a099f6be3 100644
--- a/arch/powerpc/mm/tlb_nohash.c
+++ b/arch/powerpc/mm/tlb_nohash.c
@@ -217,7 +217,7 @@ static DEFINE_RAW_SPINLOCK(tlbivax_lock);
217static int mm_is_core_local(struct mm_struct *mm) 217static int mm_is_core_local(struct mm_struct *mm)
218{ 218{
219 return cpumask_subset(mm_cpumask(mm), 219 return cpumask_subset(mm_cpumask(mm),
220 topology_thread_cpumask(smp_processor_id())); 220 topology_sibling_cpumask(smp_processor_id()));
221} 221}
222 222
223struct tlb_flush_param { 223struct tlb_flush_param {
diff --git a/arch/s390/include/asm/topology.h b/arch/s390/include/asm/topology.h
index b1453a2ae1ca..4990f6c66288 100644
--- a/arch/s390/include/asm/topology.h
+++ b/arch/s390/include/asm/topology.h
@@ -22,7 +22,8 @@ DECLARE_PER_CPU(struct cpu_topology_s390, cpu_topology);
22 22
23#define topology_physical_package_id(cpu) (per_cpu(cpu_topology, cpu).socket_id) 23#define topology_physical_package_id(cpu) (per_cpu(cpu_topology, cpu).socket_id)
24#define topology_thread_id(cpu) (per_cpu(cpu_topology, cpu).thread_id) 24#define topology_thread_id(cpu) (per_cpu(cpu_topology, cpu).thread_id)
25#define topology_thread_cpumask(cpu) (&per_cpu(cpu_topology, cpu).thread_mask) 25#define topology_sibling_cpumask(cpu) \
26 (&per_cpu(cpu_topology, cpu).thread_mask)
26#define topology_core_id(cpu) (per_cpu(cpu_topology, cpu).core_id) 27#define topology_core_id(cpu) (per_cpu(cpu_topology, cpu).core_id)
27#define topology_core_cpumask(cpu) (&per_cpu(cpu_topology, cpu).core_mask) 28#define topology_core_cpumask(cpu) (&per_cpu(cpu_topology, cpu).core_mask)
28#define topology_book_id(cpu) (per_cpu(cpu_topology, cpu).book_id) 29#define topology_book_id(cpu) (per_cpu(cpu_topology, cpu).book_id)
diff --git a/arch/sparc/include/asm/topology_64.h b/arch/sparc/include/asm/topology_64.h
index ed8f071132e4..9a928fcb7a9b 100644
--- a/arch/sparc/include/asm/topology_64.h
+++ b/arch/sparc/include/asm/topology_64.h
@@ -41,7 +41,7 @@ static inline int pcibus_to_node(struct pci_bus *pbus)
41#define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id) 41#define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id)
42#define topology_core_id(cpu) (cpu_data(cpu).core_id) 42#define topology_core_id(cpu) (cpu_data(cpu).core_id)
43#define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) 43#define topology_core_cpumask(cpu) (&cpu_core_map[cpu])
44#define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu)) 44#define topology_sibling_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu))
45#endif /* CONFIG_SMP */ 45#endif /* CONFIG_SMP */
46 46
47extern cpumask_t cpu_core_map[NR_CPUS]; 47extern cpumask_t cpu_core_map[NR_CPUS];
diff --git a/arch/tile/include/asm/topology.h b/arch/tile/include/asm/topology.h
index 938311844233..76b0d0ebb244 100644
--- a/arch/tile/include/asm/topology.h
+++ b/arch/tile/include/asm/topology.h
@@ -55,7 +55,7 @@ static inline const struct cpumask *cpumask_of_node(int node)
55#define topology_physical_package_id(cpu) ((void)(cpu), 0) 55#define topology_physical_package_id(cpu) ((void)(cpu), 0)
56#define topology_core_id(cpu) (cpu) 56#define topology_core_id(cpu) (cpu)
57#define topology_core_cpumask(cpu) ((void)(cpu), cpu_online_mask) 57#define topology_core_cpumask(cpu) ((void)(cpu), cpu_online_mask)
58#define topology_thread_cpumask(cpu) cpumask_of(cpu) 58#define topology_sibling_cpumask(cpu) cpumask_of(cpu)
59#endif 59#endif
60 60
61#endif /* _ASM_TILE_TOPOLOGY_H */ 61#endif /* _ASM_TILE_TOPOLOGY_H */
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
index 0e8f04f2c26f..5a77593fdace 100644
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -124,7 +124,7 @@ extern const struct cpumask *cpu_coregroup_mask(int cpu);
124 124
125#ifdef ENABLE_TOPO_DEFINES 125#ifdef ENABLE_TOPO_DEFINES
126#define topology_core_cpumask(cpu) (per_cpu(cpu_core_map, cpu)) 126#define topology_core_cpumask(cpu) (per_cpu(cpu_core_map, cpu))
127#define topology_thread_cpumask(cpu) (per_cpu(cpu_sibling_map, cpu)) 127#define topology_sibling_cpumask(cpu) (per_cpu(cpu_sibling_map, cpu))
128#endif 128#endif
129 129
130static inline void arch_fix_phys_package_id(int num, u32 slot) 130static inline void arch_fix_phys_package_id(int num, u32 slot)
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c
index 3998131d1a68..324817735771 100644
--- a/arch/x86/kernel/cpu/perf_event_intel.c
+++ b/arch/x86/kernel/cpu/perf_event_intel.c
@@ -2621,7 +2621,7 @@ static void intel_pmu_cpu_starting(int cpu)
2621 if (!(x86_pmu.flags & PMU_FL_NO_HT_SHARING)) { 2621 if (!(x86_pmu.flags & PMU_FL_NO_HT_SHARING)) {
2622 void **onln = &cpuc->kfree_on_online[X86_PERF_KFREE_SHARED]; 2622 void **onln = &cpuc->kfree_on_online[X86_PERF_KFREE_SHARED];
2623 2623
2624 for_each_cpu(i, topology_thread_cpumask(cpu)) { 2624 for_each_cpu(i, topology_sibling_cpumask(cpu)) {
2625 struct intel_shared_regs *pc; 2625 struct intel_shared_regs *pc;
2626 2626
2627 pc = per_cpu(cpu_hw_events, i).shared_regs; 2627 pc = per_cpu(cpu_hw_events, i).shared_regs;
@@ -2641,7 +2641,7 @@ static void intel_pmu_cpu_starting(int cpu)
2641 if (x86_pmu.flags & PMU_FL_EXCL_CNTRS) { 2641 if (x86_pmu.flags & PMU_FL_EXCL_CNTRS) {
2642 int h = x86_pmu.num_counters >> 1; 2642 int h = x86_pmu.num_counters >> 1;
2643 2643
2644 for_each_cpu(i, topology_thread_cpumask(cpu)) { 2644 for_each_cpu(i, topology_sibling_cpumask(cpu)) {
2645 struct intel_excl_cntrs *c; 2645 struct intel_excl_cntrs *c;
2646 2646
2647 c = per_cpu(cpu_hw_events, i).excl_cntrs; 2647 c = per_cpu(cpu_hw_events, i).excl_cntrs;
@@ -3403,7 +3403,7 @@ static __init int fixup_ht_bug(void)
3403 if (!(x86_pmu.flags & PMU_FL_EXCL_ENABLED)) 3403 if (!(x86_pmu.flags & PMU_FL_EXCL_ENABLED))
3404 return 0; 3404 return 0;
3405 3405
3406 w = cpumask_weight(topology_thread_cpumask(cpu)); 3406 w = cpumask_weight(topology_sibling_cpumask(cpu));
3407 if (w > 1) { 3407 if (w > 1) {
3408 pr_info("PMU erratum BJ122, BV98, HSD29 worked around, HT is on\n"); 3408 pr_info("PMU erratum BJ122, BV98, HSD29 worked around, HT is on\n");
3409 return 0; 3409 return 0;
diff --git a/block/blk-mq-cpumap.c b/block/blk-mq-cpumap.c
index 5f13f4d0bcce..1e28ddb656b8 100644
--- a/block/blk-mq-cpumap.c
+++ b/block/blk-mq-cpumap.c
@@ -24,7 +24,7 @@ static int get_first_sibling(unsigned int cpu)
24{ 24{
25 unsigned int ret; 25 unsigned int ret;
26 26
27 ret = cpumask_first(topology_thread_cpumask(cpu)); 27 ret = cpumask_first(topology_sibling_cpumask(cpu));
28 if (ret < nr_cpu_ids) 28 if (ret < nr_cpu_ids)
29 return ret; 29 return ret;
30 30
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c
index 6bc9cbc01ad6..00b39802d7ec 100644
--- a/drivers/acpi/acpi_pad.c
+++ b/drivers/acpi/acpi_pad.c
@@ -105,7 +105,7 @@ static void round_robin_cpu(unsigned int tsk_index)
105 mutex_lock(&round_robin_lock); 105 mutex_lock(&round_robin_lock);
106 cpumask_clear(tmp); 106 cpumask_clear(tmp);
107 for_each_cpu(cpu, pad_busy_cpus) 107 for_each_cpu(cpu, pad_busy_cpus)
108 cpumask_or(tmp, tmp, topology_thread_cpumask(cpu)); 108 cpumask_or(tmp, tmp, topology_sibling_cpumask(cpu));
109 cpumask_andnot(tmp, cpu_online_mask, tmp); 109 cpumask_andnot(tmp, cpu_online_mask, tmp);
110 /* avoid HT sibilings if possible */ 110 /* avoid HT sibilings if possible */
111 if (cpumask_empty(tmp)) 111 if (cpumask_empty(tmp))
diff --git a/drivers/base/topology.c b/drivers/base/topology.c
index 6491f45200a7..8b7d7f8e5851 100644
--- a/drivers/base/topology.c
+++ b/drivers/base/topology.c
@@ -61,7 +61,7 @@ static DEVICE_ATTR_RO(physical_package_id);
61define_id_show_func(core_id); 61define_id_show_func(core_id);
62static DEVICE_ATTR_RO(core_id); 62static DEVICE_ATTR_RO(core_id);
63 63
64define_siblings_show_func(thread_siblings, thread_cpumask); 64define_siblings_show_func(thread_siblings, sibling_cpumask);
65static DEVICE_ATTR_RO(thread_siblings); 65static DEVICE_ATTR_RO(thread_siblings);
66static DEVICE_ATTR_RO(thread_siblings_list); 66static DEVICE_ATTR_RO(thread_siblings_list);
67 67
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 4b00545a3ace..65944dd8bf6b 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -1304,7 +1304,7 @@ static unsigned int efx_wanted_parallelism(struct efx_nic *efx)
1304 if (!cpumask_test_cpu(cpu, thread_mask)) { 1304 if (!cpumask_test_cpu(cpu, thread_mask)) {
1305 ++count; 1305 ++count;
1306 cpumask_or(thread_mask, thread_mask, 1306 cpumask_or(thread_mask, thread_mask,
1307 topology_thread_cpumask(cpu)); 1307 topology_sibling_cpumask(cpu));
1308 } 1308 }
1309 } 1309 }
1310 1310
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c
index cc3ab351943e..f9262243f935 100644
--- a/drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c
+++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c
@@ -87,7 +87,7 @@ static void cfs_cpu_core_siblings(int cpu, cpumask_t *mask)
87/* return cpumask of HTs in the same core */ 87/* return cpumask of HTs in the same core */
88static void cfs_cpu_ht_siblings(int cpu, cpumask_t *mask) 88static void cfs_cpu_ht_siblings(int cpu, cpumask_t *mask)
89{ 89{
90 cpumask_copy(mask, topology_thread_cpumask(cpu)); 90 cpumask_copy(mask, topology_sibling_cpumask(cpu));
91} 91}
92 92
93static void cfs_node_to_cpumask(int node, cpumask_t *mask) 93static void cfs_node_to_cpumask(int node, cpumask_t *mask)
diff --git a/drivers/staging/lustre/lustre/ptlrpc/service.c b/drivers/staging/lustre/lustre/ptlrpc/service.c
index 8e61421515cb..344189ac5698 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/service.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/service.c
@@ -557,7 +557,7 @@ ptlrpc_server_nthreads_check(struct ptlrpc_service *svc,
557 * there are. 557 * there are.
558 */ 558 */
559 /* weight is # of HTs */ 559 /* weight is # of HTs */
560 if (cpumask_weight(topology_thread_cpumask(0)) > 1) { 560 if (cpumask_weight(topology_sibling_cpumask(0)) > 1) {
561 /* depress thread factor for hyper-thread */ 561 /* depress thread factor for hyper-thread */
562 factor = factor - (factor >> 1) + (factor >> 3); 562 factor = factor - (factor >> 1) + (factor >> 3);
563 } 563 }
@@ -2768,7 +2768,7 @@ int ptlrpc_hr_init(void)
2768 2768
2769 init_waitqueue_head(&ptlrpc_hr.hr_waitq); 2769 init_waitqueue_head(&ptlrpc_hr.hr_waitq);
2770 2770
2771 weight = cpumask_weight(topology_thread_cpumask(0)); 2771 weight = cpumask_weight(topology_sibling_cpumask(0));
2772 2772
2773 cfs_percpt_for_each(hrp, i, ptlrpc_hr.hr_partitions) { 2773 cfs_percpt_for_each(hrp, i, ptlrpc_hr.hr_partitions) {
2774 hrp->hrp_cpt = i; 2774 hrp->hrp_cpt = i;
diff --git a/include/linux/topology.h b/include/linux/topology.h
index 909b6e43b694..73ddad1e0fa3 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -191,8 +191,8 @@ static inline int cpu_to_mem(int cpu)
191#ifndef topology_core_id 191#ifndef topology_core_id
192#define topology_core_id(cpu) ((void)(cpu), 0) 192#define topology_core_id(cpu) ((void)(cpu), 0)
193#endif 193#endif
194#ifndef topology_thread_cpumask 194#ifndef topology_sibling_cpumask
195#define topology_thread_cpumask(cpu) cpumask_of(cpu) 195#define topology_sibling_cpumask(cpu) cpumask_of(cpu)
196#endif 196#endif
197#ifndef topology_core_cpumask 197#ifndef topology_core_cpumask
198#define topology_core_cpumask(cpu) cpumask_of(cpu) 198#define topology_core_cpumask(cpu) cpumask_of(cpu)
@@ -201,7 +201,7 @@ static inline int cpu_to_mem(int cpu)
201#ifdef CONFIG_SCHED_SMT 201#ifdef CONFIG_SCHED_SMT
202static inline const struct cpumask *cpu_smt_mask(int cpu) 202static inline const struct cpumask *cpu_smt_mask(int cpu)
203{ 203{
204 return topology_thread_cpumask(cpu); 204 return topology_sibling_cpumask(cpu);
205} 205}
206#endif 206#endif
207 207
diff --git a/lib/cpu_rmap.c b/lib/cpu_rmap.c
index 4f134d8907a7..f610b2a10b3e 100644
--- a/lib/cpu_rmap.c
+++ b/lib/cpu_rmap.c
@@ -191,7 +191,7 @@ int cpu_rmap_update(struct cpu_rmap *rmap, u16 index,
191 /* Update distances based on topology */ 191 /* Update distances based on topology */
192 for_each_cpu(cpu, update_mask) { 192 for_each_cpu(cpu, update_mask) {
193 if (cpu_rmap_copy_neigh(rmap, cpu, 193 if (cpu_rmap_copy_neigh(rmap, cpu,
194 topology_thread_cpumask(cpu), 1)) 194 topology_sibling_cpumask(cpu), 1))
195 continue; 195 continue;
196 if (cpu_rmap_copy_neigh(rmap, cpu, 196 if (cpu_rmap_copy_neigh(rmap, cpu,
197 topology_core_cpumask(cpu), 2)) 197 topology_core_cpumask(cpu), 2))