]> err.no Git - linux-2.6/blobdiff - arch/powerpc/mm/tlb_64.c
powerpc: support multiple hugepage sizes
[linux-2.6] / arch / powerpc / mm / tlb_64.c
index eafbca52bff9ce1e4e58cc23d5ff03943434e6a0..409fcc7b63ce410872a2e6a58ca1f95f41bdf9e2 100644 (file)
@@ -37,8 +37,8 @@ DEFINE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch);
  * 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);
-unsigned long pte_freelist_forced_free;
+static DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur);
+static unsigned long pte_freelist_forced_free;
 
 struct pte_freelist_batch
 {
@@ -47,19 +47,14 @@ struct pte_freelist_batch
        pgtable_free_t  tables[0];
 };
 
-DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur);
-unsigned long pte_freelist_forced_free;
-
 #define PTE_FREELIST_SIZE \
        ((PAGE_SIZE - sizeof(struct pte_freelist_batch)) \
          / sizeof(pgtable_free_t))
 
-#ifdef CONFIG_SMP
 static void pte_free_smp_sync(void *arg)
 {
        /* Do nothing, just ensure we sync with all CPUs */
 }
-#endif
 
 /* This is only called when we are critically out of memory
  * (and fail to get a page in pte_free_tlb).
@@ -68,7 +63,7 @@ static void pgtable_free_now(pgtable_free_t pgf)
 {
        pte_freelist_forced_free++;
 
-       smp_call_function(pte_free_smp_sync, NULL, 0, 1);
+       smp_call_function(pte_free_smp_sync, NULL, 1);
 
        pgtable_free(pgf);
 }
@@ -152,7 +147,7 @@ void hpte_need_flush(struct mm_struct *mm, unsigned long addr,
         */
        if (huge) {
 #ifdef CONFIG_HUGETLB_PAGE
-               psize = mmu_huge_psize;
+               psize = get_slice_psize(mm, addr);;
 #else
                BUG();
                psize = pte_pagesize_index(mm, addr, pte); /* shutup gcc */