Index: linux-2.6.21-rc4/include/asm-generic/tlb.h =================================================================== --- linux-2.6.21-rc4.orig/include/asm-generic/tlb.h 2007-03-26 10:28:40.000000000 -0700 +++ linux-2.6.21-rc4/include/asm-generic/tlb.h 2007-03-26 10:49:16.000000000 -0700 @@ -68,12 +68,15 @@ static inline void tlb_flush_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) { + int i; + if (!tlb->need_flush) return; tlb->need_flush = 0; tlb_flush(tlb); if (!tlb_fast_mode(tlb)) { - free_pages_and_swap_cache(tlb->pages, tlb->nr); + for(i = 0; i < tlb->nr; i++) + pte_free(tlb->pages[i]); tlb->nr = 0; } } @@ -102,7 +105,7 @@ { tlb->need_flush = 1; if (tlb_fast_mode(tlb)) { - free_page_and_swap_cache(page); + pte_free(page); return; } tlb->pages[tlb->nr++] = page;