Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752233AbdHNRMP (ORCPT ); Mon, 14 Aug 2017 13:12:15 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:56023 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752079AbdHNRMN (ORCPT ); Mon, 14 Aug 2017 13:12:13 -0400 Date: Mon, 14 Aug 2017 19:11:35 +0200 (CEST) From: Stefan Wahren To: Eric Anholt , Florian Fainelli Cc: Phil Elwell , Scott Branden , Ray Jui , Russell King , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com Message-ID: <1168905996.270506.1502730695418@email.1und1.de> In-Reply-To: References: <1502190295-53391-1-git-send-email-phil@raspberrypi.org> <1502190295-53391-2-git-send-email-phil@raspberrypi.org> Subject: Re: [PATCH] ARM: bcm2836: Send event when onlining other cores MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.2-Rev34 X-Originating-Client: open-xchange-appsuite X-Provags-ID: V03:K0:czJB2hmHqLfGm4O7KWN6C8og3ZOHoL9DZUKKjUxUig1EV95pJAN LfvZC2Dn1bbwluCgYInhAN/d/TmYkWqUuZTR4oMuBif45TjJGvz6sHRHqfwhUyvwyWttU+V XJ0AtrMQPa5zgJRKT9vInLvrgXEvZJuaRETxORRYMBX3GmcM0w+ezaygwBMLs0wytkOIr+2 cBWJ38Yh7zRjYJWRSKKRw== X-UI-Out-Filterresults: notjunk:1;V01:K0:LDancFO9ers=:w9XyDYA8F3FCGeYfwnY73V le6omuS5yOqYO9BegiW2MvjjG0TYPlQAaIIAI7HnIoKt5RNMZX1CBuIjtSwsTCqo3n6t9trH9 kw/l0dJPkK6pxAgPphdifnk1e1iIox3ZYmXhSSC167lV2FcLw07eNN/dLagcymq3Q/ZwdWQLM sENPRGrJISzF9mAAJc5kwo8Gl2eno1euCUyIH/djxso1eE4uyi3lUPkYww6yQaNdRGE1Dgvur NJmdfw2SttvVx+bkfMcxwzeiN6fBOnLPD1NhV3kHG6934WbV1NFoXl6S8UtP9dWFfinH52lnF jp7ucVrFn0MrDo5H8hkZI8UHyuMsWksE3H/7DAEOwwiZmvsOJu1nFw+xO5WzPDaciojSjUVIT h4fSSpZcqXB7A68aSTq3TlV8uUE+BlANHfOKNkbe1Ef+a5Pb7Nxz6D5IVqSLPwG+NNciquAES wAHZ1Hq9Yp5tjaWXttFdPBikK/P/hOPskhahMOt98SlvQeaWbuttYbST5P2vZJW/82k72XzCV 3rg3cYSgHcQ31rL3tlVg8oa0h/TrXhJRFqGSkvASci5WXla/4a/+CsgbdfApcpOTH3dRt12hL +2/hYVCArmt8kzXV95OKeTZssinTdXiQU4QE0f4gX1aUNT2LswOLsB2CsJF97cVOBWAuNWA2J O+xjEjqeM0+79N4q9JbMkV2ALjNj67wrWqJbd/wBmUp/mFs1GYzsPiv47r9CkfXAY/4rPwo9d RCMd8aG9bOflgfOho3ecmxy210YALwdSJVZV3uQg37rY88wW2WIG90kphb4= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1731 Lines: 54 Hi Florian, > Florian Fainelli hat am 14. August 2017 um 18:25 geschrieben: > > > > > On 08/08/2017 04:04 AM, Phil Elwell wrote: > > Secondary cores should enter a low-power idle state when waiting to > > be started. The "wfe" instruction causes a core to wait until an event > > or interrupt arrives before continuing to the next instruction, and > > the "sev" instruction sends a wakeup event to the other cores. > > > > Add an "sev" (and a memory barrier) to bcm2836_boot_secondary, the > > function that wakes the waiting cores during booting. This is required > > if the secondary cores are sitting in "wfe", and harmless if not. > > Eric, should I just pick this up for the upcoming ARM SoC pull requests > that I am preparing, or do you have more changes aside from the two tags > I already merged? this patch depends on series "ARM: bcm2836: Move SMP startup code to arch/arm". I didn't had the time to test Phil's patch in all relevant cases. But i could at least prepare a branch with my changes with the acks. Stefan > > Thanks! > > > > > Signed-off-by: Phil Elwell > > --- > > arch/arm/mach-bcm/platsmp.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/arch/arm/mach-bcm/platsmp.c b/arch/arm/mach-bcm/platsmp.c > > index 3fa1a99..7811160 100644 > > --- a/arch/arm/mach-bcm/platsmp.c > > +++ b/arch/arm/mach-bcm/platsmp.c > > @@ -312,6 +312,9 @@ static int bcm2836_boot_secondary(unsigned int cpu, struct task_struct *idle) > > writel(virt_to_phys(secondary_startup), > > intc_base + LOCAL_MAILBOX3_SET0 + 16 * cpu); > > > > + dsb(sy); > > + sev(); > > + > > iounmap(intc_base); > > > > return 0; > > > > -- > Florian