summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-07-09 11:25:48 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-07-09 11:25:48 +1000
commit5f07aa7524e98d6f68f2bec54f155ef6012e2c9a (patch)
tree393b2db3213e6618ad1338f9b66019b0c05c6f75 /kernel
parente467e104bb7482170b79f516d2025e7cfcaaa733 (diff)
parentd09ec7387184eba9e3030496f0451204090ff610 (diff)
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);