Skip to content

Commit

Permalink
[S390] replace lock_cpu_hotplug with get_online_cpus
Browse files Browse the repository at this point in the history
Git commit 86ef5c9 forgot a few
lock_cpu_hotplug/unlock_cpu_hotplug pairs in arch/s390/kernel/smp.c

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Martin Schwidefsky committed Jan 26, 2008
1 parent 361f494 commit 9d40d2e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions arch/s390/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,9 +568,9 @@ static void __init smp_detect_cpus(void)
out:
kfree(info);
printk(KERN_INFO "CPUs: %d configured, %d standby\n", c_cpus, s_cpus);
lock_cpu_hotplug();
get_online_cpus();
smp_rescan_cpus();
unlock_cpu_hotplug();
put_online_cpus();
}

/*
Expand Down Expand Up @@ -872,7 +872,7 @@ static ssize_t cpu_configure_store(struct sys_device *dev, const char *buf,
return -EINVAL;

mutex_lock(&smp_cpu_state_mutex);
lock_cpu_hotplug();
get_online_cpus();
rc = -EBUSY;
if (cpu_online(cpu))
goto out;
Expand All @@ -896,7 +896,7 @@ static ssize_t cpu_configure_store(struct sys_device *dev, const char *buf,
break;
}
out:
unlock_cpu_hotplug();
put_online_cpus();
mutex_unlock(&smp_cpu_state_mutex);
return rc ? rc : count;
}
Expand Down Expand Up @@ -1044,7 +1044,7 @@ static ssize_t rescan_store(struct sys_device *dev, const char *buf,
int rc;

mutex_lock(&smp_cpu_state_mutex);
lock_cpu_hotplug();
get_online_cpus();
newcpus = cpu_present_map;
rc = smp_rescan_cpus();
if (rc)
Expand All @@ -1057,7 +1057,7 @@ static ssize_t rescan_store(struct sys_device *dev, const char *buf,
}
rc = 0;
out:
unlock_cpu_hotplug();
put_online_cpus();
mutex_unlock(&smp_cpu_state_mutex);
return rc ? rc : count;
}
Expand Down

0 comments on commit 9d40d2e

Please sign in to comment.