ARM: 7127/1: hw_breakpoint: skip v7-specific reset on v6 cores
authorWill Deacon <will.deacon@arm.com>
Fri, 7 Oct 2011 14:57:55 +0000 (15:57 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 8 Oct 2011 09:05:34 +0000 (10:05 +0100)
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 <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/hw_breakpoint.c

index 5a46225f007ec54dccdef468d6f485ae828f3a6f..814a52a9dc39abf401629e429879080ca1e2173a 100644 (file)
@@ -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;