tile: Fix __pte_free_tlb
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Tue, 25 Jan 2011 17:31:12 +0000 (18:31 +0100)
committerChris Metcalf <cmetcalf@tilera.com>
Wed, 23 Feb 2011 20:58:09 +0000 (15:58 -0500)
Tile's __pte_free_tlb() implementation makes assumptions about the
generic mmu_gather implementation, cure this ;-)

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
arch/tile/mm/pgtable.c

index 1f5430c53d0db4cf62c992c656de7e1b2e9769e6..2c850d9864e38b8b7e4c4163853c4c6704bd7908 100644 (file)
@@ -252,19 +252,8 @@ void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte,
        int i;
 
        pgtable_page_dtor(pte);
-       tlb->need_flush = 1;
-       if (tlb_fast_mode(tlb)) {
-               struct page *pte_pages[L2_USER_PGTABLE_PAGES];
-               for (i = 0; i < L2_USER_PGTABLE_PAGES; ++i)
-                       pte_pages[i] = pte + i;
-               free_pages_and_swap_cache(pte_pages, L2_USER_PGTABLE_PAGES);
-               return;
-       }
-       for (i = 0; i < L2_USER_PGTABLE_PAGES; ++i) {
-               tlb->pages[tlb->nr++] = pte + i;
-               if (tlb->nr >= FREE_PTE_NR)
-                       tlb_flush_mmu(tlb, 0, 0);
-       }
+       for (i = 0; i < L2_USER_PGTABLE_PAGES; ++i)
+               tlb_remove_page(tlb, pte + i);
 }
 
 #ifndef __tilegx__