Skip to contentSkip to conversation

ARM: tegra: init fuse before setting reset handler

PATCH In review Alexandre Courbot 2 participants 2 messages Nov 12, 2013

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

PATCH 1/1 ARM: tegra: init fuse before setting reset handler

CPU reset handler was set before fuse is initialized, but tegra_cpu_reset_handler_enable() uses tegra_chip_id, which is set by tegra_init_fuse(). This patch reorders the calls so the CPU reset handler code does not read an uninitialized variable.

---
 arch/arm/mach-tegra/tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-tegra/tegra.c +1 -1
index 80b801a94677..0fbdadcd96b7 100644
@@ -92,9 +92,9 @@ static void __init tegra_init_cache(void)
 
 static void __init tegra_init_early(void)
 {
-	tegra_cpu_reset_handler_init();
 	tegra_apb_io_init();
 	tegra_init_fuse();
+	tegra_cpu_reset_handler_init();
 	tegra_init_cache();
 	tegra_powergate_init();
 	tegra_hotplug_init();
Signature · 1 line
1.8.4.2
#1 lore raw
Quoted 4 lines · Alexandre Courbot

CPU reset handler was set before fuse is initialized, but tegra_cpu_reset_handler_enable() uses tegra_chip_id, which is set by tegra_init_fuse(). This patch reorders the calls so the CPU reset handler code does not read an uninitialized variable.

Thanks. I forwarded this to the arm-soc maintainers as a patch for 3.13.