aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@openvz.org>2007-10-19 02:40:41 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 14:53:43 -0400
commit19c5870c0eefd27c6d09d867465e0571262e05d0 (patch)
tree8244d3beb5cc24a75e47bd28a4f3ec7921992338 /arch/x86
parentba25f9dcc4ea6e30839fcab5a5516f2176d5bfed (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/x86')
-rw-r--r--arch/x86/kernel/process_32.c2
-rw-r--r--arch/x86/kernel/signal_32.c4
-rw-r--r--arch/x86/kernel/traps_32.c4
-rw-r--r--arch/x86/mm/fault_32.c4
4 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
index 097aeafce5ff..044a47745a5c 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -301,7 +301,7 @@ void show_regs(struct pt_regs * regs)
301 unsigned long d0, d1, d2, d3, d6, d7; 301 unsigned long d0, d1, d2, d3, d6, d7;
302 302
303 printk("\n"); 303 printk("\n");
304 printk("Pid: %d, comm: %20s\n", current->pid, current->comm); 304 printk("Pid: %d, comm: %20s\n", task_pid_nr(current), current->comm);
305 printk("EIP: %04x:[<%08lx>] CPU: %d\n",0xffff & regs->xcs,regs->eip, smp_processor_id()); 305 printk("EIP: %04x:[<%08lx>] CPU: %d\n",0xffff & regs->xcs,regs->eip, smp_processor_id());
306 print_symbol("EIP is at %s\n", regs->eip); 306 print_symbol("EIP is at %s\n", regs->eip);
307 307
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c
index 0d79df3c5631..6dc394b87255 100644
--- a/arch/x86/kernel/signal_32.c
+++ b/arch/x86/kernel/signal_32.c
@@ -200,8 +200,8 @@ badframe:
200 if (show_unhandled_signals && printk_ratelimit()) 200 if (show_unhandled_signals && printk_ratelimit())
201 printk("%s%s[%d] bad frame in sigreturn frame:%p eip:%lx" 201 printk("%s%s[%d] bad frame in sigreturn frame:%p eip:%lx"
202 " esp:%lx oeax:%lx\n", 202 " esp:%lx oeax:%lx\n",
203 current->pid > 1 ? KERN_INFO : KERN_EMERG, 203 task_pid_nr(current) > 1 ? KERN_INFO : KERN_EMERG,
204 current->comm, current->pid, frame, regs->eip, 204 current->comm, task_pid_nr(current), frame, regs->eip,
205 regs->esp, regs->orig_eax); 205 regs->esp, regs->orig_eax);
206 206
207 force_sig(SIGSEGV, current); 207 force_sig(SIGSEGV, current);
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c
index b132d3957dfc..1e9d57256eb1 100644
--- a/arch/x86/kernel/traps_32.c
+++ b/arch/x86/kernel/traps_32.c
@@ -316,7 +316,7 @@ void show_registers(struct pt_regs *regs)
316 printk(KERN_EMERG "ds: %04x es: %04x fs: %04x gs: %04x ss: %04x\n", 316 printk(KERN_EMERG "ds: %04x es: %04x fs: %04x gs: %04x ss: %04x\n",
317 regs->xds & 0xffff, regs->xes & 0xffff, regs->xfs & 0xffff, gs, ss); 317 regs->xds & 0xffff, regs->xes & 0xffff, regs->xfs & 0xffff, gs, ss);
318 printk(KERN_EMERG "Process %.*s (pid: %d, ti=%p task=%p task.ti=%p)", 318 printk(KERN_EMERG "Process %.*s (pid: %d, ti=%p task=%p task.ti=%p)",
319 TASK_COMM_LEN, current->comm, current->pid, 319 TASK_COMM_LEN, current->comm, task_pid_nr(current),
320 current_thread_info(), current, task_thread_info(current)); 320 current_thread_info(), current, task_thread_info(current));
321 /* 321 /*
322 * When in-kernel, we also print out the stack and code at the 322 * When in-kernel, we also print out the stack and code at the
@@ -622,7 +622,7 @@ fastcall void __kprobes do_general_protection(struct pt_regs * regs,
622 printk_ratelimit()) 622 printk_ratelimit())
623 printk(KERN_INFO 623 printk(KERN_INFO
624 "%s[%d] general protection eip:%lx esp:%lx error:%lx\n", 624 "%s[%d] general protection eip:%lx esp:%lx error:%lx\n",
625 current->comm, current->pid, 625 current->comm, task_pid_nr(current),
626 regs->eip, regs->esp, error_code); 626 regs->eip, regs->esp, error_code);
627 627
628 force_sig(SIGSEGV, current); 628 force_sig(SIGSEGV, current);
diff --git a/arch/x86/mm/fault_32.c b/arch/x86/mm/fault_32.c
index 4fc5e400cf0a..4d3e538c57ab 100644
--- a/arch/x86/mm/fault_32.c
+++ b/arch/x86/mm/fault_32.c
@@ -471,8 +471,8 @@ bad_area_nosemaphore:
471 printk_ratelimit()) { 471 printk_ratelimit()) {
472 printk("%s%s[%d]: segfault at %08lx eip %08lx " 472 printk("%s%s[%d]: segfault at %08lx eip %08lx "
473 "esp %08lx error %lx\n", 473 "esp %08lx error %lx\n",
474 tsk->pid > 1 ? KERN_INFO : KERN_EMERG, 474 task_pid_nr(tsk) > 1 ? KERN_INFO : KERN_EMERG,
475 tsk->comm, tsk->pid, address, regs->eip, 475 tsk->comm, task_pid_nr(tsk), address, regs->eip,
476 regs->esp, error_code); 476 regs->esp, error_code);
477 } 477 }
478 tsk->thread.cr2 = address; 478 tsk->thread.cr2 = address;