aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-03-17 19:36:54 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-24 17:57:30 -0400
commit79bf6d66abb5a20813a19dd365dfc49104f0bb88 (patch)
tree53fd5c0ab26ef78490a102b47f3743cf0d99bc42 /include/asm-x86
parent94bc891b00e40cbec375feb4568780af183fd7f4 (diff)
x86: convert pgalloc_64.h from macros to inlines
Convert asm-x86/pgalloc_64.h from macros into functions (#include hell prevents __*_free_tlb from being inline, but they're probably a bit big to inline anyway). 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')
-rw-r--r--include/asm-x86/pgalloc_64.h33
1 files changed, 18 insertions, 15 deletions
diff --git a/include/asm-x86/pgalloc_64.h b/include/asm-x86/pgalloc_64.h
index 8d6722320dcc..bcf525f3fbd0 100644
--- a/include/asm-x86/pgalloc_64.h
+++ b/include/asm-x86/pgalloc_64.h
@@ -1,16 +1,24 @@
1#ifndef _X86_64_PGALLOC_H 1#ifndef _X86_64_PGALLOC_H
2#define _X86_64_PGALLOC_H 2#define _X86_64_PGALLOC_H
3 3
4#include <asm/pda.h>
5#include <linux/threads.h> 4#include <linux/threads.h>
6#include <linux/mm.h> 5#include <linux/mm.h>
6#include <asm/pda.h>
7 7
8#define pmd_populate_kernel(mm, pmd, pte) \ 8static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte)
9 set_pmd(pmd, __pmd(_PAGE_TABLE | __pa(pte))) 9{
10#define pud_populate(mm, pud, pmd) \ 10 set_pmd(pmd, __pmd(_PAGE_TABLE | __pa(pte)));
11 set_pud(pud, __pud(_PAGE_TABLE | __pa(pmd))) 11}
12#define pgd_populate(mm, pgd, pud) \ 12
13 set_pgd(pgd, __pgd(_PAGE_TABLE | __pa(pud))) 13static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
14{
15 set_pud(pud, __pud(_PAGE_TABLE | __pa(pmd)));
16}
17
18static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud)
19{
20 set_pgd(pgd, __pgd(_PAGE_TABLE | __pa(pud)));
21}
14 22
15#define pmd_pgtable(pmd) pmd_page(pmd) 23#define pmd_pgtable(pmd) pmd_page(pmd)
16 24
@@ -121,13 +129,8 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
121 __free_page(pte); 129 __free_page(pte);
122} 130}
123 131
124#define __pte_free_tlb(tlb,pte) \ 132extern void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte);
125do { \ 133extern void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd);
126 pgtable_page_dtor((pte)); \ 134extern void __pud_free_tlb(struct mmu_gather *tlb, pud_t *pud);
127 tlb_remove_page((tlb), (pte)); \
128} while (0)
129
130#define __pmd_free_tlb(tlb,x) tlb_remove_page((tlb),virt_to_page(x))
131#define __pud_free_tlb(tlb,x) tlb_remove_page((tlb),virt_to_page(x))
132 135
133#endif /* _X86_64_PGALLOC_H */ 136#endif /* _X86_64_PGALLOC_H */