aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2008-12-25 07:37:57 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-12-25 07:38:07 -0500
commit5439050f9f1aa92381ab9beccbea6ddf0c687c2b (patch)
treeff60baccf42c58a4268463ad841f806e4048ae26 /arch/s390
parent4a6908a3a050aacc9c3a2f36b276b46c0629ad91 (diff)
[S390] cpu topology: fix cpu_core_map initialization
Common code doesn't call arch_update_cpu_topology() anymore on cpu hotplug. But our architecture backend relied on that in order to update the cpu_core_map. For machines without cpu topology support this leads uninitialized cpu_core_maps for later on added cpus. To solve this just initialize the maps with cpu_possible_map, since that will be always valid for machines without topology support. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/topology.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index a947899dcba1..586c5e33b3f4 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -78,7 +78,7 @@ cpumask_t cpu_coregroup_map(unsigned int cpu)
78 78
79 cpus_clear(mask); 79 cpus_clear(mask);
80 if (!machine_has_topology) 80 if (!machine_has_topology)
81 return cpu_present_map; 81 return cpu_possible_map;
82 spin_lock_irqsave(&topology_lock, flags); 82 spin_lock_irqsave(&topology_lock, flags);
83 while (core) { 83 while (core) {
84 if (cpu_isset(cpu, core->mask)) { 84 if (cpu_isset(cpu, core->mask)) {
@@ -168,7 +168,7 @@ static void topology_update_polarization_simple(void)
168 int cpu; 168 int cpu;
169 169
170 mutex_lock(&smp_cpu_state_mutex); 170 mutex_lock(&smp_cpu_state_mutex);
171 for_each_present_cpu(cpu) 171 for_each_possible_cpu(cpu)
172 smp_cpu_polarization[cpu] = POLARIZATION_HRZ; 172 smp_cpu_polarization[cpu] = POLARIZATION_HRZ;
173 mutex_unlock(&smp_cpu_state_mutex); 173 mutex_unlock(&smp_cpu_state_mutex);
174} 174}
@@ -199,7 +199,7 @@ int topology_set_cpu_management(int fc)
199 rc = ptf(PTF_HORIZONTAL); 199 rc = ptf(PTF_HORIZONTAL);
200 if (rc) 200 if (rc)
201 return -EBUSY; 201 return -EBUSY;
202 for_each_present_cpu(cpu) 202 for_each_possible_cpu(cpu)
203 smp_cpu_polarization[cpu] = POLARIZATION_UNKNWN; 203 smp_cpu_polarization[cpu] = POLARIZATION_UNKNWN;
204 return rc; 204 return rc;
205} 205}
@@ -208,7 +208,7 @@ static void update_cpu_core_map(void)
208{ 208{
209 int cpu; 209 int cpu;
210 210
211 for_each_present_cpu(cpu) 211 for_each_possible_cpu(cpu)
212 cpu_core_map[cpu] = cpu_coregroup_map(cpu); 212 cpu_core_map[cpu] = cpu_coregroup_map(cpu);
213} 213}
214 214