summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@nvidia.com>2014-05-14 13:07:30 -0700
committerRiham Haidar <rhaidar@nvidia.com>2014-05-27 18:45:51 -0700
commit3ce448c297cdf8e07e3812247ad1c9bee72517e4 (patch)
tree0743e2c3795d6f8a62962cf0413d00ee659d653b
parent5b95b2f7598d60c23b41a1fbaff8e023584faf4a (diff)
fixup! ARM: 7862/1: pcpu: replace __get_cpu_var_uses
This backport reverted part of this other backport: arm64: kernel: refactor code to install/uninstall breakpoints Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Change-Id: I01e4084eb447b774a7c6169efd41e1d477de831f Reviewed-on: http://git-master/r/409759 Reviewed-by: Ishan Mittal <imittal@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
-rw-r--r--arch/arm64/kernel/hw_breakpoint.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/kernel/hw_breakpoint.c
index a3c8176c8782..e681886ae240 100644
--- a/arch/arm64/kernel/hw_breakpoint.c
+++ b/arch/arm64/kernel/hw_breakpoint.c
@@ -292,37 +292,7 @@ static int hw_breakpoint_control(struct perf_event *bp,
*/
int arch_install_hw_breakpoint(struct perf_event *bp)
{
- struct arch_hw_breakpoint *info = counter_arch_bp(bp);
- struct perf_event **slot, **slots;
- int i, max_slots, base;
-
- if (info->ctrl.type == ARM_BREAKPOINT_EXECUTE) {
- /* Breakpoint */
- base = AARCH64_DBG_REG_BCR;
- slots = this_cpu_ptr(bp_on_reg);
- max_slots = core_num_brps;
- } else {
- /* Watchpoint */
- base = AARCH64_DBG_REG_WCR;
- slots = this_cpu_ptr(wp_on_reg);
- max_slots = core_num_wrps;
- }
-
- /* Remove the breakpoint. */
- for (i = 0; i < max_slots; ++i) {
- slot = &slots[i];
-
- if (*slot == bp) {
- *slot = NULL;
- break;
- }
- }
-
- if (WARN_ONCE(i == max_slots, "Can't find any breakpoint slot"))
- return;
-
- /* Reset the control register. */
- write_wb_reg(base, i, 0);
+ return hw_breakpoint_control(bp, HW_BREAKPOINT_INSTALL);
}
void arch_uninstall_hw_breakpoint(struct perf_event *bp)
{