Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1706398

[PATCH] ARM: bcm2836: Send event when onlining other cores

From Phil Elwell <phil@raspberrypi.org>
Newsgroups linux.kernel
Subject [PATCH] ARM: bcm2836: Send event when onlining other cores
Date 2017-08-08 13:40 +0200
Message-ID <ucb1D-7Kd-19@gated-at.bofh.it> (permalink)
References <ucayE-7uw-61@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 0/1] ARM: bcm2836: Send event when onlining other cores Phil Elwell <phil@raspberrypi.org> - 2017-08-08 13:10 +0200
  [PATCH] ARM: bcm2836: Send event when onlining other cores Phil Elwell <phil@raspberrypi.org> - 2017-08-08 13:40 +0200

csiph-web