vserver 1.9.5.x5
[linux-2.6.git] / arch / ppc / mm / tlb.c
index 3bf70f6..bedc104 100644 (file)
@@ -62,10 +62,21 @@ void flush_hash_one_pte(pte_t *ptep)
        ptepage = virt_to_page(ptep);
        mm = (struct mm_struct *) ptepage->mapping;
        ptephys = __pa(ptep) & PAGE_MASK;
-       addr = ptepage->index + (((unsigned long)ptep & ~PAGE_MASK) << 9);
+       addr = ptepage->index + (((unsigned long)ptep & ~PAGE_MASK) << 10);
        flush_hash_pages(mm->context, addr, ptephys, 1);
 }
 
+/*
+ * Called by ptep_set_access_flags, must flush on CPUs for which the
+ * DSI handler can't just "fixup" the TLB on a write fault
+ */
+void flush_tlb_page_nohash(struct vm_area_struct *vma, unsigned long addr)
+{
+       if (Hash != 0)
+               return;
+       _tlbie(addr);
+}
+
 /*
  * Called at the end of a mmu_gather operation to make sure the
  * TLB flush is completely done.