MIPS: Allow __cpu_number_map to be larger than NR_CPUS

In systems where the CPU id space is sparse, this allows a smaller
NR_CPUS to be chosen, thus keeping internal data structures smaller.

Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: Carlos Munoz <cmunoz@caviumnetworks.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/17388/
[jhogan@kernel.org: Add depends on SMP to fix
 "warning: symbol value '' invalid for MIPS_NR_CPU_NR_MAP"]
Signed-off-by: James Hogan <jhogan@kernel.org>
This commit is contained in:
David Daney
2017-09-28 12:34:04 -05:00
committed by James Hogan
parent 239e14d195
commit 7820b84be8
3 changed files with 13 additions and 3 deletions

View File

@@ -48,7 +48,7 @@
#include <asm/setup.h>
#include <asm/maar.h>
int __cpu_number_map[NR_CPUS]; /* Map physical to logical */
int __cpu_number_map[CONFIG_MIPS_NR_CPU_NR_MAP]; /* Map physical to logical */
EXPORT_SYMBOL(__cpu_number_map);
int __cpu_logical_map[NR_CPUS]; /* Map logical to physical */