Skip to contentSkip to conversation

keystone2: add wfi in to the core_spin loop

PATCH In review Vitaly Andrianov 2 participants 3 messages Jul 8, 2015 – Jul 28, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 keystone2: add wfi in to the core_spin loop

When core A turning of core B, via tetris DPSC it places the core B DPSC into transitional state. The core B has to execute wfi instruction to move its DPSC to the OFF state. This patch add such instruction.

---
 arch/arm/mach-keystone/cmd_mon.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
arch/arm/mach-keystone/cmd_mon.c +7 -2
index f9f58a3..73ceb83 100644
@@ -55,8 +55,13 @@ U_BOOT_CMD(mon_install, 2, 0, do_mon_install,
 
 static void core_spin(void)
 {
-	while (1)
-		; /* forever */;
+	while (1) {
+		asm volatile (
+			"dsb\n"
+			"isb\n"
+			"wfi\n"
+		);
+	}
 }
 
 int mon_power_on(int core_id, void *ep)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 keystone2: add wfi in to the core_spin loop

Quoted 5 lines · Vitaly Andrianov

When core A turning of core B, via tetris DPSC it places the core B DPSC into transitional state. The core B has to execute wfi instruction to move its DPSC to the OFF state. This patch add such instruction.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150714/a553dd76/attachment.sig>
#2 lore raw
In reply to Vitaly Andrianov
Quoted 6 lines · Vitaly Andrianov

When core A turning of core B, via tetris DPSC it places the core B DPSC into transitional state. The core B has to execute wfi instruction to move its DPSC to the OFF state. This patch add such instruction.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150728/ca649bc5/attachment.sig>