Skip to content

Commit 2f25194

Browse files
antonblanchardpaulusmack
authored andcommitted
[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>
1 parent 72533db commit 2f25194

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

‎arch/powerpc/kernel/process.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ int sys_execve(unsigned long a0, unsigned long a1, unsigned long a2,
770770
return error;
771771
}
772772

773-
static int validate_sp(unsigned long sp, struct task_struct *p,
773+
int validate_sp(unsigned long sp, struct task_struct *p,
774774
unsigned long nbytes)
775775
{
776776
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,
808808
#define FRAME_MARKER 2
809809
#endif
810810

811+
EXPORT_SYMBOL(validate_sp);
812+
811813
unsigned long get_wchan(struct task_struct *p)
812814
{
813815
unsigned long ip, sp;

‎include/asm-powerpc/processor.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,10 @@ static inline unsigned long __pack_fe01(unsigned int fpmode)
251251
#define cpu_relax() barrier()
252252
#endif
253253

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+
254258
/*
255259
* Prefetch macros.
256260
*/

0 commit comments

Comments
 (0)