This source file includes following definitions.
- pmd_populate_kernel
- pmd_populate
- pgd_free
1
2
3
4
5
6
7
8
9
10 #ifndef _ASM_NIOS2_PGALLOC_H
11 #define _ASM_NIOS2_PGALLOC_H
12
13 #include <linux/mm.h>
14
15 #include <asm-generic/pgalloc.h>
16
17 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd,
18 pte_t *pte)
19 {
20 set_pmd(pmd, __pmd((unsigned long)pte));
21 }
22
23 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
24 pgtable_t pte)
25 {
26 set_pmd(pmd, __pmd((unsigned long)page_address(pte)));
27 }
28 #define pmd_pgtable(pmd) pmd_page(pmd)
29
30
31
32
33 extern void pmd_init(unsigned long page, unsigned long pagetable);
34
35 extern pgd_t *pgd_alloc(struct mm_struct *mm);
36
37 static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
38 {
39 free_pages((unsigned long)pgd, PGD_ORDER);
40 }
41
42 #define __pte_free_tlb(tlb, pte, addr) \
43 do { \
44 pgtable_pte_page_dtor(pte); \
45 tlb_remove_page((tlb), (pte)); \
46 } while (0)
47
48 #endif