]> git.karo-electronics.de Git - linux-beck.git/commitdiff
s390/smp: use smp_get_base_cpu() helper function
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 5 Dec 2016 20:18:58 +0000 (21:18 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 7 Dec 2016 06:22:50 +0000 (07:22 +0100)
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/smp.c

index f1ba3936a9d3460d8cbee59a442aca1eb426b971..66ffc2350f2417c9947d4e7965bda2531d969cb6 100644 (file)
@@ -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++)