Merge branches 'stable/ia64', 'stable/blkfront-cleanup' and 'stable/cleanup' of git...
[pandora-kernel.git] / arch / s390 / include / asm / tlb.h
index fd1c00d..9074a54 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 #include <linux/mm.h>
+#include <linux/pagemap.h>
 #include <linux/swap.h>
 #include <asm/processor.h>
 #include <asm/pgalloc.h>
@@ -64,10 +65,9 @@ static inline void tlb_flush_mmu(struct mmu_gather *tlb,
        if (!tlb->fullmm && (tlb->nr_ptes > 0 || tlb->nr_pxds < TLB_NR_PTRS))
                __tlb_flush_mm(tlb->mm);
        while (tlb->nr_ptes > 0)
-               pte_free(tlb->mm, tlb->array[--tlb->nr_ptes]);
+               page_table_free_rcu(tlb->mm, tlb->array[--tlb->nr_ptes]);
        while (tlb->nr_pxds < TLB_NR_PTRS)
-               /* pgd_free frees the pointer as region or segment table */
-               pgd_free(tlb->mm, tlb->array[tlb->nr_pxds++]);
+               crst_table_free_rcu(tlb->mm, tlb->array[tlb->nr_pxds++]);
 }
 
 static inline void tlb_finish_mmu(struct mmu_gather *tlb,
@@ -75,6 +75,8 @@ static inline void tlb_finish_mmu(struct mmu_gather *tlb,
 {
        tlb_flush_mmu(tlb, start, end);
 
+       rcu_table_freelist_finish();
+
        /* keep the page table cache within bounds */
        check_pgt_cache();
 
@@ -103,7 +105,7 @@ static inline void pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte,
                if (tlb->nr_ptes >= tlb->nr_pxds)
                        tlb_flush_mmu(tlb, 0, 0);
        } else
-               pte_free(tlb->mm, pte);
+               page_table_free(tlb->mm, (unsigned long *) pte);
 }
 
 /*
@@ -124,7 +126,7 @@ static inline void pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd,
                if (tlb->nr_ptes >= tlb->nr_pxds)
                        tlb_flush_mmu(tlb, 0, 0);
        } else
-               pmd_free(tlb->mm, pmd);
+               crst_table_free(tlb->mm, (unsigned long *) pmd);
 #endif
 }
 
@@ -146,7 +148,7 @@ static inline void pud_free_tlb(struct mmu_gather *tlb, pud_t *pud,
                if (tlb->nr_ptes >= tlb->nr_pxds)
                        tlb_flush_mmu(tlb, 0, 0);
        } else
-               pud_free(tlb->mm, pud);
+               crst_table_free(tlb->mm, (unsigned long *) pud);
 #endif
 }