diff options
| -rw-r--r-- | arch/x86/kernel/dumpstack_64.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c index cfec478a4e42..8e740934bd1f 100644 --- a/arch/x86/kernel/dumpstack_64.c +++ b/arch/x86/kernel/dumpstack_64.c | |||
| @@ -206,19 +206,22 @@ void | |||
| 206 | show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs, | 206 | show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs, |
| 207 | unsigned long *sp, unsigned long bp, char *log_lvl) | 207 | unsigned long *sp, unsigned long bp, char *log_lvl) |
| 208 | { | 208 | { |
| 209 | unsigned long *irq_stack_end; | ||
| 210 | unsigned long *irq_stack; | ||
| 209 | unsigned long *stack; | 211 | unsigned long *stack; |
| 212 | int cpu; | ||
| 210 | int i; | 213 | int i; |
| 211 | const int cpu = smp_processor_id(); | 214 | |
| 212 | unsigned long *irq_stack_end = | 215 | preempt_disable(); |
| 213 | (unsigned long *)(per_cpu(irq_stack_ptr, cpu)); | 216 | cpu = smp_processor_id(); |
| 214 | unsigned long *irq_stack = | 217 | |
| 215 | (unsigned long *)(per_cpu(irq_stack_ptr, cpu) - IRQ_STACK_SIZE); | 218 | irq_stack_end = (unsigned long *)(per_cpu(irq_stack_ptr, cpu)); |
| 219 | irq_stack = (unsigned long *)(per_cpu(irq_stack_ptr, cpu) - IRQ_STACK_SIZE); | ||
| 216 | 220 | ||
| 217 | /* | 221 | /* |
| 218 | * debugging aid: "show_stack(NULL, NULL);" prints the | 222 | * Debugging aid: "show_stack(NULL, NULL);" prints the |
| 219 | * back trace for this cpu. | 223 | * back trace for this cpu: |
| 220 | */ | 224 | */ |
| 221 | |||
| 222 | if (sp == NULL) { | 225 | if (sp == NULL) { |
| 223 | if (task) | 226 | if (task) |
| 224 | sp = (unsigned long *)task->thread.sp; | 227 | sp = (unsigned long *)task->thread.sp; |
| @@ -242,6 +245,8 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs, | |||
| 242 | printk(" %016lx", *stack++); | 245 | printk(" %016lx", *stack++); |
| 243 | touch_nmi_watchdog(); | 246 | touch_nmi_watchdog(); |
| 244 | } | 247 | } |
| 248 | preempt_enable(); | ||
| 249 | |||
| 245 | printk("\n"); | 250 | printk("\n"); |
| 246 | show_trace_log_lvl(task, regs, sp, bp, log_lvl); | 251 | show_trace_log_lvl(task, regs, sp, bp, log_lvl); |
| 247 | } | 252 | } |
