aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/include
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2014-05-07 07:13:14 -0400
committerChristoffer Dall <christoffer.dall@linaro.org>2014-07-11 07:57:43 -0400
commit51ba248164d0eeb8b4f94d405430c18a56c6ac9a (patch)
treefffcc5ae95b82846cfe8b32bc7848b8daae31225 /arch/arm64/include
parent7609c1251f9d8bbcd6a05ba22153e50cf4f88cff (diff)
arm64: move DBG_MDSCR_* to asm/debug-monitors.h
In order to be able to use the DBG_MDSCR_* macros from the KVM code, move the relevant definitions to the obvious include file. Also move the debug_el enum to a portion of the file that is guarded by #ifndef __ASSEMBLY__ in order to use that file from assembly code. Acked-by: Will Deacon <will.deacon@arm.com> Reviewed-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm64/include')
-rw-r--r--arch/arm64/include/asm/debug-monitors.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/arch/arm64/include/asm/debug-monitors.h b/arch/arm64/include/asm/debug-monitors.h
index 6e9b5b36921c..7fb343779498 100644
--- a/arch/arm64/include/asm/debug-monitors.h
+++ b/arch/arm64/include/asm/debug-monitors.h
@@ -18,6 +18,15 @@
18 18
19#ifdef __KERNEL__ 19#ifdef __KERNEL__
20 20
21/* Low-level stepping controls. */
22#define DBG_MDSCR_SS (1 << 0)
23#define DBG_SPSR_SS (1 << 21)
24
25/* MDSCR_EL1 enabling bits */
26#define DBG_MDSCR_KDE (1 << 13)
27#define DBG_MDSCR_MDE (1 << 15)
28#define DBG_MDSCR_MASK ~(DBG_MDSCR_KDE | DBG_MDSCR_MDE)
29
21#define DBG_ESR_EVT(x) (((x) >> 27) & 0x7) 30#define DBG_ESR_EVT(x) (((x) >> 27) & 0x7)
22 31
23/* AArch64 */ 32/* AArch64 */
@@ -73,11 +82,6 @@
73 82
74#define CACHE_FLUSH_IS_SAFE 1 83#define CACHE_FLUSH_IS_SAFE 1
75 84
76enum debug_el {
77 DBG_ACTIVE_EL0 = 0,
78 DBG_ACTIVE_EL1,
79};
80
81/* AArch32 */ 85/* AArch32 */
82#define DBG_ESR_EVT_BKPT 0x4 86#define DBG_ESR_EVT_BKPT 0x4
83#define DBG_ESR_EVT_VECC 0x5 87#define DBG_ESR_EVT_VECC 0x5
@@ -115,6 +119,11 @@ void unregister_break_hook(struct break_hook *hook);
115 119
116u8 debug_monitors_arch(void); 120u8 debug_monitors_arch(void);
117 121
122enum debug_el {
123 DBG_ACTIVE_EL0 = 0,
124 DBG_ACTIVE_EL1,
125};
126
118void enable_debug_monitors(enum debug_el el); 127void enable_debug_monitors(enum debug_el el);
119void disable_debug_monitors(enum debug_el el); 128void disable_debug_monitors(enum debug_el el);
120 129