diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2008-12-03 03:11:52 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-04 09:17:21 -0800 |
commit | a88b5ba8bd8ac18aad65ee6c6a254e2e74876db3 (patch) | |
tree | eb3d0ffaf53c3f7ec6083752c2097cecd1cb892a /arch/sparc64/kernel/stacktrace.c | |
parent | d670bd4f803c8b646acd20f3ba21e65458293faf (diff) |
sparc,sparc64: unify kernel/
o Move all files from sparc64/kernel/ to sparc/kernel
- rename as appropriate
o Update sparc/Makefile to the changes
o Update sparc/kernel/Makefile to include the sparc64 files
NOTE: This commit changes link order on sparc64!
Link order had to change for either of sparc32 and sparc64.
And assuming sparc64 see more testing than sparc32 change link
order on sparc64 where issues will be caught faster.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/stacktrace.c')
-rw-r--r-- | arch/sparc64/kernel/stacktrace.c | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/arch/sparc64/kernel/stacktrace.c b/arch/sparc64/kernel/stacktrace.c deleted file mode 100644 index acb12f673757..000000000000 --- a/arch/sparc64/kernel/stacktrace.c +++ /dev/null @@ -1,64 +0,0 @@ -#include <linux/sched.h> -#include <linux/stacktrace.h> -#include <linux/thread_info.h> -#include <linux/module.h> -#include <asm/ptrace.h> -#include <asm/stacktrace.h> - -#include "kstack.h" - -static void __save_stack_trace(struct thread_info *tp, - struct stack_trace *trace, - bool skip_sched) -{ - unsigned long ksp, fp; - - if (tp == current_thread_info()) { - stack_trace_flush(); - __asm__ __volatile__("mov %%fp, %0" : "=r" (ksp)); - } else { - ksp = tp->ksp; - } - - fp = ksp + STACK_BIAS; - do { - struct sparc_stackf *sf; - struct pt_regs *regs; - unsigned long pc; - - if (!kstack_valid(tp, fp)) - break; - - sf = (struct sparc_stackf *) fp; - regs = (struct pt_regs *) (sf + 1); - - if (kstack_is_trap_frame(tp, regs)) { - if (!(regs->tstate & TSTATE_PRIV)) - break; - pc = regs->tpc; - fp = regs->u_regs[UREG_I6] + STACK_BIAS; - } else { - pc = sf->callers_pc; - fp = (unsigned long)sf->fp + STACK_BIAS; - } - - if (trace->skip > 0) - trace->skip--; - else if (!skip_sched || !in_sched_functions(pc)) - trace->entries[trace->nr_entries++] = pc; - } while (trace->nr_entries < trace->max_entries); -} - -void save_stack_trace(struct stack_trace *trace) -{ - __save_stack_trace(current_thread_info(), trace, false); -} -EXPORT_SYMBOL_GPL(save_stack_trace); - -void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) -{ - struct thread_info *tp = task_thread_info(tsk); - - __save_stack_trace(tp, trace, true); -} -EXPORT_SYMBOL_GPL(save_stack_trace_tsk); |