Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _ALPHA_PGALLOC_H
0003 #define _ALPHA_PGALLOC_H
0004 
0005 #include <linux/mm.h>
0006 #include <linux/mmzone.h>
0007 
0008 #include <asm-generic/pgalloc.h>
0009 
0010 /*      
0011  * Allocate and free page tables. The xxx_kernel() versions are
0012  * used to allocate a kernel page table - this turns on ASN bits
0013  * if any.
0014  */
0015 
0016 static inline void
0017 pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t pte)
0018 {
0019     pmd_set(pmd, (pte_t *)(page_to_pa(pte) + PAGE_OFFSET));
0020 }
0021 
0022 static inline void
0023 pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte)
0024 {
0025     pmd_set(pmd, pte);
0026 }
0027 
0028 static inline void
0029 pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
0030 {
0031     pud_set(pud, pmd);
0032 }
0033 
0034 extern pgd_t *pgd_alloc(struct mm_struct *mm);
0035 
0036 #endif /* _ALPHA_PGALLOC_H */