aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-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
11 files changed, 14 insertions, 13 deletions
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;