From patchwork Thu Jul 31 02:36:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 4652881 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9E3229F36A for ; Thu, 31 Jul 2014 02:39:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BCAEC2017A for ; Thu, 31 Jul 2014 02:39:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F23DD20158 for ; Thu, 31 Jul 2014 02:39:41 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XCgEn-0005hC-NB; Thu, 31 Jul 2014 02:37:01 +0000 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XCgEl-0005gQ-Sz for linux-arm-kernel@lists.infradead.org; Thu, 31 Jul 2014 02:37:00 +0000 Received: by mail-pa0-f48.google.com with SMTP id et14so2661422pad.35 for ; Wed, 30 Jul 2014 19:36:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=Icit9Q/qgUIZ+r7nXeB+7/wleLsv0DaK+0nzd73NxGY=; b=DEueFQ1Z2Bcr8mgxmfahIwaoUgaxfe/k1bvnthuccqV2ve+bcvzzSkqRRixKpm02u9 LYdDtWtDwHMNKGD6Q6KUtYZVGrbnACX33rV3749cu5aUxGMIST5Ls6DDY/YZUVRRBzlj I0eJ2ip1CMfZWA+0sezTy34m6Zr8JPfQY4whGKqvNzckpnACh38AspJjPaRa4RGneN3x zv/u1DMgftpGX5n4uckzsCZTBNG+sujV9l0uP6Y7keRAPtykKegEiE+3xHETFoLG0XD5 Rk4/QrhThrhHI8QwsXgRBif1c3RVIlQqM+RzMkccLPnIPuS7E4Z3bBAffIT6dOcLCK2B HQpw== X-Received: by 10.66.66.166 with SMTP id g6mr1035298pat.108.1406774198798; Wed, 30 Jul 2014 19:36:38 -0700 (PDT) Received: from ld-irv-0074 (5520-maca-inet1-outside.broadcom.com. [216.31.211.11]) by mx.google.com with ESMTPSA id zq5sm3764535pbb.37.2014.07.30.19.36.37 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 30 Jul 2014 19:36:38 -0700 (PDT) Date: Wed, 30 Jul 2014 19:36:35 -0700 From: Brian Norris To: Russell King - ARM Linux Subject: Re: [PATCH v8 01/11] ARM: brcmstb: add infrastructure for ARM-based Broadcom STB SoCs Message-ID: <20140731023635.GN3711@ld-irv-0074> References: <1405976886-27807-1-git-send-email-computersforpeace@gmail.com> <1405976886-27807-2-git-send-email-computersforpeace@gmail.com> <20140730092635.GI30282@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140730092635.GI30282@n2100.arm.linux.org.uk> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140730_193659_959537_6915AFC5 X-CRM114-Status: GOOD ( 22.78 ) X-Spam-Score: -0.8 (/) Cc: devicetree@vger.kernel.org, Florian Fainelli , Arnd Bergmann , Christian Daudt , Linux Kernel , Matt Porter , Marc Carino , Gregory Fong , Olof Johansson , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Russell, On Wed, Jul 30, 2014 at 10:26:35AM +0100, Russell King wrote: > On Mon, Jul 21, 2014 at 02:07:56PM -0700, Brian Norris wrote: > > +static DEFINE_SPINLOCK(boot_lock); > > + > > +static void brcmstb_secondary_init(unsigned int cpu) > > +{ > > + /* > > + * Synchronise with the boot thread. > > + */ > > + spin_lock(&boot_lock); > > + spin_unlock(&boot_lock); > > +} > > + > > +static int brcmstb_boot_secondary(unsigned int cpu, struct task_struct *idle) > > +{ > > + /* > > + * set synchronisation state between this boot processor > > + * and the secondary one > > + */ > > + spin_lock(&boot_lock); > > + > > + /* Bring up power to the core if necessary */ > > + if (brcmstb_cpu_get_power_state(cpu) == 0) > > + brcmstb_cpu_power_on(cpu); > > + > > + brcmstb_cpu_boot(cpu); > > + > > + /* > > + * now the secondary core is starting up let it run its > > + * calibrations, then wait for it to finish > > + */ > > + spin_unlock(&boot_lock); > > I've just read through this code (because it caused my allmodconfig to > break) and spotted this. Sorry about the allmodconfig problems. I never compile-tested with ARMv6 enabled. This look OK? > What function does boot_lock perform here? Please, don't quote the > comments (I know where the comments came from) but what I want to hear > is your comments about why you decided to retain this. You might glean a little more from my response to Rob, but I'm not sure there was a good reason for retaining this. We do need to be sure the CPU is fully powered online before bringing it out of reset, but the spinlock seems overkill AFAICT. Brian diff --git a/arch/arm/mach-bcm/Makefile b/arch/arm/mach-bcm/Makefile index f3665121729b..5ce82b4ba931 100644 --- a/arch/arm/mach-bcm/Makefile +++ b/arch/arm/mach-bcm/Makefile @@ -32,6 +32,7 @@ obj-$(CONFIG_ARCH_BCM2835) += board_bcm2835.o obj-$(CONFIG_ARCH_BCM_5301X) += bcm_5301x.o ifeq ($(CONFIG_ARCH_BRCMSTB),y) +CFLAGS_platsmp-brcmstb.o += -march=armv7-a obj-y += brcmstb.o obj-$(CONFIG_SMP) += headsmp-brcmstb.o platsmp-brcmstb.o endif