diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-13 06:05:58 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-13 06:05:58 -0400 |
commit | cd80a8142efa3468c2cd9fb52845f334c3220d54 (patch) | |
tree | 919e88994bd3c09b34ce852d0a09bb0655d231d0 /arch/x86/kernel/dumpstack_64.c | |
parent | 641cd4cfcdc71ce01535b31cc4d57d59a1fae1fc (diff) | |
parent | a98fe7f3425c6b4e90de16f8da63b0429a8fed08 (diff) |
Merge branch 'x86/core' into core/ipi
Diffstat (limited to 'arch/x86/kernel/dumpstack_64.c')
-rw-r--r-- | arch/x86/kernel/dumpstack_64.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c index c302d0707048..d35db5993fd6 100644 --- a/arch/x86/kernel/dumpstack_64.c +++ b/arch/x86/kernel/dumpstack_64.c | |||
@@ -106,7 +106,8 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs, | |||
106 | const struct stacktrace_ops *ops, void *data) | 106 | const struct stacktrace_ops *ops, void *data) |
107 | { | 107 | { |
108 | const unsigned cpu = get_cpu(); | 108 | const unsigned cpu = get_cpu(); |
109 | unsigned long *irqstack_end = (unsigned long *)cpu_pda(cpu)->irqstackptr; | 109 | unsigned long *irq_stack_end = |
110 | (unsigned long *)per_cpu(irq_stack_ptr, cpu); | ||
110 | unsigned used = 0; | 111 | unsigned used = 0; |
111 | struct thread_info *tinfo; | 112 | struct thread_info *tinfo; |
112 | int graph = 0; | 113 | int graph = 0; |
@@ -160,23 +161,23 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs, | |||
160 | stack = (unsigned long *) estack_end[-2]; | 161 | stack = (unsigned long *) estack_end[-2]; |
161 | continue; | 162 | continue; |
162 | } | 163 | } |
163 | if (irqstack_end) { | 164 | if (irq_stack_end) { |
164 | unsigned long *irqstack; | 165 | unsigned long *irq_stack; |
165 | irqstack = irqstack_end - | 166 | irq_stack = irq_stack_end - |
166 | (IRQSTACKSIZE - 64) / sizeof(*irqstack); | 167 | (IRQ_STACK_SIZE - 64) / sizeof(*irq_stack); |
167 | 168 | ||
168 | if (stack >= irqstack && stack < irqstack_end) { | 169 | if (stack >= irq_stack && stack < irq_stack_end) { |
169 | if (ops->stack(data, "IRQ") < 0) | 170 | if (ops->stack(data, "IRQ") < 0) |
170 | break; | 171 | break; |
171 | bp = print_context_stack(tinfo, stack, bp, | 172 | bp = print_context_stack(tinfo, stack, bp, |
172 | ops, data, irqstack_end, &graph); | 173 | ops, data, irq_stack_end, &graph); |
173 | /* | 174 | /* |
174 | * We link to the next stack (which would be | 175 | * We link to the next stack (which would be |
175 | * the process stack normally) the last | 176 | * the process stack normally) the last |
176 | * pointer (index -1 to end) in the IRQ stack: | 177 | * pointer (index -1 to end) in the IRQ stack: |
177 | */ | 178 | */ |
178 | stack = (unsigned long *) (irqstack_end[-1]); | 179 | stack = (unsigned long *) (irq_stack_end[-1]); |
179 | irqstack_end = NULL; | 180 | irq_stack_end = NULL; |
180 | ops->stack(data, "EOI"); | 181 | ops->stack(data, "EOI"); |
181 | continue; | 182 | continue; |
182 | } | 183 | } |
@@ -199,10 +200,10 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs, | |||
199 | unsigned long *stack; | 200 | unsigned long *stack; |
200 | int i; | 201 | int i; |
201 | const int cpu = smp_processor_id(); | 202 | const int cpu = smp_processor_id(); |
202 | unsigned long *irqstack_end = | 203 | unsigned long *irq_stack_end = |
203 | (unsigned long *) (cpu_pda(cpu)->irqstackptr); | 204 | (unsigned long *)(per_cpu(irq_stack_ptr, cpu)); |
204 | unsigned long *irqstack = | 205 | unsigned long *irq_stack = |
205 | (unsigned long *) (cpu_pda(cpu)->irqstackptr - IRQSTACKSIZE); | 206 | (unsigned long *)(per_cpu(irq_stack_ptr, cpu) - IRQ_STACK_SIZE); |
206 | 207 | ||
207 | /* | 208 | /* |
208 | * debugging aid: "show_stack(NULL, NULL);" prints the | 209 | * debugging aid: "show_stack(NULL, NULL);" prints the |
@@ -218,9 +219,9 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs, | |||
218 | 219 | ||
219 | stack = sp; | 220 | stack = sp; |
220 | for (i = 0; i < kstack_depth_to_print; i++) { | 221 | for (i = 0; i < kstack_depth_to_print; i++) { |
221 | if (stack >= irqstack && stack <= irqstack_end) { | 222 | if (stack >= irq_stack && stack <= irq_stack_end) { |
222 | if (stack == irqstack_end) { | 223 | if (stack == irq_stack_end) { |
223 | stack = (unsigned long *) (irqstack_end[-1]); | 224 | stack = (unsigned long *) (irq_stack_end[-1]); |
224 | printk(" <EOI> "); | 225 | printk(" <EOI> "); |
225 | } | 226 | } |
226 | } else { | 227 | } else { |
@@ -241,7 +242,7 @@ void show_registers(struct pt_regs *regs) | |||
241 | int i; | 242 | int i; |
242 | unsigned long sp; | 243 | unsigned long sp; |
243 | const int cpu = smp_processor_id(); | 244 | const int cpu = smp_processor_id(); |
244 | struct task_struct *cur = cpu_pda(cpu)->pcurrent; | 245 | struct task_struct *cur = current; |
245 | 246 | ||
246 | sp = regs->sp; | 247 | sp = regs->sp; |
247 | printk("CPU %d ", cpu); | 248 | printk("CPU %d ", cpu); |