Re: [PATCH] sparc64: add function save_stack_trace_tsk()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Alexander Beregalov <a.beregalov@xxxxxxxxx>
Date: Wed, 12 Nov 2008 16:47:49 +0300

> Current -next does not build on sparc64:
>   LD      .tmp_vmlinux1
>   fs/built-in.o: In function `proc_pid_stack':
>   /home/alexb/linux-2.6/fs/proc/base.c:360: undefined reference to
>   `save_stack_trace_tsk'
> 
> ---
> 
>   Add function save_stack_trace_tsk() on sparc64.
> 
> 
> Signed-off-by: Alexander Beregalov <a.beregalov@xxxxxxxxx>

This won't work as-is.

The save_stack_trace() function starts with the actual frame-pointer
register in the current cpu to start winding back the stack.  So
when 'tsk' is not 'current' nothing will be saved.  That's what this
bit of code is doing:

	__asm__ __volatile__(
		"mov	%%fp, %0"
		: "=r" (ksp)
	);

	fp = ksp + STACK_BIAS;

Also, "stack_trace_flush()" should only be run when current == tsk.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux