Skip to contentSkip to conversation

ARM: tegra: use setup_mm_for_reboot rather than explicit pgd switch

PATCH New Will Deacon 2 participants 4 messages Mar 25, 2013 – Mar 26, 2013

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

PATCH 1/2 ARM: tegra: use setup_mm_for_reboot rather than explicit pgd switch

This patch changes the Tegra PM code to use the setup_mm_for_reboot helper rather than call cpu_switch_mm directly. This keeps things like TLB invalidation in one place.

Cc Stephen Warren <[email protected]>
---
 arch/arm/mach-tegra/pm.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
arch/arm/mach-tegra/pm.c +1 -6
index 523604d..a77ed48 100644
@@ -183,12 +183,7 @@ bool tegra_set_cpu_in_lp2(int phy_cpu_id)
 
 static int tegra_sleep_cpu(unsigned long v2p)
 {
-	/* Switch to the identity mapping. */
-	cpu_switch_mm(idmap_pgd, &init_mm);
-
-	/* Flush the TLB. */
-	local_flush_tlb_all();
-
+	setup_mm_for_reboot();
 	tegra_sleep_cpu_finish(v2p);
 
 	/* should never here */
Signature · 1 line
1.8.0
#1 lore raw

PATCH 2/2 ARM: tegra: use CS_LAR_KEY definition instead of 0xC5ACCE55

When enabling coresight on secondary cores for tegra, make use of our fancy new definition for the magic lock code.

---
 arch/arm/mach-tegra/headsmp.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-tegra/headsmp.S +2 -1
index fd473f2..d2747fe 100644
@@ -1,6 +1,7 @@
 #include <linux/linkage.h>
 #include <linux/init.h>
 
+#include <asm/hardware/coresight.h>
 #include "sleep.h"
 
         .section ".text.head", "ax"
@@ -8,7 +9,7 @@
 ENTRY(tegra_secondary_startup)
         bl      v7_invalidate_l1
 	/* Enable coresight */
-	mov32	r0, 0xC5ACCE55
+	mov32	r0, CS_LAR_KEY
 	mcr	p14, 0, r0, c7, c12, 6
         b       secondary_startup
 ENDPROC(tegra_secondary_startup)
Signature · 1 line
1.8.0
#2 lore raw

PATCH 2/2 ARM: tegra: use CS_LAR_KEY definition instead of 0xC5ACCE55

Quoted 2 lines · Will Deacon

When enabling coresight on secondary cores for tegra, make use of our fancy new definition for the magic lock code.

The code you're editing has actually been removed in the 3.10 cycle, so there's no need for this patch any more.

#3 lore raw

PATCH 1/2 ARM: tegra: use setup_mm_for_reboot rather than explicit pgd switch

In reply to Will Deacon
Quoted 3 lines · Will Deacon

This patch changes the Tegra PM code to use the setup_mm_for_reboot helper rather than call cpu_switch_mm directly. This keeps things like TLB invalidation in one place.

I've applied this to Tegra's for-3.10/cleanup branch.