aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2007-10-17 12:04:40 -0400
committerThomas Gleixner <tglx@inhelltoy.tec.linutronix.de>2007-10-17 14:16:52 -0400
commit9aa8d7195acb18fc436847f6c66a97f8359ad54d (patch)
treedea6832422b478791007c49e8cc6ccd414d900e9 /arch/x86/mm
parentc1e3619edd2b3e17450d745e27e335490cafd78d (diff)
i386: clean up oops/bug reports
Typically the oops first lines look like this: BUG: unable to handle kernel NULL pointer dereference at virtual address 00000000 printing eip: c049dfbd *pde = 00000000 Oops: 0002 [#1] PREEMPT SMP ... Such output is gained with some ugly if (!nl) printk("\n"); code and besides being a waste of lines, this is also annoying to read. The following output looks better (and it is how it looks on x86_64): BUG: unable to handle kernel NULL pointer dereference at virtual address 00000000 printing eip: c049dfbd *pde = 00000000 Oops: 0002 [#1] PREEMPT SMP ... [ tglx: arch/x86 adaptation ] Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r--arch/x86/mm/fault_32.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/x86/mm/fault_32.c b/arch/x86/mm/fault_32.c
index c686ae20fd6b..d84314ce22bb 100644
--- a/arch/x86/mm/fault_32.c
+++ b/arch/x86/mm/fault_32.c
@@ -539,23 +539,22 @@ no_context:
539 printk(KERN_ALERT "BUG: unable to handle kernel paging" 539 printk(KERN_ALERT "BUG: unable to handle kernel paging"
540 " request"); 540 " request");
541 printk(" at virtual address %08lx\n",address); 541 printk(" at virtual address %08lx\n",address);
542 printk(KERN_ALERT " printing eip:\n"); 542 printk(KERN_ALERT "printing eip: %08lx ", regs->eip);
543 printk("%08lx\n", regs->eip);
544 543
545 page = read_cr3(); 544 page = read_cr3();
546 page = ((__typeof__(page) *) __va(page))[address >> PGDIR_SHIFT]; 545 page = ((__typeof__(page) *) __va(page))[address >> PGDIR_SHIFT];
547#ifdef CONFIG_X86_PAE 546#ifdef CONFIG_X86_PAE
548 printk(KERN_ALERT "*pdpt = %016Lx\n", page); 547 printk("*pdpt = %016Lx ", page);
549 if ((page >> PAGE_SHIFT) < max_low_pfn 548 if ((page >> PAGE_SHIFT) < max_low_pfn
550 && page & _PAGE_PRESENT) { 549 && page & _PAGE_PRESENT) {
551 page &= PAGE_MASK; 550 page &= PAGE_MASK;
552 page = ((__typeof__(page) *) __va(page))[(address >> PMD_SHIFT) 551 page = ((__typeof__(page) *) __va(page))[(address >> PMD_SHIFT)
553 & (PTRS_PER_PMD - 1)]; 552 & (PTRS_PER_PMD - 1)];
554 printk(KERN_ALERT "*pde = %016Lx\n", page); 553 printk(KERN_ALERT "*pde = %016Lx ", page);
555 page &= ~_PAGE_NX; 554 page &= ~_PAGE_NX;
556 } 555 }
557#else 556#else
558 printk(KERN_ALERT "*pde = %08lx\n", page); 557 printk("*pde = %08lx ", page);
559#endif 558#endif
560 559
561 /* 560 /*
@@ -569,8 +568,10 @@ no_context:
569 page &= PAGE_MASK; 568 page &= PAGE_MASK;
570 page = ((__typeof__(page) *) __va(page))[(address >> PAGE_SHIFT) 569 page = ((__typeof__(page) *) __va(page))[(address >> PAGE_SHIFT)
571 & (PTRS_PER_PTE - 1)]; 570 & (PTRS_PER_PTE - 1)];
572 printk(KERN_ALERT "*pte = %0*Lx\n", sizeof(page)*2, (u64)page); 571 printk("*pte = %0*Lx ", sizeof(page)*2, (u64)page);
573 } 572 }
573
574 printk("\n");
574 } 575 }
575 576
576 tsk->thread.cr2 = address; 577 tsk->thread.cr2 = address;