Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339547
b: refs/heads/master
c: f435ab7
h: refs/heads/master
i:
  339545: d178703
  339543: 5f548c9
v: v3
  • Loading branch information
Will Deacon committed Nov 9, 2012
1 parent 3cf9002 commit 5e63b51
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 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: 9e962f76602dbd293a57030f4ce5a4b57853e2ea
refs/heads/master: f435ab79928e4d54082e2838c4562a165e37999c
15 changes: 10 additions & 5 deletions trunk/arch/arm/kernel/hw_breakpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,11 @@ static int enable_monitor_mode(void)

/* Check that the write made it through. */
ARM_DBG_READ(c0, c1, 0, dscr);
if (WARN_ONCE(!(dscr & ARM_DSCR_MDBGEN),
"Failed to enable monitor mode on CPU %d.\n",
smp_processor_id()))
if (!(dscr & ARM_DSCR_MDBGEN)) {
pr_warn_once("Failed to enable monitor mode on CPU %d.\n",
smp_processor_id());
return -EPERM;
}

out:
return 0;
Expand Down Expand Up @@ -357,8 +358,10 @@ int arch_install_hw_breakpoint(struct perf_event *bp)
}
}

if (WARN_ONCE(i == max_slots, "Can't find any breakpoint slot\n"))
if (i == max_slots) {
pr_warning("Can't find any breakpoint slot\n");
return -EBUSY;
}

/* Override the breakpoint data with the step data. */
if (info->step_ctrl.enabled) {
Expand Down Expand Up @@ -407,8 +410,10 @@ void arch_uninstall_hw_breakpoint(struct perf_event *bp)
}
}

if (WARN_ONCE(i == max_slots, "Can't find any breakpoint slot\n"))
if (i == max_slots) {
pr_warning("Can't find any breakpoint slot\n");
return;
}

/* Ensure that we disable the mismatch breakpoint. */
if (info->ctrl.type != ARM_BREAKPOINT_EXECUTE &&
Expand Down

0 comments on commit 5e63b51

Please sign in to comment.