]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ARM: bcm2836: Send event when onlining other cores
authorPhil Elwell <phil@raspberrypi.org>
Tue, 8 Aug 2017 11:04:55 +0000 (12:04 +0100)
committerFlorian Fainelli <f.fainelli@gmail.com>
Mon, 25 Sep 2017 18:52:28 +0000 (11:52 -0700)
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>
arch/arm/mach-bcm/platsmp.c

index 34506a608fea01a325c23bbeb13dea41014d79cc..7d954830eb57644e36d80b3ab17cb1778d208337 100644 (file)
@@ -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;