提交 5423145f 编写于 作者: H Heiko Carstens 提交者: Martin Schwidefsky

s390/smp: use smp_get_base_cpu() helper function

Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 307b3114
...@@ -800,7 +800,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle) ...@@ -800,7 +800,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
pcpu = pcpu_devices + cpu; pcpu = pcpu_devices + cpu;
if (pcpu->state != CPU_STATE_CONFIGURED) if (pcpu->state != CPU_STATE_CONFIGURED)
return -EIO; return -EIO;
base = cpu - (cpu % (smp_cpu_mtid + 1)); base = smp_get_base_cpu(cpu);
for (i = 0; i <= smp_cpu_mtid; i++) { for (i = 0; i <= smp_cpu_mtid; i++) {
if (base + i < nr_cpu_ids) if (base + i < nr_cpu_ids)
if (cpu_online(base + i)) if (cpu_online(base + i))
...@@ -966,7 +966,7 @@ static ssize_t cpu_configure_store(struct device *dev, ...@@ -966,7 +966,7 @@ static ssize_t cpu_configure_store(struct device *dev,
rc = -EBUSY; rc = -EBUSY;
/* disallow configuration changes of online cpus and cpu 0 */ /* disallow configuration changes of online cpus and cpu 0 */
cpu = dev->id; cpu = dev->id;
cpu -= cpu % (smp_cpu_mtid + 1); cpu = smp_get_base_cpu(cpu);
if (cpu == 0) if (cpu == 0)
goto out; goto out;
for (i = 0; i <= smp_cpu_mtid; i++) for (i = 0; i <= smp_cpu_mtid; i++)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册