mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [Patch 2/3] Allow arch-specific cleanup before breakpoint unregistration
       [not found] <20100512022527.857904312@linux.vnet.ibm.com>
@ 2010-05-12  3:33 ` K.Prasad
  0 siblings, 0 replies; only message in thread
From: K.Prasad @ 2010-05-12  3:33 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: David Gibson, Roland McGrath, Frederic Weisbecker,
	Michael Neuling, Alan Stern, paulus, shaggy,
	Benjamin Herrenschmidt, K.Prasad, Ingo Molnar,
	Linux Kernel Mailing List

[-- Attachment #1: arch_unregister_hbp_02 --]
[-- Type: text/plain, Size: 1284 bytes --]

Certain architectures (such as PowerPC Book III S) have a need to cleanup
data-structures before the breakpoint is unregistered. This patch introduces
an arch-specific hook in release_bp_slot() along with a weak definition in
the form of a stub funciton.

Signed-off-by: K.Prasad <prasad@linux.vnet.ibm.com>
---
 kernel/hw_breakpoint.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

Index: linux-2.6.ppc64_test/kernel/hw_breakpoint.c
===================================================================
--- linux-2.6.ppc64_test.orig/kernel/hw_breakpoint.c
+++ linux-2.6.ppc64_test/kernel/hw_breakpoint.c
@@ -203,6 +203,17 @@ static void toggle_bp_slot(struct perf_e
 }
 
 /*
+ * 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)
@@ -280,6 +291,7 @@ void release_bp_slot(struct perf_event *
 {
 	mutex_lock(&nr_bp_mutex);
 
+	arch_unregister_hw_breakpoint(bp);
 	__release_bp_slot(bp);
 
 	mutex_unlock(&nr_bp_mutex);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-05-12  3:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20100512022527.857904312@linux.vnet.ibm.com>
2010-05-12  3:33 ` [Patch 2/3] Allow arch-specific cleanup before breakpoint unregistration K.Prasad

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome