Merge branch 'master' into upstream
[pandora-kernel.git] / arch / x86_64 / mm / fault.c
index 08dc696..4198798 100644 (file)
@@ -5,7 +5,6 @@
  *  Copyright (C) 2001,2002 Andi Kleen, SuSE Labs.
  */
 
-#include <linux/config.h>
 #include <linux/signal.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
@@ -300,7 +299,7 @@ static int vmalloc_fault(unsigned long address)
        if (pgd_none(*pgd))
                set_pgd(pgd, *pgd_ref);
        else
-               BUG_ON(pgd_page(*pgd) != pgd_page(*pgd_ref));
+               BUG_ON(pgd_page_vaddr(*pgd) != pgd_page_vaddr(*pgd_ref));
 
        /* Below here mismatches are bugs because these lower tables
           are shared */
@@ -309,7 +308,7 @@ static int vmalloc_fault(unsigned long address)
        pud_ref = pud_offset(pgd_ref, address);
        if (pud_none(*pud_ref))
                return -1;
-       if (pud_none(*pud) || pud_page(*pud) != pud_page(*pud_ref))
+       if (pud_none(*pud) || pud_page_vaddr(*pud) != pud_page_vaddr(*pud_ref))
                BUG();
        pmd = pmd_offset(pud, address);
        pmd_ref = pmd_offset(pud_ref, address);
@@ -418,7 +417,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
        /* When running in the kernel we expect faults to occur only to
         * addresses in user space.  All other faults represent errors in the
         * kernel and should generate an OOPS.  Unfortunatly, in the case of an
-        * erroneous fault occuring in a code path which already holds mmap_sem
+        * erroneous fault occurring in a code path which already holds mmap_sem
         * we will deadlock attempting to validate the fault against the
         * address space.  Luckily the kernel only validly references user
         * space from well defined areas of code, which are listed in the
@@ -571,7 +570,6 @@ no_context:
                printk(KERN_ALERT "Unable to handle kernel paging request");
        printk(" at %016lx RIP: \n" KERN_ALERT,address);
        printk_address(regs->rip);
-       printk("\n");
        dump_pagetable(address);
        tsk->thread.cr2 = address;
        tsk->thread.trap_no = 14;
@@ -643,7 +641,7 @@ void vmalloc_sync_all(void)
                                if (pgd_none(*pgd))
                                        set_pgd(pgd, *pgd_ref);
                                else
-                                       BUG_ON(pgd_page(*pgd) != pgd_page(*pgd_ref));
+                                       BUG_ON(pgd_page_vaddr(*pgd) != pgd_page_vaddr(*pgd_ref));
                        }
                        spin_unlock(&pgd_lock);
                        set_bit(pgd_index(address), insync);