summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-07-09 03:25:48 +0200
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-07-09 03:25:48 +0200
commit5f07aa7524e98d6f68f2bec54f155ef6012e2c9a (patch)
tree393b2db3213e6618ad1338f9b66019b0c05c6f75 /kernel
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rol... (diff)
parentpowerpc, hw_breakpoint: Tell generic code we have no instruction breakpoints (diff)
downloadlinux-5f07aa7524e98d6f68f2bec54f155ef6012e2c9a.tar.xz
linux-5f07aa7524e98d6f68f2bec54f155ef6012e2c9a.zip
Merge commit 'paulus-perf/master' into next
Diffstat (limited to 'kernel')
-rw-r--r--kernel/hw_breakpoint.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/hw_breakpoint.c b/kernel/hw_breakpoint.c
index 7a56b22e0602..71ed3ce29e12 100644
--- a/kernel/hw_breakpoint.c
+++ b/kernel/hw_breakpoint.c
@@ -242,6 +242,17 @@ toggle_bp_slot(struct perf_event *bp, bool enable, enum bp_type_idx type,
}
/*
+ * Function to perform processor-specific cleanup during unregistration
+ */
+__weak void arch_unregister_hw_breakpoint(struct perf_event *bp)
+{
+ /*
+ * A weak stub function here for those archs that don't define
+ * it inside arch/.../kernel/hw_breakpoint.c
+ */
+}
+
+/*
* Contraints to check before allowing this new breakpoint counter:
*
* == Non-pinned counter == (Considered as pinned for now)
@@ -339,6 +350,7 @@ void release_bp_slot(struct perf_event *bp)
{
mutex_lock(&nr_bp_mutex);
+ arch_unregister_hw_breakpoint(bp);
__release_bp_slot(bp);
mutex_unlock(&nr_bp_mutex);