Skip to content

Commit a26bce1

Browse files
wildea01Russell King
authored andcommitted
ARM: 7127/1: 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. Tested-by: Marc Zyngier <[email protected]> Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent c825dda commit a26bce1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

arch/arm/kernel/hw_breakpoint.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,10 @@ static void reset_ctrl_regs(void *unused)
892892
* later on.
893893
*/
894894
switch (debug_arch) {
895+
case ARM_DEBUG_ARCH_V6:
896+
case ARM_DEBUG_ARCH_V6_1:
897+
/* ARMv6 cores just need to reset the registers. */
898+
goto reset_regs;
895899
case ARM_DEBUG_ARCH_V7_ECP14:
896900
/*
897901
* Ensure sticky power-down is clear (i.e. debug logic is
@@ -931,6 +935,7 @@ static void reset_ctrl_regs(void *unused)
931935
asm volatile("mcr p14, 0, %0, c0, c7, 0" : : "r" (0));
932936
isb();
933937

938+
reset_regs:
934939
if (enable_monitor_mode())
935940
return;
936941

0 commit comments

Comments
 (0)