diff options
author | Andi Kleen <ak@suse.de> | 2006-12-06 20:14:00 -0500 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-12-06 20:14:00 -0500 |
commit | b615ebdac97c648a2ae7d23c5a0bbb3972adf928 (patch) | |
tree | febf50b76bd8396a80edfeec6ad88412f4515a34 /arch/x86_64/kernel | |
parent | 9b483417527f2e47985856867c5716df013227c7 (diff) |
[PATCH] x86: shorten lines in unwinder to be <= 80 characters
Andrew complained about > 80 character lines in the new unwinder.
Fix that.
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/x86_64/kernel')
-rw-r--r-- | arch/x86_64/kernel/traps.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index 0d65b22f229c..d3f43c958ca1 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -235,6 +235,8 @@ static int dump_trace_unwind(struct unwind_frame_info *info, void *context) | |||
235 | return n; | 235 | return n; |
236 | } | 236 | } |
237 | 237 | ||
238 | #define MSG(txt) ops->warning(data, txt) | ||
239 | |||
238 | /* | 240 | /* |
239 | * x86-64 can have upto three kernel stacks: | 241 | * x86-64 can have upto three kernel stacks: |
240 | * process stack | 242 | * process stack |
@@ -248,11 +250,12 @@ static inline int valid_stack_ptr(struct thread_info *tinfo, void *p) | |||
248 | return p > t && p < t + THREAD_SIZE - 3; | 250 | return p > t && p < t + THREAD_SIZE - 3; |
249 | } | 251 | } |
250 | 252 | ||
251 | void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * stack, | 253 | void dump_trace(struct task_struct *tsk, struct pt_regs *regs, |
254 | unsigned long *stack, | ||
252 | struct stacktrace_ops *ops, void *data) | 255 | struct stacktrace_ops *ops, void *data) |
253 | { | 256 | { |
254 | const unsigned cpu = smp_processor_id(); | 257 | const unsigned cpu = smp_processor_id(); |
255 | unsigned long *irqstack_end = (unsigned long *)cpu_pda(cpu)->irqstackptr; | 258 | unsigned long *irqstack_end = (unsigned long*)cpu_pda(cpu)->irqstackptr; |
256 | unsigned used = 0; | 259 | unsigned used = 0; |
257 | struct thread_info *tinfo; | 260 | struct thread_info *tinfo; |
258 | 261 | ||
@@ -268,28 +271,30 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * s | |||
268 | if (unwind_init_frame_info(&info, tsk, regs) == 0) | 271 | if (unwind_init_frame_info(&info, tsk, regs) == 0) |
269 | unw_ret = dump_trace_unwind(&info, &oad); | 272 | unw_ret = dump_trace_unwind(&info, &oad); |
270 | } else if (tsk == current) | 273 | } else if (tsk == current) |
271 | unw_ret = unwind_init_running(&info, dump_trace_unwind, &oad); | 274 | unw_ret = unwind_init_running(&info, dump_trace_unwind, |
275 | &oad); | ||
272 | else { | 276 | else { |
273 | if (unwind_init_blocked(&info, tsk) == 0) | 277 | if (unwind_init_blocked(&info, tsk) == 0) |
274 | unw_ret = dump_trace_unwind(&info, &oad); | 278 | unw_ret = dump_trace_unwind(&info, &oad); |
275 | } | 279 | } |
276 | if (unw_ret > 0) { | 280 | if (unw_ret > 0) { |
277 | if (call_trace == 1 && !arch_unw_user_mode(&info)) { | 281 | if (call_trace == 1 && !arch_unw_user_mode(&info)) { |
278 | ops->warning_symbol(data, "DWARF2 unwinder stuck at %s\n", | 282 | ops->warning_symbol(data, |
283 | "DWARF2 unwinder stuck at %s\n", | ||
279 | UNW_PC(&info)); | 284 | UNW_PC(&info)); |
280 | if ((long)UNW_SP(&info) < 0) { | 285 | if ((long)UNW_SP(&info) < 0) { |
281 | ops->warning(data, "Leftover inexact backtrace:\n"); | 286 | MSG("Leftover inexact backtrace:"); |
282 | stack = (unsigned long *)UNW_SP(&info); | 287 | stack = (unsigned long *)UNW_SP(&info); |
283 | if (!stack) | 288 | if (!stack) |
284 | return; | 289 | return; |
285 | } else | 290 | } else |
286 | ops->warning(data, "Full inexact backtrace again:\n"); | 291 | MSG("Full inexact backtrace again:\n"); |
287 | } else if (call_trace >= 1) | 292 | } else if (call_trace >= 1) |
288 | return; | 293 | return; |
289 | else | 294 | else |
290 | ops->warning(data, "Full inexact backtrace again:\n"); | 295 | MSG("Full inexact backtrace again:\n"); |
291 | } else | 296 | } else |
292 | ops->warning(data, "Inexact backtrace:\n"); | 297 | MSG("Inexact backtrace:\n"); |
293 | } | 298 | } |
294 | if (!stack) { | 299 | if (!stack) { |
295 | unsigned long dummy; | 300 | unsigned long dummy; |