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/parisc/kernel/traps.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'arch/parisc/kernel/traps.c') diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index bbf029a184a..99fd56939af 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c @@ -219,7 +219,7 @@ void die_if_kernel(char *str, struct pt_regs *regs, long err) return; /* STFU */ printk(KERN_CRIT "%s (pid %d): %s (code %ld) at " RFMT "\n", - current->comm, current->pid, str, err, regs->iaoq[0]); + current->comm, task_pid_nr(current), str, err, regs->iaoq[0]); #ifdef PRINT_USER_FAULTS /* XXX for debugging only */ show_regs(regs); @@ -252,7 +252,7 @@ KERN_CRIT " || ||\n"); if (err) printk(KERN_CRIT "%s (pid %d): %s (code %ld)\n", - current->comm, current->pid, str, err); + current->comm, task_pid_nr(current), str, err); /* Wot's wrong wif bein' racy? */ if (current->thread.flags & PARISC_KERNEL_DEATH) { @@ -317,7 +317,7 @@ static void handle_break(struct pt_regs *regs) if (unlikely(iir != GDB_BREAK_INSN)) { printk(KERN_DEBUG "break %d,%d: pid=%d command='%s'\n", iir & 31, (iir>>13) & ((1<<13)-1), - current->pid, current->comm); + task_pid_nr(current), current->comm); show_regs(regs); } #endif @@ -747,7 +747,7 @@ void handle_interruption(int code, struct pt_regs *regs) if (user_mode(regs)) { #ifdef PRINT_USER_FAULTS printk(KERN_DEBUG "\nhandle_interruption() pid=%d command='%s'\n", - current->pid, current->comm); + task_pid_nr(current), current->comm); show_regs(regs); #endif /* SIGBUS, for lack of a better one. */ @@ -772,7 +772,7 @@ void handle_interruption(int code, struct pt_regs *regs) else printk(KERN_DEBUG "User Fault (long pointer) (fault %d) ", code); - printk("pid=%d command='%s'\n", current->pid, current->comm); + printk("pid=%d command='%s'\n", task_pid_nr(current), current->comm); show_regs(regs); #endif si.si_signo = SIGSEGV; -- cgit v1.2.3