aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/hw_breakpoint.c
diff options
context:
space:
mode:
authorDietmar Eggemann <dietmar.eggemann@arm.com>2012-10-14 15:23:04 -0400
committerWill Deacon <will.deacon@arm.com>2013-01-10 16:13:05 -0500
commit02051ead976d854df1de726841c4a646826ec860 (patch)
tree6a2db29823171f8236b650361e97653481bc82b6 /arch/arm/kernel/hw_breakpoint.c
parent9931faca02c604c22335f5a935a501bb2ace6e20 (diff)
ARM: coresight: common definition for (OS) Lock Access Register key value
Coresight components and debug are using a common lock control mechansim. Writing 0xC5ACCE55 to the Lock Access Register (LAR) in case of a coresight components enables further access to the coresight device registers. Writing any other value to it removes the write access. Writing 0xC5ACCE55 to the OS Lock Access Register (OSLAR) in case of debug locks the debug register for further access to the debug registers. Writing any other value to it unlocks the debug registers. Unfortunately, the existing coresight code uses the terms lock and unlock the other way around. Unlocking stands for enabling write access and locking for removing write access. That is why the definition of the LAR and OSLAR key value has been changed to CS_LAR_KEY. Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm/kernel/hw_breakpoint.c')
-rw-r--r--arch/arm/kernel/hw_breakpoint.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c
index 5ff2e77782b1..34e9375d96a6 100644
--- a/arch/arm/kernel/hw_breakpoint.c
+++ b/arch/arm/kernel/hw_breakpoint.c
@@ -35,6 +35,7 @@
35#include <asm/hw_breakpoint.h> 35#include <asm/hw_breakpoint.h>
36#include <asm/kdebug.h> 36#include <asm/kdebug.h>
37#include <asm/traps.h> 37#include <asm/traps.h>
38#include <asm/hardware/coresight.h>
38 39
39/* Breakpoint currently in use for each BRP. */ 40/* Breakpoint currently in use for each BRP. */
40static DEFINE_PER_CPU(struct perf_event *, bp_on_reg[ARM_MAX_BRP]); 41static DEFINE_PER_CPU(struct perf_event *, bp_on_reg[ARM_MAX_BRP]);
@@ -955,9 +956,9 @@ static void reset_ctrl_regs(void *unused)
955 956
956 /* 957 /*
957 * Unconditionally clear the OS lock by writing a value 958 * Unconditionally clear the OS lock by writing a value
958 * other than 0xC5ACCE55 to the access register. 959 * other than CS_LAR_KEY to the access register.
959 */ 960 */
960 ARM_DBG_WRITE(c1, c0, 4, 0); 961 ARM_DBG_WRITE(c1, c0, 4, ~CS_LAR_KEY);
961 isb(); 962 isb();
962 963
963 /* 964 /*