[PATCH] powerpc: export validate_sp for oprofile calltrace
authorAnton Blanchard <anton@samba.org>
Mon, 27 Mar 2006 00:46:18 +0000 (11:46 +1100)
committerPaul Mackerras <paulus@samba.org>
Tue, 28 Mar 2006 05:19:52 +0000 (16:19 +1100)
Export validate_sp so we can use it in the oprofile calltrace code.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/process.c
include/asm-powerpc/processor.h

index c6e81bb..706090c 100644 (file)
@@ -770,7 +770,7 @@ out:
        return error;
 }
 
-static int validate_sp(unsigned long sp, struct task_struct *p,
+int validate_sp(unsigned long sp, struct task_struct *p,
                       unsigned long nbytes)
 {
        unsigned long stack_page = (unsigned long)task_stack_page(p);
@@ -808,6 +808,8 @@ static int validate_sp(unsigned long sp, struct task_struct *p,
 #define FRAME_MARKER   2
 #endif
 
+EXPORT_SYMBOL(validate_sp);
+
 unsigned long get_wchan(struct task_struct *p)
 {
        unsigned long ip, sp;
index a64198f..57643b5 100644 (file)
@@ -251,6 +251,10 @@ static inline unsigned long __pack_fe01(unsigned int fpmode)
 #define cpu_relax()    barrier()
 #endif
 
+/* Check that a certain kernel stack pointer is valid in task_struct p */
+int validate_sp(unsigned long sp, struct task_struct *p,
+                       unsigned long nbytes);
+
 /*
  * Prefetch macros.
  */