summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorSantosh Sivaraj <santosh@fossix.org>2017-06-27 10:00:06 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2017-06-28 06:08:16 +0300
commitc642af9c41f09296997519499d16ff30e700816a (patch)
treed74a02b808bef6b1b415f63a9bb23f8d4c85c3d3 /arch/powerpc/platforms
parentf8d0d5dc641cd405ad40cb2498b04df9716baee6 (diff)
downloadlinux-c642af9c41f09296997519499d16ff30e700816a.tar.xz
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: Santosh Sivaraj <santosh@fossix.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/cell/smp.c2
-rw-r--r--arch/powerpc/platforms/powernv/smp.c2
-rw-r--r--arch/powerpc/platforms/pseries/smp.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c
index ee8c535cf4d3..f84d52a2db40 100644
--- a/arch/powerpc/platforms/cell/smp.c
+++ b/arch/powerpc/platforms/cell/smp.c
@@ -115,7 +115,7 @@ static void smp_cell_setup_cpu(int cpu)
static int smp_cell_kick_cpu(int nr)
{
- if (nr < 0 || nr >= NR_CPUS)
+ if (nr < 0 || nr >= nr_cpu_ids)
return -EINVAL;
if (!smp_startup_cpu(nr))
diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/powernv/smp.c
index 292825f25ffd..40dae96f7e20 100644
--- a/arch/powerpc/platforms/powernv/smp.c
+++ b/arch/powerpc/platforms/powernv/smp.c
@@ -63,7 +63,7 @@ static int pnv_smp_kick_cpu(int nr)
long rc;
uint8_t status;
- if (nr < 0 || nr >= NR_CPUS)
+ if (nr < 0 || nr >= nr_cpu_ids)
return -EINVAL;
/*
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index c82182ac40af..24785f63fb40 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -151,7 +151,7 @@ static void smp_setup_cpu(int cpu)
static int smp_pSeries_kick_cpu(int nr)
{
- if (nr < 0 || nr >= NR_CPUS)
+ if (nr < 0 || nr >= nr_cpu_ids)
return -EINVAL;
if (!smp_startup_cpu(nr))