Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] powerpc: export validate_sp for oprofile calltrace

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>

authored by

Anton Blanchard and committed by
Paul Mackerras
2f25194d 72533db0

+7 -1
+3 -1
arch/powerpc/kernel/process.c
··· 770 770 return error; 771 771 } 772 772 773 - static int validate_sp(unsigned long sp, struct task_struct *p, 773 + int validate_sp(unsigned long sp, struct task_struct *p, 774 774 unsigned long nbytes) 775 775 { 776 776 unsigned long stack_page = (unsigned long)task_stack_page(p); ··· 807 807 #define REGS_MARKER 0x72656773ul 808 808 #define FRAME_MARKER 2 809 809 #endif 810 + 811 + EXPORT_SYMBOL(validate_sp); 810 812 811 813 unsigned long get_wchan(struct task_struct *p) 812 814 {
+4
include/asm-powerpc/processor.h
··· 251 251 #define cpu_relax() barrier() 252 252 #endif 253 253 254 + /* Check that a certain kernel stack pointer is valid in task_struct p */ 255 + int validate_sp(unsigned long sp, struct task_struct *p, 256 + unsigned long nbytes); 257 + 254 258 /* 255 259 * Prefetch macros. 256 260 */