sched/topology: Rename topology_thread_cpumask() to topology_sibling_cpumask()
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Tue, 26 May 2015 13:11:28 +0000 (15:11 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 27 May 2015 13:22:15 +0000 (15:22 +0200)
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>
20 files changed:
Documentation/cputopology.txt
arch/arm/include/asm/topology.h
arch/arm64/include/asm/topology.h
arch/ia64/include/asm/topology.h
arch/mips/include/asm/topology.h
arch/powerpc/include/asm/topology.h
arch/powerpc/mm/tlb_nohash.c
arch/s390/include/asm/topology.h
arch/sparc/include/asm/topology_64.h
arch/tile/include/asm/topology.h
arch/x86/include/asm/topology.h
arch/x86/kernel/cpu/perf_event_intel.c
block/blk-mq-cpumap.c
drivers/acpi/acpi_pad.c
drivers/base/topology.c
drivers/net/ethernet/sfc/efx.c
drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c
drivers/staging/lustre/lustre/ptlrpc/service.c
include/linux/topology.h
lib/cpu_rmap.c

index 0aad6deb2d9638e3b0d7bf16db928e1bd0b80d8b..428a961ff063dbfeef228e5d419d4b2bc0a9593f 100644 (file)
@@ -44,7 +44,7 @@ these macros in include/asm-XXX/topology.h:
 #define topology_physical_package_id(cpu)
 #define topology_core_id(cpu)
 #define topology_book_id(cpu)
-#define topology_thread_cpumask(cpu)
+#define topology_sibling_cpumask(cpu)
 #define topology_core_cpumask(cpu)
 #define topology_book_cpumask(cpu)
 
index 2fe85fff5ccacd3dfe67d72c4b6fd5d65342e5e9..370f7a732900ae12e8831e6f3ce7390d16455fc8 100644 (file)
@@ -18,7 +18,7 @@ extern struct cputopo_arm cpu_topology[NR_CPUS];
 #define topology_physical_package_id(cpu)      (cpu_topology[cpu].socket_id)
 #define topology_core_id(cpu)          (cpu_topology[cpu].core_id)
 #define topology_core_cpumask(cpu)     (&cpu_topology[cpu].core_sibling)
-#define topology_thread_cpumask(cpu)   (&cpu_topology[cpu].thread_sibling)
+#define topology_sibling_cpumask(cpu)  (&cpu_topology[cpu].thread_sibling)
 
 void init_cpu_topology(void);
 void store_cpu_topology(unsigned int cpuid);
index 7ebcd31ce51cae9be1030f706e5ecb03a7af7e2c..225ec3524fbfc6ed29ae1d8d1d5041569a886089 100644 (file)
@@ -18,7 +18,7 @@ extern struct cpu_topology cpu_topology[NR_CPUS];
 #define topology_physical_package_id(cpu)      (cpu_topology[cpu].cluster_id)
 #define topology_core_id(cpu)          (cpu_topology[cpu].core_id)
 #define topology_core_cpumask(cpu)     (&cpu_topology[cpu].core_sibling)
-#define topology_thread_cpumask(cpu)   (&cpu_topology[cpu].thread_sibling)
+#define topology_sibling_cpumask(cpu)  (&cpu_topology[cpu].thread_sibling)
 
 void init_cpu_topology(void);
 void store_cpu_topology(unsigned int cpuid);
index 6437ca21f61b49d0b05fe9d124ed0e5aa8391d92..3ad8f698836346793816a79ada16035f40b8197e 100644 (file)
@@ -53,7 +53,7 @@ void build_cpu_to_node_map(void);
 #define topology_physical_package_id(cpu)      (cpu_data(cpu)->socket_id)
 #define topology_core_id(cpu)                  (cpu_data(cpu)->core_id)
 #define topology_core_cpumask(cpu)             (&cpu_core_map[cpu])
-#define topology_thread_cpumask(cpu)           (&per_cpu(cpu_sibling_map, cpu))
+#define topology_sibling_cpumask(cpu)          (&per_cpu(cpu_sibling_map, cpu))
 #endif
 
 extern void arch_fix_phys_package_id(int num, u32 slot);
index 3e307ec2afbae2f7308df902f450006bafd006f9..7afda4150a59d928537cddd33e8ed0105d90629b 100644 (file)
@@ -15,7 +15,7 @@
 #define topology_physical_package_id(cpu)      (cpu_data[cpu].package)
 #define topology_core_id(cpu)                  (cpu_data[cpu].core)
 #define topology_core_cpumask(cpu)             (&cpu_core_map[cpu])
-#define topology_thread_cpumask(cpu)           (&cpu_sibling_map[cpu])
+#define topology_sibling_cpumask(cpu)          (&cpu_sibling_map[cpu])
 #endif
 
 #endif /* __ASM_TOPOLOGY_H */
index 5f1048eaa5b6041d1194457bec16509dcabe7907..8b3b46b7b0f2795b6195eb95ee649d3dece6dc9a 100644 (file)
@@ -87,7 +87,7 @@ static inline int prrn_is_enabled(void)
 #include <asm/smp.h>
 
 #define topology_physical_package_id(cpu)      (cpu_to_chip_id(cpu))
-#define topology_thread_cpumask(cpu)   (per_cpu(cpu_sibling_map, cpu))
+#define topology_sibling_cpumask(cpu)  (per_cpu(cpu_sibling_map, cpu))
 #define topology_core_cpumask(cpu)     (per_cpu(cpu_core_map, cpu))
 #define topology_core_id(cpu)          (cpu_to_core_id(cpu))
 #endif
index cbd3d069897f61d11c8c4497700f1d746178a0f7..723a099f6be31ac425873a6363be7c19f916dea6 100644 (file)
@@ -217,7 +217,7 @@ static DEFINE_RAW_SPINLOCK(tlbivax_lock);
 static int mm_is_core_local(struct mm_struct *mm)
 {
        return cpumask_subset(mm_cpumask(mm),
-                             topology_thread_cpumask(smp_processor_id()));
+                             topology_sibling_cpumask(smp_processor_id()));
 }
 
 struct tlb_flush_param {
index b1453a2ae1ca583b2d4a0dc99bc325fd30ddf10d..4990f6c66288582b21ad01295b032cb13da9ee31 100644 (file)
@@ -22,7 +22,8 @@ DECLARE_PER_CPU(struct cpu_topology_s390, cpu_topology);
 
 #define topology_physical_package_id(cpu) (per_cpu(cpu_topology, cpu).socket_id)
 #define topology_thread_id(cpu)                  (per_cpu(cpu_topology, cpu).thread_id)
-#define topology_thread_cpumask(cpu)     (&per_cpu(cpu_topology, cpu).thread_mask)
+#define topology_sibling_cpumask(cpu) \
+               (&per_cpu(cpu_topology, cpu).thread_mask)
 #define topology_core_id(cpu)            (per_cpu(cpu_topology, cpu).core_id)
 #define topology_core_cpumask(cpu)       (&per_cpu(cpu_topology, cpu).core_mask)
 #define topology_book_id(cpu)            (per_cpu(cpu_topology, cpu).book_id)
index ed8f071132e4d0e045bd9ffe22ce90f6604e0e3a..9a928fcb7a9b4b09203f3657eee9b4d0c99e7353 100644 (file)
@@ -41,7 +41,7 @@ static inline int pcibus_to_node(struct pci_bus *pbus)
 #define topology_physical_package_id(cpu)      (cpu_data(cpu).proc_id)
 #define topology_core_id(cpu)                  (cpu_data(cpu).core_id)
 #define topology_core_cpumask(cpu)             (&cpu_core_map[cpu])
-#define topology_thread_cpumask(cpu)           (&per_cpu(cpu_sibling_map, cpu))
+#define topology_sibling_cpumask(cpu)          (&per_cpu(cpu_sibling_map, cpu))
 #endif /* CONFIG_SMP */
 
 extern cpumask_t cpu_core_map[NR_CPUS];
index 938311844233b8c7e2753b5982bbdd0a302d5304..76b0d0ebb24433e1b064cda5dbb23eef5e9127dc 100644 (file)
@@ -55,7 +55,7 @@ static inline const struct cpumask *cpumask_of_node(int node)
 #define topology_physical_package_id(cpu)       ((void)(cpu), 0)
 #define topology_core_id(cpu)                   (cpu)
 #define topology_core_cpumask(cpu)              ((void)(cpu), cpu_online_mask)
-#define topology_thread_cpumask(cpu)            cpumask_of(cpu)
+#define topology_sibling_cpumask(cpu)           cpumask_of(cpu)
 #endif
 
 #endif /* _ASM_TILE_TOPOLOGY_H */
index 0e8f04f2c26fda3935093b7040dac783e621d71b..5a77593fdaced1134dc0971cf62bb8b07aea6070 100644 (file)
@@ -124,7 +124,7 @@ extern const struct cpumask *cpu_coregroup_mask(int cpu);
 
 #ifdef ENABLE_TOPO_DEFINES
 #define topology_core_cpumask(cpu)             (per_cpu(cpu_core_map, cpu))
-#define topology_thread_cpumask(cpu)           (per_cpu(cpu_sibling_map, cpu))
+#define topology_sibling_cpumask(cpu)          (per_cpu(cpu_sibling_map, cpu))
 #endif
 
 static inline void arch_fix_phys_package_id(int num, u32 slot)
index 3998131d1a683058d6382b527c187028a7fede38..32481773577129f2ef4d026a4d8d89c7e40ba6a1 100644 (file)
@@ -2621,7 +2621,7 @@ static void intel_pmu_cpu_starting(int cpu)
        if (!(x86_pmu.flags & PMU_FL_NO_HT_SHARING)) {
                void **onln = &cpuc->kfree_on_online[X86_PERF_KFREE_SHARED];
 
-               for_each_cpu(i, topology_thread_cpumask(cpu)) {
+               for_each_cpu(i, topology_sibling_cpumask(cpu)) {
                        struct intel_shared_regs *pc;
 
                        pc = per_cpu(cpu_hw_events, i).shared_regs;
@@ -2641,7 +2641,7 @@ static void intel_pmu_cpu_starting(int cpu)
        if (x86_pmu.flags & PMU_FL_EXCL_CNTRS) {
                int h = x86_pmu.num_counters >> 1;
 
-               for_each_cpu(i, topology_thread_cpumask(cpu)) {
+               for_each_cpu(i, topology_sibling_cpumask(cpu)) {
                        struct intel_excl_cntrs *c;
 
                        c = per_cpu(cpu_hw_events, i).excl_cntrs;
@@ -3403,7 +3403,7 @@ static __init int fixup_ht_bug(void)
        if (!(x86_pmu.flags & PMU_FL_EXCL_ENABLED))
                return 0;
 
-       w = cpumask_weight(topology_thread_cpumask(cpu));
+       w = cpumask_weight(topology_sibling_cpumask(cpu));
        if (w > 1) {
                pr_info("PMU erratum BJ122, BV98, HSD29 worked around, HT is on\n");
                return 0;
index 5f13f4d0bcceda747589a300170537eefb4810eb..1e28ddb656b891b92d7c135fa65914939b1451aa 100644 (file)
@@ -24,7 +24,7 @@ static int get_first_sibling(unsigned int cpu)
 {
        unsigned int ret;
 
-       ret = cpumask_first(topology_thread_cpumask(cpu));
+       ret = cpumask_first(topology_sibling_cpumask(cpu));
        if (ret < nr_cpu_ids)
                return ret;
 
index 6bc9cbc01ad6a3f20c27740ebbf1a919e7c74d0d..00b39802d7ecf5826b8c0b5dc9036b9f2f452ba5 100644 (file)
@@ -105,7 +105,7 @@ static void round_robin_cpu(unsigned int tsk_index)
        mutex_lock(&round_robin_lock);
        cpumask_clear(tmp);
        for_each_cpu(cpu, pad_busy_cpus)
-               cpumask_or(tmp, tmp, topology_thread_cpumask(cpu));
+               cpumask_or(tmp, tmp, topology_sibling_cpumask(cpu));
        cpumask_andnot(tmp, cpu_online_mask, tmp);
        /* avoid HT sibilings if possible */
        if (cpumask_empty(tmp))
index 6491f45200a78681ce7ec95e65339292f8d194ab..8b7d7f8e58518448a53eeba640886d490fb75bee 100644 (file)
@@ -61,7 +61,7 @@ static DEVICE_ATTR_RO(physical_package_id);
 define_id_show_func(core_id);
 static DEVICE_ATTR_RO(core_id);
 
-define_siblings_show_func(thread_siblings, thread_cpumask);
+define_siblings_show_func(thread_siblings, sibling_cpumask);
 static DEVICE_ATTR_RO(thread_siblings);
 static DEVICE_ATTR_RO(thread_siblings_list);
 
index 4b00545a3ace7784b3b3e668ccd68b4334c1500b..65944dd8bf6b11239e4945b6be7e91fdc547254a 100644 (file)
@@ -1304,7 +1304,7 @@ static unsigned int efx_wanted_parallelism(struct efx_nic *efx)
                        if (!cpumask_test_cpu(cpu, thread_mask)) {
                                ++count;
                                cpumask_or(thread_mask, thread_mask,
-                                          topology_thread_cpumask(cpu));
+                                          topology_sibling_cpumask(cpu));
                        }
                }
 
index cc3ab351943e195a454d33d3f8d8529694f5ac0d..f9262243f9359aa2b9ae0ddd00a9f5c0937cbe6f 100644 (file)
@@ -87,7 +87,7 @@ static void cfs_cpu_core_siblings(int cpu, cpumask_t *mask)
 /* return cpumask of HTs in the same core */
 static void cfs_cpu_ht_siblings(int cpu, cpumask_t *mask)
 {
-       cpumask_copy(mask, topology_thread_cpumask(cpu));
+       cpumask_copy(mask, topology_sibling_cpumask(cpu));
 }
 
 static void cfs_node_to_cpumask(int node, cpumask_t *mask)
index 8e61421515cb689e205681257fe634f9baeb72bc..344189ac5698a575accbaf7afc5f1ec940651240 100644 (file)
@@ -557,7 +557,7 @@ ptlrpc_server_nthreads_check(struct ptlrpc_service *svc,
                 * there are.
                 */
                /* weight is # of HTs */
-               if (cpumask_weight(topology_thread_cpumask(0)) > 1) {
+               if (cpumask_weight(topology_sibling_cpumask(0)) > 1) {
                        /* depress thread factor for hyper-thread */
                        factor = factor - (factor >> 1) + (factor >> 3);
                }
@@ -2768,7 +2768,7 @@ int ptlrpc_hr_init(void)
 
        init_waitqueue_head(&ptlrpc_hr.hr_waitq);
 
-       weight = cpumask_weight(topology_thread_cpumask(0));
+       weight = cpumask_weight(topology_sibling_cpumask(0));
 
        cfs_percpt_for_each(hrp, i, ptlrpc_hr.hr_partitions) {
                hrp->hrp_cpt = i;
index 909b6e43b6942c2a7372314627e19d1bd0f72c7c..73ddad1e0fa3435ffcd567dbbcfeb01fe296a014 100644 (file)
@@ -191,8 +191,8 @@ static inline int cpu_to_mem(int cpu)
 #ifndef topology_core_id
 #define topology_core_id(cpu)                  ((void)(cpu), 0)
 #endif
-#ifndef topology_thread_cpumask
-#define topology_thread_cpumask(cpu)           cpumask_of(cpu)
+#ifndef topology_sibling_cpumask
+#define topology_sibling_cpumask(cpu)          cpumask_of(cpu)
 #endif
 #ifndef topology_core_cpumask
 #define topology_core_cpumask(cpu)             cpumask_of(cpu)
@@ -201,7 +201,7 @@ static inline int cpu_to_mem(int cpu)
 #ifdef CONFIG_SCHED_SMT
 static inline const struct cpumask *cpu_smt_mask(int cpu)
 {
-       return topology_thread_cpumask(cpu);
+       return topology_sibling_cpumask(cpu);
 }
 #endif
 
index 4f134d8907a7d03760877bfa41a3a10e7747913f..f610b2a10b3eda40c8e04f30f3779556502e9fe6 100644 (file)
@@ -191,7 +191,7 @@ int cpu_rmap_update(struct cpu_rmap *rmap, u16 index,
        /* Update distances based on topology */
        for_each_cpu(cpu, update_mask) {
                if (cpu_rmap_copy_neigh(rmap, cpu,
-                                       topology_thread_cpumask(cpu), 1))
+                                       topology_sibling_cpumask(cpu), 1))
                        continue;
                if (cpu_rmap_copy_neigh(rmap, cpu,
                                        topology_core_cpumask(cpu), 2))
This page took 0.040102 seconds and 5 git commands to generate.