Skip to contentSkip to conversation

Fix hang on reboot with Tegra2

PATCH New Simon Glass 2 participants 2 messages Feb 17, 2011 – Feb 19, 2011

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

PATCH 1/1 Fix hang on reboot with Tegra2

This seems to be a regression in 2.6.37.

We cannot use writel() here since the resulting wmb() calls l2x0_cache_sync() which uses a spinlock and L1 cache may be off at this point.

Change-Id: Ia23b317dee919055ff4abba1484735ea3165fd99
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-February/041909.html

---
 arch/arm/mach-tegra/include/mach/system.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
arch/arm/mach-tegra/include/mach/system.h +3 -1
index 84d5d46..f1c0a79 100644
@@ -33,7 +33,9 @@ static inline void arch_reset(char mode, const char *cmd)
 	void __iomem *reset = IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x04);
 	u32 reg = readl(reset);
 	reg |= 0x04;
-	writel(reg, reset);
+
+	/* use writel_related to avoid spinlock since L1 cache may be off */
+	writel_relaxed(reg, reset);
 }
 
 #endif
Signature · 1 line
1.7.3.1
#1 lore raw

PATCH 1/1 Fix hang on reboot with Tegra2

Quoted 1 line · Simon Glass

This seems to be a regression in 2.6.37.

Thanks, I'll put this in linux-tegra-2.6.37 and a modified version in for-next, where arch_reset is in common.c.

Quoted 2 lines

We cannot use writel() here since the resulting wmb() calls l2x0_cache_sync() which uses a spinlock and L1 cache may be off at this point.

I'm going to change the readl to readl_relaxed as well.

Quoted 1 line

Change-Id: Ia23b317dee919055ff4abba1484735ea3165fd99

Upstream complains when they see these.

Quoted 31 lines

http://lists.infradead.org/pipermail/linux-arm-kernel/2011-February/041909.html

---
?arch/arm/mach-tegra/include/mach/system.h | ? ?4 +++- ?1 files changed, 3 insertions(+), 1 deletions(-)

arch/arm/mach-tegra/include/mach/system.h +3 -1
index 84d5d46..f1c0a79 100644
@@ -33,7 +33,9 @@ static inline void arch_reset(char mode, const char *cmd)
 ? ? ? ?void __iomem *reset = IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x04);
 ? ? ? ?u32 reg = readl(reset);
 ? ? ? ?reg |= 0x04;
- ? ? ? writel(reg, reset);
+
+ ? ? ? /* use writel_related to avoid spinlock since L1 cache may be off */
+ ? ? ? writel_relaxed(reg, reset);
 ?}
 

?#endif
--
1.7.3.1

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel