This is the mail archive of the systemtap@sources.redhat.com mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC PATCH 5/6] kprobes: remove global kprobe_lock - sparc64 changes


Changes for sparc64 kprobes. Compile tested only.

Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>

 arch/sparc64/kernel/kprobes.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

Index: linux-2.6.13-rc3/arch/sparc64/kernel/kprobes.c
===================================================================
--- linux-2.6.13-rc3.orig/arch/sparc64/kernel/kprobes.c	2005-07-29 13:02:43.000000000 -0400
+++ linux-2.6.13-rc3/arch/sparc64/kernel/kprobes.c	2005-07-29 13:04:48.000000000 -0400
@@ -140,7 +140,7 @@ static int __kprobes kprobe_handler(stru
 			if (kcb->kprobe_status == KPROBE_HIT_SS) {
 				regs->tstate = ((regs->tstate & ~TSTATE_PIL) |
 					kcb->kprobe_orig_tstate_pil);
-				unlock_kprobes();
+				read_unlock(&kprobe_lock);
 				goto no_kprobe;
 			}
 			/* We have reentered the kprobe_handler(), since
@@ -164,10 +164,10 @@ static int __kprobes kprobe_handler(stru
 		goto no_kprobe;
 	}
 
-	lock_kprobes();
+	read_lock(&kprobe_lock);
 	p = get_kprobe(addr);
 	if (!p) {
-		unlock_kprobes();
+		read_unlock(&kprobe_lock);
 		if (*(u32 *)addr != BREAKPOINT_INSTRUCTION) {
 			/*
 			 * The breakpoint instruction was removed right
@@ -313,7 +313,7 @@ static inline int post_kprobe_handler(st
 		goto out;
 	}
 	reset_current_kprobe();
-	unlock_kprobes();
+	read_unlock(&kprobe_lock);
 out:
 	preempt_enable_no_resched();
 
@@ -333,7 +333,7 @@ static inline int kprobe_fault_handler(s
 		resume_execution(cur, regs, kcb);
 
 		reset_current_kprobe();
-		unlock_kprobes();
+		read_unlock(&kprobe_lock);
 		preempt_enable_no_resched();
 	}
 	return 0;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]