vserver 1.9.5.x5
[linux-2.6.git] / include / asm-parisc / tlbflush.h
index 86ba2c7..eb27b78 100644 (file)
@@ -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();
                }
        }
 }