summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2016-12-05 21:18:58 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-12-07 07:22:50 +0100
commit5423145f8c4e885c640d12adc35c421127ed015f (patch)
tree9ea3f1e38daeb326d40aa0ce58cf38838f7e3118 /arch/s390/kernel
parent307b3114eff6ba981c8eddbce327b4a82158bfe3 (diff)
downloadlinux-stable-5423145f8c4e885c640d12adc35c421127ed015f.tar.gz
linux-stable-5423145f8c4e885c640d12adc35c421127ed015f.tar.bz2
linux-stable-5423145f8c4e885c640d12adc35c421127ed015f.zip
s390/smp: use smp_get_base_cpu() helper function
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/smp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index f1ba3936a9d3..66ffc2350f24 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -800,7 +800,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
pcpu = pcpu_devices + cpu;
if (pcpu->state != CPU_STATE_CONFIGURED)
return -EIO;
- base = cpu - (cpu % (smp_cpu_mtid + 1));
+ base = smp_get_base_cpu(cpu);
for (i = 0; i <= smp_cpu_mtid; i++) {
if (base + i < nr_cpu_ids)
if (cpu_online(base + i))
@@ -966,7 +966,7 @@ static ssize_t cpu_configure_store(struct device *dev,
rc = -EBUSY;
/* disallow configuration changes of online cpus and cpu 0 */
cpu = dev->id;
- cpu -= cpu % (smp_cpu_mtid + 1);
+ cpu = smp_get_base_cpu(cpu);
if (cpu == 0)
goto out;
for (i = 0; i <= smp_cpu_mtid; i++)