Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339541
b: refs/heads/master
c: b59a540
h: refs/heads/master
i:
  339539: db6ca85
v: v3
  • Loading branch information
Will Deacon committed Nov 9, 2012
1 parent 9dbc92b commit faa60c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e64877dcf5fd05d81fa195785a738f3a729587a3
refs/heads/master: b59a540ca927ea84bb0590b9d8076f50c969abb4
25 changes: 5 additions & 20 deletions trunk/arch/arm/kernel/hw_breakpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,6 @@ static int enable_monitor_mode(void)

ARM_DBG_READ(c1, 0, dscr);

/* Ensure that halting mode is disabled. */
if (WARN_ONCE(dscr & ARM_DSCR_HDBGEN,
"halting debug mode enabled. Unable to access hardware resources.\n")) {
ret = -EPERM;
goto out;
}

/* If monitor mode is already enabled, just return. */
if (dscr & ARM_DSCR_MDBGEN)
goto out;
Expand All @@ -255,6 +248,7 @@ static int enable_monitor_mode(void)
case ARM_DEBUG_ARCH_V7_ECP14:
case ARM_DEBUG_ARCH_V7_1:
ARM_DBG_WRITE(c2, 2, (dscr | ARM_DSCR_MDBGEN));
isb();
break;
default:
ret = -ENODEV;
Expand Down Expand Up @@ -1000,8 +994,6 @@ static struct notifier_block __cpuinitdata dbg_reset_nb = {

static int __init arch_hw_breakpoint_init(void)
{
u32 dscr;

debug_arch = get_debug_arch();

if (!debug_arch_supported()) {
Expand Down Expand Up @@ -1036,17 +1028,10 @@ static int __init arch_hw_breakpoint_init(void)
core_num_brps, core_has_mismatch_brps() ? "(+1 reserved) " :
"", core_num_wrps);

ARM_DBG_READ(c1, 0, dscr);
if (dscr & ARM_DSCR_HDBGEN) {
max_watchpoint_len = 4;
pr_warning("halting debug mode enabled. Assuming maximum watchpoint size of %u bytes.\n",
max_watchpoint_len);
} else {
/* Work out the maximum supported watchpoint length. */
max_watchpoint_len = get_max_wp_len();
pr_info("maximum watchpoint size is %u bytes.\n",
max_watchpoint_len);
}
/* Work out the maximum supported watchpoint length. */
max_watchpoint_len = get_max_wp_len();
pr_info("maximum watchpoint size is %u bytes.\n",
max_watchpoint_len);

/* Register debug fault handler. */
hook_fault_code(FAULT_CODE_DEBUG, hw_breakpoint_pending, SIGTRAP,
Expand Down

0 comments on commit faa60c3

Please sign in to comment.