aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/dumpstack_64.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/x86/kernel/dumpstack_64.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'arch/x86/kernel/dumpstack_64.c')
-rw-r--r--arch/x86/kernel/dumpstack_64.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c
index 57a21f11c791..e71c98d3c0d2 100644
--- a/arch/x86/kernel/dumpstack_64.c
+++ b/arch/x86/kernel/dumpstack_64.c
@@ -149,29 +149,19 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
149 unsigned used = 0; 149 unsigned used = 0;
150 struct thread_info *tinfo; 150 struct thread_info *tinfo;
151 int graph = 0; 151 int graph = 0;
152 unsigned long dummy;
152 153
153 if (!task) 154 if (!task)
154 task = current; 155 task = current;
155 156
156 if (!stack) { 157 if (!stack) {
157 unsigned long dummy;
158 stack = &dummy; 158 stack = &dummy;
159 if (task && task != current) 159 if (task && task != current)
160 stack = (unsigned long *)task->thread.sp; 160 stack = (unsigned long *)task->thread.sp;
161 } 161 }
162 162
163#ifdef CONFIG_FRAME_POINTER 163 if (!bp)
164 if (!bp) { 164 bp = stack_frame(task, regs);
165 if (task == current) {
166 /* Grab bp right from our regs */
167 get_bp(bp);
168 } else {
169 /* bp is the last reg pushed by switch_to */
170 bp = *(unsigned long *) task->thread.sp;
171 }
172 }
173#endif
174
175 /* 165 /*
176 * Print function call entries in all stacks, starting at the 166 * Print function call entries in all stacks, starting at the
177 * current stack address. If the stacks consist of nested 167 * current stack address. If the stacks consist of nested
@@ -265,20 +255,20 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
265 if (stack >= irq_stack && stack <= irq_stack_end) { 255 if (stack >= irq_stack && stack <= irq_stack_end) {
266 if (stack == irq_stack_end) { 256 if (stack == irq_stack_end) {
267 stack = (unsigned long *) (irq_stack_end[-1]); 257 stack = (unsigned long *) (irq_stack_end[-1]);
268 printk(" <EOI> "); 258 printk(KERN_CONT " <EOI> ");
269 } 259 }
270 } else { 260 } else {
271 if (((long) stack & (THREAD_SIZE-1)) == 0) 261 if (((long) stack & (THREAD_SIZE-1)) == 0)
272 break; 262 break;
273 } 263 }
274 if (i && ((i % STACKSLOTS_PER_LINE) == 0)) 264 if (i && ((i % STACKSLOTS_PER_LINE) == 0))
275 printk("\n%s", log_lvl); 265 printk(KERN_CONT "\n");
276 printk(" %016lx", *stack++); 266 printk(KERN_CONT " %016lx", *stack++);
277 touch_nmi_watchdog(); 267 touch_nmi_watchdog();
278 } 268 }
279 preempt_enable(); 269 preempt_enable();
280 270
281 printk("\n"); 271 printk(KERN_CONT "\n");
282 show_trace_log_lvl(task, regs, sp, bp, log_lvl); 272 show_trace_log_lvl(task, regs, sp, bp, log_lvl);
283} 273}
284 274
@@ -308,7 +298,7 @@ void show_registers(struct pt_regs *regs)
308 298
309 printk(KERN_EMERG "Stack:\n"); 299 printk(KERN_EMERG "Stack:\n");
310 show_stack_log_lvl(NULL, regs, (unsigned long *)sp, 300 show_stack_log_lvl(NULL, regs, (unsigned long *)sp,
311 regs->bp, KERN_EMERG); 301 0, KERN_EMERG);
312 302
313 printk(KERN_EMERG "Code: "); 303 printk(KERN_EMERG "Code: ");
314 304