aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>2015-08-01 12:12:41 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-08-07 03:56:58 -0400
commit3a3814c28b13d038ce5e055fc01f9a7aa5b821b9 (patch)
tree23377b9d15e9996fcd0a4ab45dd663a035345a2f
parentf341b8dff9823a969be5fb3c958e5cb305ac67e8 (diff)
s390/topology: remove topology lock
Since we are already protected by the "sched_domains_mutex" lock, we can safely remove the topology lock. Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/kernel/topology.c11
-rw-r--r--arch/s390/numa/mode_emu.c7
2 files changed, 10 insertions, 8 deletions
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index 0f5f8b09c903..1fbe1f83f89c 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -40,8 +40,10 @@ static struct sysinfo_15_1_x *tl_info;
40static int topology_enabled = 1; 40static int topology_enabled = 1;
41static DECLARE_WORK(topology_work, topology_work_fn); 41static DECLARE_WORK(topology_work, topology_work_fn);
42 42
43/* topology_lock protects the socket and book linked lists */ 43/*
44static DEFINE_SPINLOCK(topology_lock); 44 * Socket/Book linked lists and per_cpu(cpu_topology) updates are
45 * protected by "sched_domains_mutex".
46 */
45static struct mask_info socket_info; 47static struct mask_info socket_info;
46static struct mask_info book_info; 48static struct mask_info book_info;
47 49
@@ -191,7 +193,6 @@ static void tl_to_masks(struct sysinfo_15_1_x *info)
191{ 193{
192 struct cpuid cpu_id; 194 struct cpuid cpu_id;
193 195
194 spin_lock_irq(&topology_lock);
195 get_cpu_id(&cpu_id); 196 get_cpu_id(&cpu_id);
196 clear_masks(); 197 clear_masks();
197 switch (cpu_id.machine) { 198 switch (cpu_id.machine) {
@@ -202,7 +203,6 @@ static void tl_to_masks(struct sysinfo_15_1_x *info)
202 default: 203 default:
203 __tl_to_masks_generic(info); 204 __tl_to_masks_generic(info);
204 } 205 }
205 spin_unlock_irq(&topology_lock);
206} 206}
207 207
208static void topology_update_polarization_simple(void) 208static void topology_update_polarization_simple(void)
@@ -247,10 +247,8 @@ int topology_set_cpu_management(int fc)
247 247
248static void update_cpu_masks(void) 248static void update_cpu_masks(void)
249{ 249{
250 unsigned long flags;
251 int cpu; 250 int cpu;
252 251
253 spin_lock_irqsave(&topology_lock, flags);
254 for_each_possible_cpu(cpu) { 252 for_each_possible_cpu(cpu) {
255 per_cpu(cpu_topology, cpu).thread_mask = cpu_thread_map(cpu); 253 per_cpu(cpu_topology, cpu).thread_mask = cpu_thread_map(cpu);
256 per_cpu(cpu_topology, cpu).core_mask = cpu_group_map(&socket_info, cpu); 254 per_cpu(cpu_topology, cpu).core_mask = cpu_group_map(&socket_info, cpu);
@@ -262,7 +260,6 @@ static void update_cpu_masks(void)
262 per_cpu(cpu_topology, cpu).book_id = cpu; 260 per_cpu(cpu_topology, cpu).book_id = cpu;
263 } 261 }
264 } 262 }
265 spin_unlock_irqrestore(&topology_lock, flags);
266 numa_update_cpu_topology(); 263 numa_update_cpu_topology();
267} 264}
268 265
diff --git a/arch/s390/numa/mode_emu.c b/arch/s390/numa/mode_emu.c
index 9d4e1e15a6f0..646cd94cff2f 100644
--- a/arch/s390/numa/mode_emu.c
+++ b/arch/s390/numa/mode_emu.c
@@ -51,6 +51,11 @@ enum {TOPTREE_ID_PHYS, TOPTREE_ID_NUMA};
51static int emu_nodes = 1; 51static int emu_nodes = 1;
52/* NUMA stripe size */ 52/* NUMA stripe size */
53static unsigned long emu_size; 53static unsigned long emu_size;
54
55/*
56 * Node to core pinning information updates are protected by
57 * "sched_domains_mutex".
58 */
54/* Pinned core to node mapping */ 59/* Pinned core to node mapping */
55static int cores_to_node_id[CONFIG_NR_CPUS]; 60static int cores_to_node_id[CONFIG_NR_CPUS];
56/* Total number of pinned cores */ 61/* Total number of pinned cores */
@@ -393,7 +398,7 @@ static void print_node_to_core_map(void)
393 * Transfer physical topology into a NUMA topology and modify CPU masks 398 * Transfer physical topology into a NUMA topology and modify CPU masks
394 * according to the NUMA topology. 399 * according to the NUMA topology.
395 * 400 *
396 * This function is called under the CPU hotplug lock. 401 * Must be called with "sched_domains_mutex" lock held.
397 */ 402 */
398static void emu_update_cpu_topology(void) 403static void emu_update_cpu_topology(void)
399{ 404{