[Top] [All Lists]

Re: [PATCH 07/36] Don't assume boot CPU is CPU0 if MIPS_DISABLE_BOOT_CPU

To: Ralf Baechle <>
Subject: Re: [PATCH 07/36] Don't assume boot CPU is CPU0 if MIPS_DISABLE_BOOT_CPU_ZERO set.
From: David Daney <>
Date: Tue, 28 Oct 2008 09:43:33 -0700
Cc:, Tomaso Paoletti <>, Paul Gortmaker <>
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <> <> <> <> <> <>
User-agent: Thunderbird (X11/20080723)
Ralf Baechle wrote:
On Mon, Oct 27, 2008 at 05:02:39PM -0700, David Daney wrote:

MIPS SMP code currently assumes that the boot CPU will be CPU0
of the system.  For some systems, this may not be the case.

It always the logic CPU 0 though the physical number might be different.

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)
         * 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;

This assignment is redundant anyway - the kernel is starting with the array
zeroed.  So just remove this entire initialization and do your array
initialization in your mp_ops->smp_setup.

We already do that.  I will just delete this section unconditionally.

David Daney

<Prev in Thread] Current Thread [Next in Thread>