X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Fpowerpc%2Fmm%2Fppc_mmu_32.c;h=ed7fcfe5fd370882d2264bd3e86ed04b9cbc74aa;hb=8cde0776ec1e86c270f65bf482f96288e6bf0023;hp=cef9e83cc7e9e922d7a3e01fe1a4a16bd5bdbde5;hpb=d8762748cae4f85b3201c0304969d993b42d5258;p=linux-2.6 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. */