| To: | linux-mips@linux-mips.org |
|---|---|
| Subject: | [PATCH 07/36] Don't assume boot CPU is CPU0 if MIPS_DISABLE_BOOT_CPU_ZERO set. |
| From: | David Daney <ddaney@caviumnetworks.com> |
| Date: | Mon, 27 Oct 2008 17:02:39 -0700 |
| Cc: | David Daney <ddaney@caviumnetworks.com>, Tomaso Paoletti <tpaoletti@caviumnetworks.com>, Paul Gortmaker <Paul.Gortmaker@windriver.com> |
| In-reply-to: | <1225152181-3221-6-git-send-email-ddaney@caviumnetworks.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <490655B6.4030406@caviumnetworks.com> <1225152181-3221-1-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-2-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-3-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-4-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-5-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-6-git-send-email-ddaney@caviumnetworks.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
MIPS SMP code currently assumes that the boot CPU will be CPU0
of the system. For some systems, this may not be the case.
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: Paul Gortmaker <Paul.Gortmaker@windriver.com>
---
arch/mips/Kconfig | 4 ++++
arch/mips/kernel/smp.c | 2 ++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 653574b..7ff95fb 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -747,6 +747,10 @@ config HOTPLUG_CPU
bool
default n
+config MIPS_DISABLE_BOOT_CPU_ZERO
+ bool
+ default n
+
config I8259
bool
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index b79ea70..e2597ef 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -195,12 +195,14 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
/* preload SMP state for boot cpu */
void __devinit smp_prepare_boot_cpu(void)
{
+#ifndef MIPS_DISABLE_BOOT_CPU_ZERO
/*
* This assumes that bootup is always handled by the processor
* with the logic and physical number 0.
*/
__cpu_number_map[0] = 0;
__cpu_logical_map[0] = 0;
+#endif
cpu_set(0, phys_cpu_present_map);
cpu_set(0, cpu_online_map);
cpu_set(0, cpu_callin_map);
--
1.5.6.5
|
| Previous by Date: | [PATCH 05/36] Add Cavium OCTEON processor support files to and arch/mips/cavium-octeon/executive, David Daney |
|---|---|
| Next by Date: | [PATCH 08/36] For Cavium OCTEON handle hazards as per the R10000 handling., David Daney |
| Previous by Thread: | [PATCH 06/36] Add Cavium OCTEON processor CSR definitions, David Daney |
| Next by Thread: | [PATCH 08/36] For Cavium OCTEON handle hazards as per the R10000 handling., David Daney |
| Indexes: | [Date] [Thread] [Top] [All Lists] |