From: Phil Elwell <phil@raspberrypi.org>
To: Eric Anholt <eric@anholt.net>,
Stefan Wahren <stefan.wahren@i2se.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
bcm-kernel-feedback-list@broadcom.com,
Russell King <linux@armlinux.org.uk>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: Phil Elwell <phil@raspberrypi.org>
Subject: [PATCH] ARM: bcm2836: Send event when onlining other cores
Date: Tue, 8 Aug 2017 12:04:55 +0100 [thread overview]
Message-ID: <1502190295-53391-2-git-send-email-phil@raspberrypi.org> (raw)
In-Reply-To: <1502190295-53391-1-git-send-email-phil@raspberrypi.org>
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.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
---
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;
--
1.9.1
next prev parent reply other threads:[~2017-08-08 11:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-08 11:04 [PATCH 0/1] ARM: bcm2836: Send event when onlining other cores Phil Elwell
2017-08-08 11:04 ` Phil Elwell [this message]
2017-08-14 16:25 ` [PATCH] " Florian Fainelli
2017-08-14 17:11 ` Stefan Wahren
2017-08-14 18:40 ` Stefan Wahren
2017-08-15 18:04 ` Eric Anholt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1502190295-53391-2-git-send-email-phil@raspberrypi.org \
--to=phil@raspberrypi.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=eric@anholt.net \
--cc=f.fainelli@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
--cc=stefan.wahren@i2se.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox