Remove obsolete #include <linux/config.h>
[pandora-kernel.git] / arch / powerpc / mm / tlb_64.c
index 859d29a..f6eef78 100644 (file)
@@ -22,7 +22,6 @@
  *  2 of the License, or (at your option) any later version.
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/init.h>
@@ -36,7 +35,7 @@
 DEFINE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch);
 
 /* This is declared as we are using the more or less generic
- * include/asm-ppc64/tlb.h file -- tgall
+ * include/asm-powerpc/tlb.h file -- tgall
  */
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
 DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur);
@@ -131,7 +130,7 @@ void hpte_update(struct mm_struct *mm, unsigned long addr,
 {
        struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch);
        unsigned long vsid;
-       unsigned int psize = mmu_virtual_psize;
+       unsigned int psize;
        int i;
 
        i = batch->index;
@@ -148,7 +147,8 @@ void hpte_update(struct mm_struct *mm, unsigned long addr,
 #else
                BUG();
 #endif
-       }
+       } else
+               psize = pte_pagesize_index(pte);
 
        /*
         * This can happen when we are in the middle of a TLB batch and
@@ -168,7 +168,7 @@ void hpte_update(struct mm_struct *mm, unsigned long addr,
                batch->mm = mm;
                batch->psize = psize;
        }
-       if (addr < KERNELBASE) {
+       if (!is_kernel_addr(addr)) {
                vsid = get_vsid(mm->context.id, addr);
                WARN_ON(vsid == 0);
        } else