aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/pgalloc_64.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/include/asm/pgalloc_64.h')
-rw-r--r--arch/sparc/include/asm/pgalloc_64.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/arch/sparc/include/asm/pgalloc_64.h b/arch/sparc/include/asm/pgalloc_64.h
index 39a7ac49b00c..5e3187185b4a 100644
--- a/arch/sparc/include/asm/pgalloc_64.h
+++ b/arch/sparc/include/asm/pgalloc_64.h
@@ -15,6 +15,13 @@
15 15
16extern struct kmem_cache *pgtable_cache; 16extern struct kmem_cache *pgtable_cache;
17 17
18static inline void __pgd_populate(pgd_t *pgd, pud_t *pud)
19{
20 pgd_set(pgd, pud);
21}
22
23#define pgd_populate(MM, PGD, PUD) __pgd_populate(PGD, PUD)
24
18static inline pgd_t *pgd_alloc(struct mm_struct *mm) 25static inline pgd_t *pgd_alloc(struct mm_struct *mm)
19{ 26{
20 return kmem_cache_alloc(pgtable_cache, GFP_KERNEL); 27 return kmem_cache_alloc(pgtable_cache, GFP_KERNEL);
@@ -25,7 +32,23 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
25 kmem_cache_free(pgtable_cache, pgd); 32 kmem_cache_free(pgtable_cache, pgd);
26} 33}
27 34
28#define pud_populate(MM, PUD, PMD) pud_set(PUD, PMD) 35static inline void __pud_populate(pud_t *pud, pmd_t *pmd)
36{
37 pud_set(pud, pmd);
38}
39
40#define pud_populate(MM, PUD, PMD) __pud_populate(PUD, PMD)
41
42static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
43{
44 return kmem_cache_alloc(pgtable_cache,
45 GFP_KERNEL|__GFP_REPEAT);
46}
47
48static inline void pud_free(struct mm_struct *mm, pud_t *pud)
49{
50 kmem_cache_free(pgtable_cache, pud);
51}
29 52
30static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) 53static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr)
31{ 54{
@@ -91,4 +114,7 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pte_t *pte,
91#define __pmd_free_tlb(tlb, pmd, addr) \ 114#define __pmd_free_tlb(tlb, pmd, addr) \
92 pgtable_free_tlb(tlb, pmd, false) 115 pgtable_free_tlb(tlb, pmd, false)
93 116
117#define __pud_free_tlb(tlb, pud, addr) \
118 pgtable_free_tlb(tlb, pud, false)
119
94#endif /* _SPARC64_PGALLOC_H */ 120#endif /* _SPARC64_PGALLOC_H */