From: Russell King Date: Tue, 9 Aug 2011 07:45:19 +0000 (+0100) Subject: Merge branches 'fixes', 'misc' and 'pgt' into for-next X-Git-Tag: next-20110810~71^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=296cc511dc07d0cc0f4ae04e64289b5b64dfada9;p=karo-tx-linux.git Merge branches 'fixes', 'misc' and 'pgt' into for-next --- 296cc511dc07d0cc0f4ae04e64289b5b64dfada9 diff --cc arch/arm/include/asm/tlb.h index 265f908c4a6e,265f908c4a6e,a116bef20cbe..b509e441e0ad --- a/arch/arm/include/asm/tlb.h +++ b/arch/arm/include/asm/tlb.h @@@@ -172,38 -172,38 -97,14 +172,39 @@@@ tlb_start_vma(struct mmu_gather *tlb, s static inline void tlb_end_vma(struct mmu_gather *tlb, struct vm_area_struct *vma) { - if (!tlb->fullmm && tlb->range_end > 0) - flush_tlb_range(vma, tlb->range_start, tlb->range_end); + if (!tlb->fullmm) + tlb_flush(tlb); +} + +static inline int __tlb_remove_page(struct mmu_gather *tlb, struct page *page) +{ + if (tlb_fast_mode(tlb)) { + free_page_and_swap_cache(page); + return 1; /* avoid calling tlb_flush_mmu */ + } + + tlb->pages[tlb->nr++] = page; + VM_BUG_ON(tlb->nr > tlb->max); + return tlb->max - tlb->nr; +} + +static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page) +{ + if (!__tlb_remove_page(tlb, page)) + tlb_flush_mmu(tlb); +} + +static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte, + unsigned long addr) +{ + pgtable_page_dtor(pte); + tlb_add_flush(tlb, addr); + tlb_remove_page(tlb, pte); } -#define tlb_remove_page(tlb,page) free_page_and_swap_cache(page) -#define pte_free_tlb(tlb, ptep, addr) pte_free((tlb)->mm, ptep) +#define pte_free_tlb(tlb, ptep, addr) __pte_free_tlb(tlb, ptep, addr) #define pmd_free_tlb(tlb, pmdp, addr) pmd_free((tlb)->mm, pmdp) ++ #define pud_free_tlb(tlb, pudp, addr) pud_free((tlb)->mm, pudp) #define tlb_migrate_finish(mm) do { } while (0)