aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-09-26 04:52:34 -0400
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 04:52:34 -0400
commit5a1b3999d6cb7ab87f1f3b1700bc91839fd6fa29 (patch)
treeec969406fe68d875d7904c364ea9a5b74c084567 /arch/i386
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/i386')
-rw-r--r--arch/i386/kernel/stacktrace.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/i386/kernel/stacktrace.c b/arch/i386/kernel/stacktrace.c
index e62a037ab399..ae3c32a87add 100644
--- a/arch/i386/kernel/stacktrace.c
+++ b/arch/i386/kernel/stacktrace.c
@@ -61,12 +61,8 @@ save_context_stack(struct stack_trace *trace, unsigned int skip,
61 61
62/* 62/*
63 * Save stack-backtrace addresses into a stack_trace buffer. 63 * Save stack-backtrace addresses into a stack_trace buffer.
64 * If all_contexts is set, all contexts (hardirq, softirq and process)
65 * are saved. If not set then only the current context is saved.
66 */ 64 */
67void save_stack_trace(struct stack_trace *trace, 65void save_stack_trace(struct stack_trace *trace, struct task_struct *task)
68 struct task_struct *task, int all_contexts,
69 unsigned int skip)
70{ 66{
71 unsigned long ebp; 67 unsigned long ebp;
72 unsigned long *stack = &ebp; 68 unsigned long *stack = &ebp;
@@ -85,10 +81,9 @@ void save_stack_trace(struct stack_trace *trace,
85 struct thread_info *context = (struct thread_info *) 81 struct thread_info *context = (struct thread_info *)
86 ((unsigned long)stack & (~(THREAD_SIZE - 1))); 82 ((unsigned long)stack & (~(THREAD_SIZE - 1)));
87 83
88 ebp = save_context_stack(trace, skip, context, stack, ebp); 84 ebp = save_context_stack(trace, trace->skip, context, stack, ebp);
89 stack = (unsigned long *)context->previous_esp; 85 stack = (unsigned long *)context->previous_esp;
90 if (!all_contexts || !stack || 86 if (!stack || trace->nr_entries >= trace->max_entries)
91 trace->nr_entries >= trace->max_entries)
92 break; 87 break;
93 trace->entries[trace->nr_entries++] = ULONG_MAX; 88 trace->entries[trace->nr_entries++] = ULONG_MAX;
94 if (trace->nr_entries >= trace->max_entries) 89 if (trace->nr_entries >= trace->max_entries)