From 19c5870c0eefd27c6d09d867465e0571262e05d0 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Thu, 18 Oct 2007 23:40:41 -0700 Subject: 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 Signed-off-by: Pavel Emelyanov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/xtensa/kernel/traps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/xtensa/kernel') diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c index 8be99c777d9d..397bcd6ad08d 100644 --- a/arch/xtensa/kernel/traps.c +++ b/arch/xtensa/kernel/traps.c @@ -176,7 +176,7 @@ void do_unhandled(struct pt_regs *regs, unsigned long exccause) printk("Caught unhandled exception in '%s' " "(pid = %d, pc = %#010lx) - should not happen\n" "\tEXCCAUSE is %ld\n", - current->comm, current->pid, regs->pc, exccause); + current->comm, task_pid_nr(current), regs->pc, exccause); force_sig(SIGILL, current); } @@ -228,7 +228,7 @@ do_illegal_instruction(struct pt_regs *regs) /* If in user mode, send SIGILL signal to current process. */ printk("Illegal Instruction in '%s' (pid = %d, pc = %#010lx)\n", - current->comm, current->pid, regs->pc); + current->comm, task_pid_nr(current), regs->pc); force_sig(SIGILL, current); } @@ -254,7 +254,7 @@ do_unaligned_user (struct pt_regs *regs) current->thread.error_code = -3; printk("Unaligned memory access to %08lx in '%s' " "(pid = %d, pc = %#010lx)\n", - regs->excvaddr, current->comm, current->pid, regs->pc); + regs->excvaddr, current->comm, task_pid_nr(current), regs->pc); info.si_signo = SIGBUS; info.si_errno = 0; info.si_code = BUS_ADRALN; -- cgit v1.2.3-59-g8ed1b