aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/kernel/hw_breakpoint.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c
index 64ac5c672396..5a46225f007e 100644
--- a/arch/arm/kernel/hw_breakpoint.c
+++ b/arch/arm/kernel/hw_breakpoint.c
@@ -136,10 +136,11 @@ static u8 get_debug_arch(void)
136 u32 didr; 136 u32 didr;
137 137
138 /* Do we implement the extended CPUID interface? */ 138 /* Do we implement the extended CPUID interface? */
139 if (WARN_ONCE((((read_cpuid_id() >> 16) & 0xf) != 0xf), 139 if (((read_cpuid_id() >> 16) & 0xf) != 0xf) {
140 "CPUID feature registers not supported. " 140 pr_warning("CPUID feature registers not supported. "
141 "Assuming v6 debug is present.\n")) 141 "Assuming v6 debug is present.\n");
142 return ARM_DEBUG_ARCH_V6; 142 return ARM_DEBUG_ARCH_V6;
143 }
143 144
144 ARM_DBG_READ(c0, 0, didr); 145 ARM_DBG_READ(c0, 0, didr);
145 return (didr >> 16) & 0xf; 146 return (didr >> 16) & 0xf;
@@ -231,7 +232,7 @@ static int enable_monitor_mode(void)
231 232
232 /* Ensure that halting mode is disabled. */ 233 /* Ensure that halting mode is disabled. */
233 if (WARN_ONCE(dscr & ARM_DSCR_HDBGEN, 234 if (WARN_ONCE(dscr & ARM_DSCR_HDBGEN,
234 "halting debug mode enabled. Unable to access hardware resources.\n")) { 235 "halting debug mode enabled. Unable to access hardware resources.\n")) {
235 ret = -EPERM; 236 ret = -EPERM;
236 goto out; 237 goto out;
237 } 238 }
@@ -626,10 +627,9 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp)
626 * we can use the mismatch feature as a poor-man's hardware 627 * we can use the mismatch feature as a poor-man's hardware
627 * single-step, but this only works for per-task breakpoints. 628 * single-step, but this only works for per-task breakpoints.
628 */ 629 */
629 if (WARN_ONCE(!bp->overflow_handler && 630 if (!bp->overflow_handler && (arch_check_bp_in_kernelspace(bp) ||
630 (arch_check_bp_in_kernelspace(bp) || !core_has_mismatch_brps() 631 !core_has_mismatch_brps() || !bp->hw.bp_target)) {
631 || !bp->hw.bp_target), 632 pr_warning("overflow handler required but none found\n");
632 "overflow handler required but none found\n")) {
633 ret = -EINVAL; 633 ret = -EINVAL;
634 } 634 }
635out: 635out: