1 #ifndef _ALPHA_PGALLOC_H
2 #define _ALPHA_PGALLOC_H
4 #include <linux/config.h>
6 #include <linux/mmzone.h>
9 * Allocate and free page tables. The xxx_kernel() versions are
10 * used to allocate a kernel page table - this turns on ASN bits
15 pmd_populate(struct mm_struct
*mm
, pmd_t
*pmd
, struct page
*pte
)
17 pmd_set(pmd
, (pte_t
*)(page_to_pa(pte
) + PAGE_OFFSET
));
21 pmd_populate_kernel(struct mm_struct
*mm
, pmd_t
*pmd
, pte_t
*pte
)
27 pgd_populate(struct mm_struct
*mm
, pgd_t
*pgd
, pmd_t
*pmd
)
32 extern pgd_t
*pgd_alloc(struct mm_struct
*mm
);
37 free_page((unsigned long)pgd
);
41 pmd_alloc_one(struct mm_struct
*mm
, unsigned long address
)
43 pmd_t
*ret
= (pmd_t
*)__get_free_page(GFP_KERNEL
|__GFP_REPEAT
|__GFP_ZERO
);
50 free_page((unsigned long)pmd
);
53 extern pte_t
*pte_alloc_one_kernel(struct mm_struct
*mm
, unsigned long addr
);
56 pte_free_kernel(pte_t
*pte
)
58 free_page((unsigned long)pte
);
61 static inline struct page
*
62 pte_alloc_one(struct mm_struct
*mm
, unsigned long addr
)
64 pte_t
*pte
= pte_alloc_one_kernel(mm
, addr
);
66 return virt_to_page(pte
);
71 pte_free(struct page
*page
)
76 #define check_pgt_cache() do { } while (0)
78 #endif /* _ALPHA_PGALLOC_H */