]> err.no Git - linux-2.6/blobdiff - arch/powerpc/mm/ppc_mmu_32.c
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[linux-2.6] / arch / powerpc / mm / ppc_mmu_32.c
index cef9e83cc7e9e922d7a3e01fe1a4a16bd5bdbde5..ed7fcfe5fd370882d2264bd3e86ed04b9cbc74aa 100644 (file)
@@ -178,6 +178,21 @@ void __init setbat(int index, unsigned long virt, unsigned long phys,
        bat_addrs[index].phys = phys;
 }
 
+/*
+ * Preload a translation in the hash table
+ */
+void hash_preload(struct mm_struct *mm, unsigned long ea,
+                 unsigned long access, unsigned long trap)
+{
+       pmd_t *pmd;
+
+       if (Hash == 0)
+               return;
+       pmd = pmd_offset(pgd_offset(mm, ea), ea);
+       if (!pmd_none(*pmd))
+               add_hash_page(mm->context, ea, pmd_val(*pmd));
+}
+
 /*
  * Initialize the hash table and patch the instructions in hashtable.S.
  */