aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/kernel/stacktrace.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-09-26 10:52:34 +0200
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 10:52:34 +0200
commit5a1b3999d6cb7ab87f1f3b1700bc91839fd6fa29 (patch)
treeec969406fe68d875d7904c364ea9a5b74c084567 /arch/x86_64/kernel/stacktrace.c
parent4ea8a5d8b57cd504b4b2de1212523848e7ab50cf (diff)
[PATCH] x86: Some preparationary cleanup for stack trace
- Remove unused all_contexts parameter No caller used it - Move skip argument into the structure (needed for followon patches) Cc: mingo@elte.hu Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/x86_64/kernel/stacktrace.c')
-rw-r--r--arch/x86_64/kernel/stacktrace.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/x86_64/kernel/stacktrace.c b/arch/x86_64/kernel/stacktrace.c
index 32cf55eb9af..1c022af8fe1 100644
--- a/arch/x86_64/kernel/stacktrace.c
+++ b/arch/x86_64/kernel/stacktrace.c
@@ -109,9 +109,10 @@ out_restore:
* Save stack-backtrace addresses into a stack_trace buffer:
*/
static inline unsigned long
-save_context_stack(struct stack_trace *trace, unsigned int skip,
+save_context_stack(struct stack_trace *trace,
unsigned long stack, unsigned long stack_end)
{
+ int skip = trace->skip;
unsigned long addr;
#ifdef CONFIG_FRAME_POINTER
@@ -159,12 +160,8 @@ save_context_stack(struct stack_trace *trace, unsigned int skip,
/*
* Save stack-backtrace addresses into a stack_trace buffer.
- * If all_contexts is set, all contexts (hardirq, softirq and process)
- * are saved. If not set then only the current context is saved.
*/
-void save_stack_trace(struct stack_trace *trace,
- struct task_struct *task, int all_contexts,
- unsigned int skip)
+void save_stack_trace(struct stack_trace *trace, struct task_struct *task)
{
unsigned long stack = (unsigned long)&stack;
int i, nr_stacks = 0, stacks_done[MAX_STACKS];
@@ -207,9 +204,8 @@ void save_stack_trace(struct stack_trace *trace,
return;
stacks_done[nr_stacks] = stack_end;
- stack = save_context_stack(trace, skip, stack, stack_end);
- if (!all_contexts || !stack ||
- trace->nr_entries >= trace->max_entries)
+ stack = save_context_stack(trace, stack, stack_end);
+ if (!stack || trace->nr_entries >= trace->max_entries)
return;
trace->entries[trace->nr_entries++] = ULONG_MAX;
if (trace->nr_entries >= trace->max_entries)