diff options
author | Christophe Leroy | 2019-04-26 07:59:45 +0200 |
---|---|---|
committer | Michael Ellerman | 2019-05-02 17:20:23 +0200 |
commit | 5fb84fec46015758271fcd2a746633fd4d48e619 (patch) | |
tree | c7c1f065d11ca0c65d1d706116153ece13b3c61d /arch/powerpc/include/asm/book3s | |
parent | powerpc/mm: split asm/hugetlb.h into dedicated subarch files (diff) | |
download | kernel-qcow2-linux-5fb84fec46015758271fcd2a746633fd4d48e619.tar.gz kernel-qcow2-linux-5fb84fec46015758271fcd2a746633fd4d48e619.tar.xz kernel-qcow2-linux-5fb84fec46015758271fcd2a746633fd4d48e619.zip |
powerpc/mm: add a helper to populate hugepd
This patchs adds a subarch helper to populate hugepd.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/book3s')
-rw-r--r-- | arch/powerpc/include/asm/book3s/64/hugetlb.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/book3s/64/hugetlb.h b/arch/powerpc/include/asm/book3s/64/hugetlb.h index cbc8153d6e0e..def77a45e905 100644 --- a/arch/powerpc/include/asm/book3s/64/hugetlb.h +++ b/arch/powerpc/include/asm/book3s/64/hugetlb.h @@ -100,6 +100,11 @@ static inline pte_t *hugepte_offset(hugepd_t hpd, unsigned long addr, return hugepd_page(hpd) + idx; } +static inline void hugepd_populate(hugepd_t *hpdp, pte_t *new, unsigned int pshift) +{ + *hpdp = __hugepd(__pa(new) | HUGEPD_VAL_BITS | (shift_to_mmu_psize(pshift) << 2)); +} + void flush_hugetlb_page(struct vm_area_struct *vma, unsigned long vmaddr); #endif |