diff options
author | Alexey Dobriyan <adobriyan@openvz.org> | 2007-10-19 02:40:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 14:53:43 -0400 |
commit | 19c5870c0eefd27c6d09d867465e0571262e05d0 (patch) | |
tree | 8244d3beb5cc24a75e47bd28a4f3ec7921992338 /arch/arm/kernel | |
parent | ba25f9dcc4ea6e30839fcab5a5516f2176d5bfed (diff) |
Use helpers to obtain task pid in printks (arch code)
One of the easiest things to isolate is the pid printed in kernel log.
There was a patch, that made this for arch-independent code, this one makes
so for arch/xxx files.
It took some time to cross-compile it, but hopefully these are all the
printks in arch code.
Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/arm/kernel/ptrace.c | 8 | ||||
-rw-r--r-- | arch/arm/kernel/traps.c | 10 |
3 files changed, 10 insertions, 10 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 93b7f8e22dcc..4f1a03124a74 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -265,7 +265,7 @@ void __show_regs(struct pt_regs *regs) | |||
265 | void show_regs(struct pt_regs * regs) | 265 | void show_regs(struct pt_regs * regs) |
266 | { | 266 | { |
267 | printk("\n"); | 267 | printk("\n"); |
268 | printk("Pid: %d, comm: %20s\n", current->pid, current->comm); | 268 | printk("Pid: %d, comm: %20s\n", task_pid_nr(current), current->comm); |
269 | __show_regs(regs); | 269 | __show_regs(regs); |
270 | __backtrace(); | 270 | __backtrace(); |
271 | } | 271 | } |
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 5feee722ea98..4b05dc5c1023 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
@@ -382,16 +382,16 @@ static void clear_breakpoint(struct task_struct *task, struct debug_entry *bp) | |||
382 | 382 | ||
383 | if (ret != 2 || old_insn.thumb != BREAKINST_THUMB) | 383 | if (ret != 2 || old_insn.thumb != BREAKINST_THUMB) |
384 | printk(KERN_ERR "%s:%d: corrupted Thumb breakpoint at " | 384 | printk(KERN_ERR "%s:%d: corrupted Thumb breakpoint at " |
385 | "0x%08lx (0x%04x)\n", task->comm, task->pid, | 385 | "0x%08lx (0x%04x)\n", task->comm, |
386 | addr, old_insn.thumb); | 386 | task_pid_nr(task), addr, old_insn.thumb); |
387 | } else { | 387 | } else { |
388 | ret = swap_insn(task, addr & ~3, &old_insn.arm, | 388 | ret = swap_insn(task, addr & ~3, &old_insn.arm, |
389 | &bp->insn.arm, 4); | 389 | &bp->insn.arm, 4); |
390 | 390 | ||
391 | if (ret != 4 || old_insn.arm != BREAKINST_ARM) | 391 | if (ret != 4 || old_insn.arm != BREAKINST_ARM) |
392 | printk(KERN_ERR "%s:%d: corrupted ARM breakpoint at " | 392 | printk(KERN_ERR "%s:%d: corrupted ARM breakpoint at " |
393 | "0x%08lx (0x%08x)\n", task->comm, task->pid, | 393 | "0x%08lx (0x%08x)\n", task->comm, |
394 | addr, old_insn.arm); | 394 | task_pid_nr(task), addr, old_insn.arm); |
395 | } | 395 | } |
396 | } | 396 | } |
397 | 397 | ||
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 8ad47619c079..4764bd9ccee8 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -223,7 +223,7 @@ static void __die(const char *str, int err, struct thread_info *thread, struct p | |||
223 | print_modules(); | 223 | print_modules(); |
224 | __show_regs(regs); | 224 | __show_regs(regs); |
225 | printk("Process %s (pid: %d, stack limit = 0x%p)\n", | 225 | printk("Process %s (pid: %d, stack limit = 0x%p)\n", |
226 | tsk->comm, tsk->pid, thread + 1); | 226 | tsk->comm, task_pid_nr(tsk), thread + 1); |
227 | 227 | ||
228 | if (!user_mode(regs) || in_interrupt()) { | 228 | if (!user_mode(regs) || in_interrupt()) { |
229 | dump_mem("Stack: ", regs->ARM_sp, | 229 | dump_mem("Stack: ", regs->ARM_sp, |
@@ -337,7 +337,7 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs) | |||
337 | #ifdef CONFIG_DEBUG_USER | 337 | #ifdef CONFIG_DEBUG_USER |
338 | if (user_debug & UDBG_UNDEFINED) { | 338 | if (user_debug & UDBG_UNDEFINED) { |
339 | printk(KERN_INFO "%s (%d): undefined instruction: pc=%p\n", | 339 | printk(KERN_INFO "%s (%d): undefined instruction: pc=%p\n", |
340 | current->comm, current->pid, pc); | 340 | current->comm, task_pid_nr(current), pc); |
341 | dump_instr(regs); | 341 | dump_instr(regs); |
342 | } | 342 | } |
343 | #endif | 343 | #endif |
@@ -388,7 +388,7 @@ static int bad_syscall(int n, struct pt_regs *regs) | |||
388 | #ifdef CONFIG_DEBUG_USER | 388 | #ifdef CONFIG_DEBUG_USER |
389 | if (user_debug & UDBG_SYSCALL) { | 389 | if (user_debug & UDBG_SYSCALL) { |
390 | printk(KERN_ERR "[%d] %s: obsolete system call %08x.\n", | 390 | printk(KERN_ERR "[%d] %s: obsolete system call %08x.\n", |
391 | current->pid, current->comm, n); | 391 | task_pid_nr(current), current->comm, n); |
392 | dump_instr(regs); | 392 | dump_instr(regs); |
393 | } | 393 | } |
394 | #endif | 394 | #endif |
@@ -565,7 +565,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) | |||
565 | */ | 565 | */ |
566 | if (user_debug & UDBG_SYSCALL) { | 566 | if (user_debug & UDBG_SYSCALL) { |
567 | printk("[%d] %s: arm syscall %d\n", | 567 | printk("[%d] %s: arm syscall %d\n", |
568 | current->pid, current->comm, no); | 568 | task_pid_nr(current), current->comm, no); |
569 | dump_instr(regs); | 569 | dump_instr(regs); |
570 | if (user_mode(regs)) { | 570 | if (user_mode(regs)) { |
571 | __show_regs(regs); | 571 | __show_regs(regs); |
@@ -642,7 +642,7 @@ baddataabort(int code, unsigned long instr, struct pt_regs *regs) | |||
642 | #ifdef CONFIG_DEBUG_USER | 642 | #ifdef CONFIG_DEBUG_USER |
643 | if (user_debug & UDBG_BADABORT) { | 643 | if (user_debug & UDBG_BADABORT) { |
644 | printk(KERN_ERR "[%d] %s: bad data abort: code %d instr 0x%08lx\n", | 644 | printk(KERN_ERR "[%d] %s: bad data abort: code %d instr 0x%08lx\n", |
645 | current->pid, current->comm, code, instr); | 645 | task_pid_nr(current), current->comm, code, instr); |
646 | dump_instr(regs); | 646 | dump_instr(regs); |
647 | show_pte(current->mm, addr); | 647 | show_pte(current->mm, addr); |
648 | } | 648 | } |