12 #include <asm/pgtable.h>
13 #include <asm/pgalloc.h>
14 #include <asm/cacheflush.h>
15 #include <asm/machdep.h>
18 pte_t *ptep,
unsigned long trap,
int local,
int ssize,
19 unsigned int shift,
unsigned int mmu_psize)
22 unsigned long old_pte, new_pte;
23 unsigned long rflags, pa, sz;
29 vpn = hpt_vpn(ea, vsid, ssize);
59 rflags = 0x2 | (!(new_pte &
_PAGE_RW));
62 sz = ((1
UL) << shift);
73 hash = hpt_hash(vpn, shift, ssize);
79 if (
ppc_md.hpte_updatepp(slot, rflags, vpn, mmu_psize,
84 if (
likely(!(old_pte & _PAGE_HASHPTE))) {
85 unsigned long hash = hpt_hash(vpn, shift, ssize);
86 unsigned long hpte_group;
95 #ifdef CONFIG_PPC_64K_PAGES
105 slot =
ppc_md.hpte_insert(hpte_group, vpn, pa, rflags, 0,
112 slot =
ppc_md.hpte_insert(hpte_group, vpn, pa, rflags,
120 ppc_md.hpte_remove(hpte_group);
130 *ptep =
__pte(old_pte);
142 *ptep =
__pte(new_pte & ~_PAGE_BUSY);