Skip to contentSkip to conversation

ARM: tegra: set up stack before calling maincluster entry

PATCH Applied Lucas Stach 2 participants 2 messages Apr 12, 2016 – Apr 14, 2016

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

PATCH 1/1 ARM: tegra: set up stack before calling maincluster entry

Allows this code to work correct regardless of the used compiler optimizations.

---
 arch/arm/mach-tegra/include/mach/lowlevel.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
arch/arm/mach-tegra/include/mach/lowlevel.h +4 -3
index f70688e..e9ba5ee 100644
@@ -255,9 +255,6 @@ void tegra_cpu_lowlevel_setup(char *fdt)
 {
 	uint32_t r;
 
-	if (tegra_cpu_is_maincomplex())
-		tegra_maincomplex_entry(fdt - get_runtime_offset());
-
 	/* set the cpu to SVC32 mode */
 	__asm__ __volatile__("mrs %0, cpsr":"=r"(r));
 	r &= ~0x1f;
@@ -265,6 +262,10 @@ void tegra_cpu_lowlevel_setup(char *fdt)
 	__asm__ __volatile__("msr cpsr, %0" : : "r"(r));
 
 	arm_setup_stack(TEGRA_IRAM_BASE + SZ_256K - 8);
+
+	if (tegra_cpu_is_maincomplex())
+		tegra_maincomplex_entry(fdt - get_runtime_offset());
+
 	tegra_ll_delay_setup();
 }
 
Signature · 7 lines
2.5.5


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 7 lines · Lucas Stach

Allows this code to work correct regardless of the used compiler optimizations.

---
 arch/arm/mach-tegra/include/mach/lowlevel.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Applied, thanks

Sascha

Quoted 35 lines
arch/arm/mach-tegra/include/mach/lowlevel.h +4 -3
index f70688e..e9ba5ee 100644
@@ -255,9 +255,6 @@ void tegra_cpu_lowlevel_setup(char *fdt)
 {
 	uint32_t r;
 
-	if (tegra_cpu_is_maincomplex())
-		tegra_maincomplex_entry(fdt - get_runtime_offset());
-
 	/* set the cpu to SVC32 mode */
 	__asm__ __volatile__("mrs %0, cpsr":"=r"(r));
 	r &= ~0x1f;
@@ -265,6 +262,10 @@ void tegra_cpu_lowlevel_setup(char *fdt)
 	__asm__ __volatile__("msr cpsr, %0" : : "r"(r));
 
 	arm_setup_stack(TEGRA_IRAM_BASE + SZ_256K - 8);
+
+	if (tegra_cpu_is_maincomplex())
+		tegra_maincomplex_entry(fdt - get_runtime_offset());
+
 	tegra_ll_delay_setup();
 }
 
Signature · 7 lines
2.5.5


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox