aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/loongson/common
diff options
context:
space:
mode:
authorHuacai Chen <chenhc@lemote.com>2014-11-04 01:13:26 -0500
committerRalf Baechle <ralf@linux-mips.org>2014-11-24 01:45:01 -0500
commitec0f8d3fbb7ea12cfd10083e340381b96e7c34f8 (patch)
tree9550596fd52cccb8b7026c7135553255ddb0313d /arch/mips/loongson/common
parentf490682a6b21ffed5acd7a0d49d8371e5e625d7a (diff)
MIPS: Loongson: Allow booting from any core
By offering Logical->Physical core id mapping, so as to reserve some physical cores via mask. This allow booting from any core when core-0 has problems. Since the maximun cores supported by Loongson-3 is 16, 32-bit cpu_startup_core_id can be split to 16-bit cpu_startup_core_id and 16-bit reserved_cores_mask for compatibility. Signed-off-by: Huacai Chen <chenhc@lemote.com> Cc: John Crispin <john@phrozen.org> Cc: Steven J. Hill <Steven.Hill@imgtec.com> Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang <zhangfx@lemote.com> Cc: Zhangjin Wu <wuzhangjin@gmail.com> Patchwork: https://patchwork.linux-mips.org/patch/8323/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/loongson/common')
-rw-r--r--arch/mips/loongson/common/env.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/mips/loongson/common/env.c b/arch/mips/loongson/common/env.c
index f15228550a22..d8be5398105c 100644
--- a/arch/mips/loongson/common/env.c
+++ b/arch/mips/loongson/common/env.c
@@ -119,6 +119,8 @@ void __init prom_init_env(void)
119 } 119 }
120 120
121 loongson_sysconf.nr_cpus = ecpu->nr_cpus; 121 loongson_sysconf.nr_cpus = ecpu->nr_cpus;
122 loongson_sysconf.boot_cpu_id = ecpu->cpu_startup_core_id;
123 loongson_sysconf.reserved_cpus_mask = ecpu->reserved_cores_mask;
122 if (ecpu->nr_cpus > NR_CPUS || ecpu->nr_cpus == 0) 124 if (ecpu->nr_cpus > NR_CPUS || ecpu->nr_cpus == 0)
123 loongson_sysconf.nr_cpus = NR_CPUS; 125 loongson_sysconf.nr_cpus = NR_CPUS;
124 loongson_sysconf.nr_nodes = (loongson_sysconf.nr_cpus + 126 loongson_sysconf.nr_nodes = (loongson_sysconf.nr_cpus +