Commit 9d40d2e3 authored by Martin Schwidefsky's avatar Martin Schwidefsky

[S390] replace lock_cpu_hotplug with get_online_cpus

Git commit 86ef5c9a forgot a few
lock_cpu_hotplug/unlock_cpu_hotplug pairs in arch/s390/kernel/smp.c
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 361f494d
...@@ -568,9 +568,9 @@ static void __init smp_detect_cpus(void) ...@@ -568,9 +568,9 @@ static void __init smp_detect_cpus(void)
out: out:
kfree(info); kfree(info);
printk(KERN_INFO "CPUs: %d configured, %d standby\n", c_cpus, s_cpus); printk(KERN_INFO "CPUs: %d configured, %d standby\n", c_cpus, s_cpus);
lock_cpu_hotplug(); get_online_cpus();
smp_rescan_cpus(); smp_rescan_cpus();
unlock_cpu_hotplug(); put_online_cpus();
} }
/* /*
...@@ -872,7 +872,7 @@ static ssize_t cpu_configure_store(struct sys_device *dev, const char *buf, ...@@ -872,7 +872,7 @@ static ssize_t cpu_configure_store(struct sys_device *dev, const char *buf,
return -EINVAL; return -EINVAL;
mutex_lock(&smp_cpu_state_mutex); mutex_lock(&smp_cpu_state_mutex);
lock_cpu_hotplug(); get_online_cpus();
rc = -EBUSY; rc = -EBUSY;
if (cpu_online(cpu)) if (cpu_online(cpu))
goto out; goto out;
...@@ -896,7 +896,7 @@ static ssize_t cpu_configure_store(struct sys_device *dev, const char *buf, ...@@ -896,7 +896,7 @@ static ssize_t cpu_configure_store(struct sys_device *dev, const char *buf,
break; break;
} }
out: out:
unlock_cpu_hotplug(); put_online_cpus();
mutex_unlock(&smp_cpu_state_mutex); mutex_unlock(&smp_cpu_state_mutex);
return rc ? rc : count; return rc ? rc : count;
} }
...@@ -1044,7 +1044,7 @@ static ssize_t rescan_store(struct sys_device *dev, const char *buf, ...@@ -1044,7 +1044,7 @@ static ssize_t rescan_store(struct sys_device *dev, const char *buf,
int rc; int rc;
mutex_lock(&smp_cpu_state_mutex); mutex_lock(&smp_cpu_state_mutex);
lock_cpu_hotplug(); get_online_cpus();
newcpus = cpu_present_map; newcpus = cpu_present_map;
rc = smp_rescan_cpus(); rc = smp_rescan_cpus();
if (rc) if (rc)
...@@ -1057,7 +1057,7 @@ static ssize_t rescan_store(struct sys_device *dev, const char *buf, ...@@ -1057,7 +1057,7 @@ static ssize_t rescan_store(struct sys_device *dev, const char *buf,
} }
rc = 0; rc = 0;
out: out:
unlock_cpu_hotplug(); put_online_cpus();
mutex_unlock(&smp_cpu_state_mutex); mutex_unlock(&smp_cpu_state_mutex);
return rc ? rc : count; return rc ? rc : count;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment