aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/pgalloc_32.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86/pgalloc_32.h')
-rw-r--r--include/asm-x86/pgalloc_32.h32
1 files changed, 0 insertions, 32 deletions
diff --git a/include/asm-x86/pgalloc_32.h b/include/asm-x86/pgalloc_32.h
index 96a09f566155..b83bc010af09 100644
--- a/include/asm-x86/pgalloc_32.h
+++ b/include/asm-x86/pgalloc_32.h
@@ -1,39 +1,7 @@
1#ifndef _I386_PGALLOC_H 1#ifndef _I386_PGALLOC_H
2#define _I386_PGALLOC_H 2#define _I386_PGALLOC_H
3 3
4static inline void pmd_populate_kernel(struct mm_struct *mm,
5 pmd_t *pmd, pte_t *pte)
6{
7 paravirt_alloc_pt(mm, __pa(pte) >> PAGE_SHIFT);
8 set_pmd(pmd, __pmd(__pa(pte) | _PAGE_TABLE));
9}
10
11static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, struct page *pte)
12{
13 unsigned long pfn = page_to_pfn(pte);
14
15 paravirt_alloc_pt(mm, pfn);
16 set_pmd(pmd, __pmd(((pteval_t)pfn << PAGE_SHIFT) | _PAGE_TABLE));
17}
18#define pmd_pgtable(pmd) pmd_page(pmd)
19
20#ifdef CONFIG_X86_PAE 4#ifdef CONFIG_X86_PAE
21/*
22 * In the PAE case we free the pmds as part of the pgd.
23 */
24static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr)
25{
26 return (pmd_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
27}
28
29static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
30{
31 BUG_ON((unsigned long)pmd & (PAGE_SIZE-1));
32 free_page((unsigned long)pmd);
33}
34
35extern void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd);
36
37extern void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd); 5extern void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd);
38 6
39#endif /* CONFIG_X86_PAE */ 7#endif /* CONFIG_X86_PAE */