linux-mips
[Top] [All Lists]

Re: [PATCH 3/3] MIPS: OCTEON: disable SMP if the bootloader version is i

To: Aaro Koskinen <aaro.koskinen@iki.fi>
Subject: Re: [PATCH 3/3] MIPS: OCTEON: disable SMP if the bootloader version is incorrect
From: David Daney <ddaney.cavm@gmail.com>
Date: Tue, 17 Jun 2014 15:44:46 -0700
Cc: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=TeJ52l4Zs2cXk1VUAEBg3pchR2oIIF6o6fEkOPbo2ik=; b=f2BYa6Dj7L0Cf0/j19E1NLEhnNy638oWlvxI34MgE4u/iqVYUYy8b4+XJDQKPQo5+0 gDEbjjMLMNM1StrKBifUc01WG7Lh0b9pMmyqPKBVgDv5Pbl29oCIYLj01sh1iH75iejj E0sPMpzND1CBOHSF4f3SrXm8WQYJlOPzyk4l7jP/GWlZw9j8CaOsLxjNpGpLY3bjEoZX BhHF6YFZ+evCkSIT3m4bup3CnPp5fvLwtoNPaiJrHH5OdErlAmFmH2GHlg+vTfcnDGoi lcl/qZRn4reZ+ddT1337QA5yFH1Dm3geSMkG4wX8L99ru0ImYj4oiNKNOiyTr7ifae/H 7h/A==
In-reply-to: <1402949190-28182-3-git-send-email-aaro.koskinen@iki.fi>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1402949190-28182-1-git-send-email-aaro.koskinen@iki.fi> <1402949190-28182-3-git-send-email-aaro.koskinen@iki.fi>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7
On 06/16/2014 01:06 PM, Aaro Koskinen wrote:
Disable SMP if the bootloader version is incorrect for HOTPLUG_CPU.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>

NAK to this one.


---
  arch/mips/cavium-octeon/smp.c | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c
index ea96930..71f5505 100644
--- a/arch/mips/cavium-octeon/smp.c
+++ b/arch/mips/cavium-octeon/smp.c
@@ -88,8 +88,10 @@ static void octeon_smp_hotplug_setup(void)
                return;

        labi = (struct linux_app_boot_info 
*)PHYS_TO_XKSEG_CACHED(LABI_ADDR_IN_BOOTLOADER);
-       if (labi->labi_signature != LABI_SIGNATURE)
-               panic("The bootloader version on this board is incorrect.");
+       if (labi->labi_signature != LABI_SIGNATURE) {
+               setup_max_cpus = 0;
+               WARN(1, "Disabling SMP - the bootloader version on this board does 
not support HOTPLUG_CPU.");
+       }

We really want to allow SMP, but just disable hot-plugging in the case that the bootloader magic is missing. This is not what setup_max_cpus is for.

I would prefer to see a separate variable that indicated ability to hot-plug, and have that be used to gate both the watchdog things as well as octeon_cpu_disable().



        octeon_bootloader_entry_addr = labi->InitTLBStart_addr;
  #endif



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