Skip to contentSkip to conversation

ARM: hw_breakpoint: skip v7-specific reset on v6 cores

PATCH New Will Deacon 1 participant 1 message Oct 5, 2011

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

PATCH 1/1 ARM: hw_breakpoint: skip v7-specific reset on v6 cores

ARMv6 cores do not implement the DBGOSLAR register, so we don't need to try and clear it on boot. Furthermore, the VCR is zeroed out of reset, so we don't need to zero it explicitly when a CPU comes online.

---

Taken against rmk/devel-stable.

 arch/arm/kernel/hw_breakpoint.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
arch/arm/kernel/hw_breakpoint.c +5 -0
index 5a46225..814a52a9 100644
@@ -892,6 +892,10 @@ static void reset_ctrl_regs(void *unused)
 	 * later on.
 	 */
 	switch (debug_arch) {
+	case ARM_DEBUG_ARCH_V6:
+	case ARM_DEBUG_ARCH_V6_1:
+		/* ARMv6 cores just need to reset the registers. */
+		goto reset_regs;
 	case ARM_DEBUG_ARCH_V7_ECP14:
 		/*
 		 * Ensure sticky power-down is clear (i.e. debug logic is
@@ -931,6 +935,7 @@ static void reset_ctrl_regs(void *unused)
 	asm volatile("mcr p14, 0, %0, c0, c7, 0" : : "r" (0));
 	isb();
 
+reset_regs:
 	if (enable_monitor_mode())
 		return;
 
Signature · 1 line
1.7.4.1