aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/pgalloc_64.h
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-03-17 19:36:58 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-24 17:57:30 -0400
commit170fdff7057d4247e3f28cca96d0db1fbc854e3b (patch)
treeb0d5281dc5de0b9a0ddb1e626818d8f7f562713c /include/asm-x86/pgalloc_64.h
parent397f687ab7f840dbe50353c4b60108672b653d0c (diff)
x86: move pmd functions into common asm/pgalloc.h
Common definitions for 3-level pagetable functions. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/pgalloc_64.h')
-rw-r--r--include/asm-x86/pgalloc_64.h24
1 files changed, 0 insertions, 24 deletions
diff --git a/include/asm-x86/pgalloc_64.h b/include/asm-x86/pgalloc_64.h
index fc3414d3ed04..501968194253 100644
--- a/include/asm-x86/pgalloc_64.h
+++ b/include/asm-x86/pgalloc_64.h
@@ -3,11 +3,6 @@
3 3
4#include <asm/pda.h> 4#include <asm/pda.h>
5 5
6static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte)
7{
8 set_pmd(pmd, __pmd(_PAGE_TABLE | __pa(pte)));
9}
10
11static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) 6static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
12{ 7{
13 set_pud(pud, __pud(_PAGE_TABLE | __pa(pmd))); 8 set_pud(pud, __pud(_PAGE_TABLE | __pa(pmd)));
@@ -18,24 +13,6 @@ static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud)
18 set_pgd(pgd, __pgd(_PAGE_TABLE | __pa(pud))); 13 set_pgd(pgd, __pgd(_PAGE_TABLE | __pa(pud)));
19} 14}
20 15
21#define pmd_pgtable(pmd) pmd_page(pmd)
22
23static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, struct page *pte)
24{
25 set_pmd(pmd, __pmd(_PAGE_TABLE | (page_to_pfn(pte) << PAGE_SHIFT)));
26}
27
28static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
29{
30 BUG_ON((unsigned long)pmd & (PAGE_SIZE-1));
31 free_page((unsigned long)pmd);
32}
33
34static inline pmd_t *pmd_alloc_one (struct mm_struct *mm, unsigned long addr)
35{
36 return (pmd_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
37}
38
39static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr) 16static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
40{ 17{
41 return (pud_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); 18 return (pud_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
@@ -47,7 +24,6 @@ static inline void pud_free(struct mm_struct *mm, pud_t *pud)
47 free_page((unsigned long)pud); 24 free_page((unsigned long)pud);
48} 25}
49 26
50extern void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd);
51extern void __pud_free_tlb(struct mmu_gather *tlb, pud_t *pud); 27extern void __pud_free_tlb(struct mmu_gather *tlb, pud_t *pud);
52 28
53#endif /* _X86_64_PGALLOC_H */ 29#endif /* _X86_64_PGALLOC_H */