X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=arch%2Fpowerpc%2Fmm%2Fppc_mmu_32.c;h=ed7fcfe5fd370882d2264bd3e86ed04b9cbc74aa;hb=fe449f48368623eb47715061b4977ce982d8e03b;hp=cef9e83cc7e9e922d7a3e01fe1a4a16bd5bdbde5;hpb=18ce920a6eba05c0d55cdc95fbbadf7e4c4b457b;p=powerpc.git diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c index cef9e83cc7..ed7fcfe5fd 100644 --- a/arch/powerpc/mm/ppc_mmu_32.c +++ b/arch/powerpc/mm/ppc_mmu_32.c @@ -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. */