diff options
author | Phil Elwell <phil@raspberrypi.org> | 2017-08-08 07:04:55 -0400 |
---|---|---|
committer | Florian Fainelli <f.fainelli@gmail.com> | 2017-09-25 14:52:28 -0400 |
commit | 968f76417df671338ea3a1fd33b2c93a048cc1b1 (patch) | |
tree | d0dafb2ccc7787786d00713250ecfa30c44b2441 | |
parent | 88bbe85dcd37aa2662c1a83962c15009fc12503e (diff) |
ARM: bcm2836: Send event when onlining other cores
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>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
-rw-r--r-- | arch/arm/mach-bcm/platsmp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-bcm/platsmp.c b/arch/arm/mach-bcm/platsmp.c index 34506a608fea..7d954830eb57 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) | |||
312 | writel(virt_to_phys(secondary_startup), | 312 | writel(virt_to_phys(secondary_startup), |
313 | intc_base + LOCAL_MAILBOX3_SET0 + 16 * cpu); | 313 | intc_base + LOCAL_MAILBOX3_SET0 + 16 * cpu); |
314 | 314 | ||
315 | dsb(sy); | ||
316 | sev(); | ||
317 | |||
315 | iounmap(intc_base); | 318 | iounmap(intc_base); |
316 | 319 | ||
317 | return 0; | 320 | return 0; |