Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751575AbdHNQZX (ORCPT ); Mon, 14 Aug 2017 12:25:23 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:37924 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752444AbdHNQZT (ORCPT ); Mon, 14 Aug 2017 12:25:19 -0400 Subject: Re: [PATCH] ARM: bcm2836: Send event when onlining other cores To: Phil Elwell , Eric Anholt , Stefan Wahren , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <1502190295-53391-1-git-send-email-phil@raspberrypi.org> <1502190295-53391-2-git-send-email-phil@raspberrypi.org> From: Florian Fainelli Message-ID: Date: Mon, 14 Aug 2017 09:25:16 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1502190295-53391-2-git-send-email-phil@raspberrypi.org> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1315 Lines: 42 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? 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