diff options
author | Christophe Leroy <christophe.leroy@c-s.fr> | 2019-04-26 08:59:45 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-05-02 18:20:23 +0300 |
commit | 5fb84fec46015758271fcd2a746633fd4d48e619 (patch) | |
tree | c7c1f065d11ca0c65d1d706116153ece13b3c61d /arch/powerpc/include/asm/nohash/hugetlb-book3e.h | |
parent | 8197af22be01e7c9ab476138652e0dc8cd22a207 (diff) | |
download | linux-5fb84fec46015758271fcd2a746633fd4d48e619.tar.xz |
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/nohash/hugetlb-book3e.h')
-rw-r--r-- | arch/powerpc/include/asm/nohash/hugetlb-book3e.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/nohash/hugetlb-book3e.h b/arch/powerpc/include/asm/nohash/hugetlb-book3e.h index e94f1cd048ee..51439bcfe313 100644 --- a/arch/powerpc/include/asm/nohash/hugetlb-book3e.h +++ b/arch/powerpc/include/asm/nohash/hugetlb-book3e.h @@ -28,4 +28,10 @@ static inline pte_t *hugepte_offset(hugepd_t hpd, unsigned long addr, void flush_hugetlb_page(struct vm_area_struct *vma, unsigned long vmaddr); +static inline void hugepd_populate(hugepd_t *hpdp, pte_t *new, unsigned int pshift) +{ + /* We use the old format for PPC_FSL_BOOK3E */ + *hpdp = __hugepd(((unsigned long)new & ~PD_HUGE) | pshift); +} + #endif /* _ASM_POWERPC_NOHASH_HUGETLB_BOOK3E_H */ |