mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 06:52:34 -04:00
On book3s/64, the only user of hugepd is hash in 4k mode. All other setups (hash-64, radix-4, radix-64) use leaf PMD/PUD. Rework hash-4k to use contiguous PMD and PUD instead. In that setup there are only two huge page sizes: 16M and 16G. 16M sits at PMD level and 16G at PUD level. pte_update doesn't know page size, lets use the same trick as hpte_need_flush() to get page size from segment properties. That's not the most efficient way but let's do that until callers of pte_update() provide page size instead of just a huge flag. Link: https://lkml.kernel.org/r/7448f60a9b3efd396595f4f735d1e0babc5ae379.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Cc: Jason Gunthorpe <jgg@nvidia.com> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Oscar Salvador <osalvador@suse.de> Cc: Peter Xu <peterx@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
19 lines
496 B
C
19 lines
496 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _ASM_POWERPC_BOOK3S_64_PGTABLE_64K_H
|
|
#define _ASM_POWERPC_BOOK3S_64_PGTABLE_64K_H
|
|
|
|
#ifndef __ASSEMBLY__
|
|
#ifdef CONFIG_HUGETLB_PAGE
|
|
|
|
#endif /* CONFIG_HUGETLB_PAGE */
|
|
|
|
static inline int remap_4k_pfn(struct vm_area_struct *vma, unsigned long addr,
|
|
unsigned long pfn, pgprot_t prot)
|
|
{
|
|
if (radix_enabled())
|
|
BUG();
|
|
return hash__remap_4k_pfn(vma, addr, pfn, prot);
|
|
}
|
|
#endif /* __ASSEMBLY__ */
|
|
#endif /*_ASM_POWERPC_BOOK3S_64_PGTABLE_64K_H */
|