diff options
| author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2021-05-14 10:39:46 +1000 |
|---|---|---|
| committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2021-05-14 10:39:46 +1000 |
| commit | fc3883f43885e02525a495377573ed948f73755a (patch) | |
| tree | ed8667fcea98fe776611bc43d1fc19d3a05ed493 | |
| parent | 4f21f7d1345a6812c6d6909c06844b8244c464cc (diff) | |
| download | linux-next-fc3883f43885e02525a495377573ed948f73755a.tar.gz | |
mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge
Notice: this object is not reachable from any branch.
For architectures with no PMD and/or no PUD, add stubs similar to what we
have for architectures without P4D.
Link: https://lkml.kernel.org/r/5ac5976419350e8e048d463a64cae449eb3ba4b0.1620795204.git.christophe.leroy@csgroup.eu
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Uladzislau Rezki <uladzislau.rezki@sony.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Notice: this object is not reachable from any branch.
| -rw-r--r-- | include/linux/pgtable.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h index 46b13780c2c8c..d41474a2d255d 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h @@ -1371,10 +1371,34 @@ static inline int p4d_clear_huge(p4d_t *p4d) } #endif /* !__PAGETABLE_P4D_FOLDED */ +#ifndef __PAGETABLE_PUD_FOLDED int pud_set_huge(pud_t *pud, phys_addr_t addr, pgprot_t prot); -int pmd_set_huge(pmd_t *pmd, phys_addr_t addr, pgprot_t prot); int pud_clear_huge(pud_t *pud); +#else +static inline int pud_set_huge(pud_t *pud, phys_addr_t addr, pgprot_t prot) +{ + return 0; +} +static inline int pud_clear_huge(pud_t *pud) +{ + return 0; +} +#endif /* !__PAGETABLE_PUD_FOLDED */ + +#ifndef __PAGETABLE_PMD_FOLDED +int pmd_set_huge(pmd_t *pmd, phys_addr_t addr, pgprot_t prot); int pmd_clear_huge(pmd_t *pmd); +#else +static inline int pmd_set_huge(pmd_t *pmd, phys_addr_t addr, pgprot_t prot) +{ + return 0; +} +static inline int pmd_clear_huge(pmd_t *pmd) +{ + return 0; +} +#endif /* !__PAGETABLE_PMD_FOLDED */ + int p4d_free_pud_page(p4d_t *p4d, unsigned long addr); int pud_free_pmd_page(pud_t *pud, unsigned long addr); int pmd_free_pte_page(pmd_t *pmd, unsigned long addr); |
