提交 c642af9c 编写于 作者: S Santosh Sivaraj 提交者: Michael Ellerman

powerpc/smp: Convert NR_CPUS to nr_cpu_ids

nr_cpu_ids can be limited by nr_cpus boot parameter, whereas NR_CPUS is a
compile time constant, which shouldn't be compared against during cpu kick.
Signed-off-by: NSantosh Sivaraj <santosh@fossix.org>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 f8d0d5dc
...@@ -112,7 +112,7 @@ int smp_generic_cpu_bootable(unsigned int nr) ...@@ -112,7 +112,7 @@ int smp_generic_cpu_bootable(unsigned int nr)
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
int smp_generic_kick_cpu(int nr) int smp_generic_kick_cpu(int nr)
{ {
if (nr < 0 || nr >= NR_CPUS) if (nr < 0 || nr >= nr_cpu_ids)
return -EINVAL; return -EINVAL;
/* /*
......
...@@ -115,7 +115,7 @@ static void smp_cell_setup_cpu(int cpu) ...@@ -115,7 +115,7 @@ static void smp_cell_setup_cpu(int cpu)
static int smp_cell_kick_cpu(int nr) static int smp_cell_kick_cpu(int nr)
{ {
if (nr < 0 || nr >= NR_CPUS) if (nr < 0 || nr >= nr_cpu_ids)
return -EINVAL; return -EINVAL;
if (!smp_startup_cpu(nr)) if (!smp_startup_cpu(nr))
......
...@@ -63,7 +63,7 @@ static int pnv_smp_kick_cpu(int nr) ...@@ -63,7 +63,7 @@ static int pnv_smp_kick_cpu(int nr)
long rc; long rc;
uint8_t status; uint8_t status;
if (nr < 0 || nr >= NR_CPUS) if (nr < 0 || nr >= nr_cpu_ids)
return -EINVAL; return -EINVAL;
/* /*
......
...@@ -151,7 +151,7 @@ static void smp_setup_cpu(int cpu) ...@@ -151,7 +151,7 @@ static void smp_setup_cpu(int cpu)
static int smp_pSeries_kick_cpu(int nr) static int smp_pSeries_kick_cpu(int nr)
{ {
if (nr < 0 || nr >= NR_CPUS) if (nr < 0 || nr >= nr_cpu_ids)
return -EINVAL; return -EINVAL;
if (!smp_startup_cpu(nr)) if (!smp_startup_cpu(nr))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册