[PATCH] for_each_possible_cpu: oprofile.
[powerpc.git] / arch / powerpc / mm / ppc_mmu_32.c
index cef9e83..ed7fcfe 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.
  */