diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-03-17 19:36:58 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-24 17:57:30 -0400 |
commit | 170fdff7057d4247e3f28cca96d0db1fbc854e3b (patch) | |
tree | b0d5281dc5de0b9a0ddb1e626818d8f7f562713c /arch | |
parent | 397f687ab7f840dbe50353c4b60108672b653d0c (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 'arch')
-rw-r--r-- | arch/x86/mm/init_64.c | 5 | ||||
-rw-r--r-- | arch/x86/mm/pgtable.c | 8 | ||||
-rw-r--r-- | arch/x86/mm/pgtable_32.c | 10 |
3 files changed, 8 insertions, 15 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 9c09893e54fb..4465104f5514 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -662,11 +662,6 @@ int memory_add_physaddr_to_nid(u64 start) | |||
662 | EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); | 662 | EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); |
663 | #endif | 663 | #endif |
664 | 664 | ||
665 | void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) | ||
666 | { | ||
667 | tlb_remove_page(tlb, virt_to_page(pmd)); | ||
668 | } | ||
669 | |||
670 | void __pud_free_tlb(struct mmu_gather *tlb, pud_t *pud) | 665 | void __pud_free_tlb(struct mmu_gather *tlb, pud_t *pud) |
671 | { | 666 | { |
672 | tlb_remove_page(tlb, virt_to_page(pud)); | 667 | tlb_remove_page(tlb, virt_to_page(pud)); |
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c index 83765328e265..1c41efedf6d0 100644 --- a/arch/x86/mm/pgtable.c +++ b/arch/x86/mm/pgtable.c | |||
@@ -28,6 +28,14 @@ void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte) | |||
28 | tlb_remove_page(tlb, pte); | 28 | tlb_remove_page(tlb, pte); |
29 | } | 29 | } |
30 | 30 | ||
31 | #if PAGETABLE_LEVELS > 2 | ||
32 | void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) | ||
33 | { | ||
34 | paravirt_release_pd(__pa(pmd) >> PAGE_SHIFT); | ||
35 | tlb_remove_page(tlb, virt_to_page(pmd)); | ||
36 | } | ||
37 | #endif /* PAGETABLE_LEVELS > 2 */ | ||
38 | |||
31 | #ifdef CONFIG_X86_64 | 39 | #ifdef CONFIG_X86_64 |
32 | static inline void pgd_list_add(pgd_t *pgd) | 40 | static inline void pgd_list_add(pgd_t *pgd) |
33 | { | 41 | { |
diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c index b9e3dac32391..9ee007be9142 100644 --- a/arch/x86/mm/pgtable_32.c +++ b/arch/x86/mm/pgtable_32.c | |||
@@ -173,16 +173,6 @@ void reserve_top_address(unsigned long reserve) | |||
173 | __VMALLOC_RESERVE += reserve; | 173 | __VMALLOC_RESERVE += reserve; |
174 | } | 174 | } |
175 | 175 | ||
176 | #ifdef CONFIG_X86_PAE | ||
177 | |||
178 | void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) | ||
179 | { | ||
180 | paravirt_release_pd(__pa(pmd) >> PAGE_SHIFT); | ||
181 | tlb_remove_page(tlb, virt_to_page(pmd)); | ||
182 | } | ||
183 | |||
184 | #endif | ||
185 | |||
186 | int pmd_bad(pmd_t pmd) | 176 | int pmd_bad(pmd_t pmd) |
187 | { | 177 | { |
188 | WARN_ON_ONCE(pmd_bad_v1(pmd) != pmd_bad_v2(pmd)); | 178 | WARN_ON_ONCE(pmd_bad_v1(pmd) != pmd_bad_v2(pmd)); |