diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm64/include/asm/debug-monitors.h | 19 | ||||
-rw-r--r-- | arch/arm64/kernel/debug-monitors.c | 9 |
2 files changed, 14 insertions, 14 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 | ||
76 | enum 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 | ||
116 | u8 debug_monitors_arch(void); | 120 | u8 debug_monitors_arch(void); |
117 | 121 | ||
122 | enum debug_el { | ||
123 | DBG_ACTIVE_EL0 = 0, | ||
124 | DBG_ACTIVE_EL1, | ||
125 | }; | ||
126 | |||
118 | void enable_debug_monitors(enum debug_el el); | 127 | void enable_debug_monitors(enum debug_el el); |
119 | void disable_debug_monitors(enum debug_el el); | 128 | void disable_debug_monitors(enum debug_el el); |
120 | 129 | ||
diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c index a7fb874b595e..e022f877ad0e 100644 --- a/arch/arm64/kernel/debug-monitors.c +++ b/arch/arm64/kernel/debug-monitors.c | |||
@@ -30,15 +30,6 @@ | |||
30 | #include <asm/cputype.h> | 30 | #include <asm/cputype.h> |
31 | #include <asm/system_misc.h> | 31 | #include <asm/system_misc.h> |
32 | 32 | ||
33 | /* Low-level stepping controls. */ | ||
34 | #define DBG_MDSCR_SS (1 << 0) | ||
35 | #define DBG_SPSR_SS (1 << 21) | ||
36 | |||
37 | /* MDSCR_EL1 enabling bits */ | ||
38 | #define DBG_MDSCR_KDE (1 << 13) | ||
39 | #define DBG_MDSCR_MDE (1 << 15) | ||
40 | #define DBG_MDSCR_MASK ~(DBG_MDSCR_KDE | DBG_MDSCR_MDE) | ||
41 | |||
42 | /* Determine debug architecture. */ | 33 | /* Determine debug architecture. */ |
43 | u8 debug_monitors_arch(void) | 34 | u8 debug_monitors_arch(void) |
44 | { | 35 | { |