From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BBB1C64E7B for ; Mon, 30 Nov 2020 16:05:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DC74C20665 for ; Mon, 30 Nov 2020 16:05:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="n5o/7PaW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727764AbgK3QE4 (ORCPT ); Mon, 30 Nov 2020 11:04:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:49850 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725933AbgK3QE4 (ORCPT ); Mon, 30 Nov 2020 11:04:56 -0500 Received: from mail-oo1-f53.google.com (mail-oo1-f53.google.com [209.85.161.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2BDD3206D5; Mon, 30 Nov 2020 16:04:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606752255; bh=OKizQehPufOsCKn6ePfX0wM4iNsQxAsdx3z7gn7uXNs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=n5o/7PaW8e+MJFjLTX9a7bF2vZhcE/MvcqwbHV8en45mide+dXXTEeqAA+aEY1pjl JGGLNfEaN4paNFN1xhlksWVBotGarDJtFUbfRU436dxAL92yG6BQF8q8bnOfR4Ya3A yuHEP5DsFFTXsLwL7iRZOI1XUEkL2IW/HoDOus0U= Received: by mail-oo1-f53.google.com with SMTP id z13so2787930ooa.5; Mon, 30 Nov 2020 08:04:15 -0800 (PST) X-Gm-Message-State: AOAM533FxTuR1JSxWQ/i7CmCqCmMKqu9AAOAOQs0Z/+R21ylIfR4OEUe uKP0lnoQGylZhrTUKLLUJ6hM3oSX2ZzCQKa15IQ= X-Google-Smtp-Source: ABdhPJwO0OcyppzAFxXiC9ksMmD7xi6slop9CL8rc7rks9bONP+F1VWCvg0c5OxAIGzkt5dp0AYxBKkOECM50AUbaN0= X-Received: by 2002:a4a:d8d0:: with SMTP id c16mr5118495oov.26.1606752254399; Mon, 30 Nov 2020 08:04:14 -0800 (PST) MIME-Version: 1.0 References: <20201130131047.2648960-1-daniel@0x0f.com> <20201130131047.2648960-10-daniel@0x0f.com> In-Reply-To: From: Arnd Bergmann Date: Mon, 30 Nov 2020 17:03:58 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 9/9] ARM: mstar: SMP support To: Daniel Palmer Cc: DTML , Linux ARM , "linux-kernel@vger.kernel.org" , Arnd Bergmann , Rob Herring , Willy Tarreau Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 30, 2020 at 3:25 PM Daniel Palmer wrote: > > Hi Arnd, > > On Mon, 30 Nov 2020 at 22:42, Arnd Bergmann wrote: > > > +struct smp_operations __initdata mstarv7_smp_ops = { > > > + .smp_boot_secondary = mstarv7_boot_secondary, > > > +}; > > > +#endif > > > > So no hotplug operations? > > Not yet. There are controls to power down different bits of the chip, > assert internal resets and so on so it might be possible to add that > later but I haven't worked out where those bits are yet for the second > cpu. > > > Or better, use CPU_METHOD_OF_DECLARE() instead of smp_ops. > > I'll do that for the v2. Ok. > Was there anything else that looked fishy? Every other platform seems > to have a lot of code for moving secondary CPUs from the boot ROM into > somewhere the kernel can control the order in which they come online > (vendor code has a copy/paste of the vexpress code) so I was worried I > missed something. No, it looks fine to me, but I'm not an expert in this area. As far as I can tell, platforms will either execute from bootrom with the secondary_startup function in a register like you have, or they start from SRAM, with that function somewhere else, but you wouldn't need both. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62A5CC63777 for ; Mon, 30 Nov 2020 16:05:40 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E3864206D5 for ; Mon, 30 Nov 2020 16:05:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tq3GwzLF"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="n5o/7PaW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E3864206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2j1/cEhQZTqPQ5aA6VrXRpMQodjKPo/7BkSpLmU345U=; b=tq3GwzLFH/8Q+k6r/ZI+cyAv3 OjhZo9EMn1k+4IGqT/IWOwcgZKvtysPyevOYBjIwmrqx7ApPxIvPcLHLjoSvIPrJ2le5HBV8ROcnl Z/p2RXgeBWPxHbaHacFldF6Tu6yOWy6WAm/9eJGjYRDA97A4IAVOKHDnHSH1CQj6kOzM01fWasvCm uuWcyXUyhLHviHDNsBfTqYdcKWjHNGmZDZjwK1Rzc3v18gOUeVwVgp5ClqA0XSVV0ax67lCA8XK2N SeicmueVnlHk/IL/aqrSknNRzBPnduhjLKRbScqvbE8Fm3JwV8hXuGKpA49fzpt8yfWOT9DTs//yR zV+6gG7Kw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjlf1-0007Jc-5g; Mon, 30 Nov 2020 16:04:19 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjley-0007Ih-Gq for linux-arm-kernel@lists.infradead.org; Mon, 30 Nov 2020 16:04:17 +0000 Received: from mail-oo1-f43.google.com (mail-oo1-f43.google.com [209.85.161.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2F8722073C for ; Mon, 30 Nov 2020 16:04:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606752255; bh=OKizQehPufOsCKn6ePfX0wM4iNsQxAsdx3z7gn7uXNs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=n5o/7PaW8e+MJFjLTX9a7bF2vZhcE/MvcqwbHV8en45mide+dXXTEeqAA+aEY1pjl JGGLNfEaN4paNFN1xhlksWVBotGarDJtFUbfRU436dxAL92yG6BQF8q8bnOfR4Ya3A yuHEP5DsFFTXsLwL7iRZOI1XUEkL2IW/HoDOus0U= Received: by mail-oo1-f43.google.com with SMTP id y3so2790497ooq.2 for ; Mon, 30 Nov 2020 08:04:15 -0800 (PST) X-Gm-Message-State: AOAM530UbY6+uXzfrDY/lZGelH9rTj+raebdWXlvx43B/AfVVmD/q1JW tUry5lP0RPRxqNK/WPyx5ZiG6J+VUZICLpxYGOE= X-Google-Smtp-Source: ABdhPJwO0OcyppzAFxXiC9ksMmD7xi6slop9CL8rc7rks9bONP+F1VWCvg0c5OxAIGzkt5dp0AYxBKkOECM50AUbaN0= X-Received: by 2002:a4a:d8d0:: with SMTP id c16mr5118495oov.26.1606752254399; Mon, 30 Nov 2020 08:04:14 -0800 (PST) MIME-Version: 1.0 References: <20201130131047.2648960-1-daniel@0x0f.com> <20201130131047.2648960-10-daniel@0x0f.com> In-Reply-To: From: Arnd Bergmann Date: Mon, 30 Nov 2020 17:03:58 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 9/9] ARM: mstar: SMP support To: Daniel Palmer X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201130_110416_694456_365820EB X-CRM114-Status: GOOD ( 23.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: DTML , Arnd Bergmann , Rob Herring , "linux-kernel@vger.kernel.org" , Willy Tarreau , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Nov 30, 2020 at 3:25 PM Daniel Palmer wrote: > > Hi Arnd, > > On Mon, 30 Nov 2020 at 22:42, Arnd Bergmann wrote: > > > +struct smp_operations __initdata mstarv7_smp_ops = { > > > + .smp_boot_secondary = mstarv7_boot_secondary, > > > +}; > > > +#endif > > > > So no hotplug operations? > > Not yet. There are controls to power down different bits of the chip, > assert internal resets and so on so it might be possible to add that > later but I haven't worked out where those bits are yet for the second > cpu. > > > Or better, use CPU_METHOD_OF_DECLARE() instead of smp_ops. > > I'll do that for the v2. Ok. > Was there anything else that looked fishy? Every other platform seems > to have a lot of code for moving secondary CPUs from the boot ROM into > somewhere the kernel can control the order in which they come online > (vendor code has a copy/paste of the vexpress code) so I was worried I > missed something. No, it looks fine to me, but I'm not an expert in this area. As far as I can tell, platforms will either execute from bootrom with the secondary_startup function in a register like you have, or they start from SRAM, with that function somewhere else, but you wouldn't need both. Arnd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel