X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=include%2Fasm-parisc%2Ftlbflush.h;h=eb27b78930e811460eb4ae0be49f4b5c9abffabf;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=86ba2c7ec6f3e59f5b615d0c2b4bd6f4917676d3;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/include/asm-parisc/tlbflush.h b/include/asm-parisc/tlbflush.h index 86ba2c7ec..eb27b7893 100644 --- a/include/asm-parisc/tlbflush.h +++ b/include/asm-parisc/tlbflush.h @@ -51,9 +51,12 @@ static inline void flush_tlb_page(struct vm_area_struct *vma, { /* For one page, it's not worth testing the split_tlb variable */ + mb(); mtsp(vma->vm_mm->context,1); + purge_tlb_start(); pdtlb(addr); pitlb(addr); + purge_tlb_end(); } static inline void flush_tlb_range(struct vm_area_struct *vma, @@ -61,6 +64,7 @@ static inline void flush_tlb_range(struct vm_area_struct *vma, { unsigned long npages; + npages = ((end - (start & PAGE_MASK)) + (PAGE_SIZE - 1)) >> PAGE_SHIFT; if (npages >= 512) /* XXX arbitrary, should be tuned */ flush_tlb_all(); @@ -68,16 +72,20 @@ static inline void flush_tlb_range(struct vm_area_struct *vma, mtsp(vma->vm_mm->context,1); if (split_tlb) { + purge_tlb_start(); while (npages--) { pdtlb(start); pitlb(start); start += PAGE_SIZE; } + purge_tlb_end(); } else { + purge_tlb_start(); while (npages--) { pdtlb(start); start += PAGE_SIZE; } + purge_tlb_end(); } } }