diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-01-30 07:32:58 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:32:58 -0500 |
commit | 8405b122ad0dd75354b3bfed4de9a96514fd40cb (patch) | |
tree | 764cb9bc9f262e1191ed8c2785042819dcf2db64 /include | |
parent | d8d89827fc0c9c2ea6ac4c22e14e30586a856f58 (diff) |
x86: unify zero_page definition
Move ZERO_PAGE/empty_zero_page to common place.
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86/pgtable.h | 8 | ||||
-rw-r--r-- | include/asm-x86/pgtable_32.h | 6 | ||||
-rw-r--r-- | include/asm-x86/pgtable_64.h | 7 |
3 files changed, 8 insertions, 13 deletions
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index 820db41dbe4c..eb14a70a4728 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h | |||
@@ -118,6 +118,14 @@ extern unsigned long long __PAGE_KERNEL, __PAGE_KERNEL_EXEC; | |||
118 | #ifndef __ASSEMBLY__ | 118 | #ifndef __ASSEMBLY__ |
119 | 119 | ||
120 | /* | 120 | /* |
121 | * ZERO_PAGE is a global shared page that is always zero: used | ||
122 | * for zero-mapped memory areas etc.. | ||
123 | */ | ||
124 | extern unsigned long empty_zero_page[PAGE_SIZE/sizeof(unsigned long)]; | ||
125 | #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page)) | ||
126 | |||
127 | |||
128 | /* | ||
121 | * The following only work if pte_present() is true. | 129 | * The following only work if pte_present() is true. |
122 | * Undefined behaviour if not.. | 130 | * Undefined behaviour if not.. |
123 | */ | 131 | */ |
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h index d4d238c10293..eb8cccfa6a49 100644 --- a/include/asm-x86/pgtable_32.h +++ b/include/asm-x86/pgtable_32.h | |||
@@ -25,12 +25,6 @@ | |||
25 | struct mm_struct; | 25 | struct mm_struct; |
26 | struct vm_area_struct; | 26 | struct vm_area_struct; |
27 | 27 | ||
28 | /* | ||
29 | * ZERO_PAGE is a global shared page that is always zero: used | ||
30 | * for zero-mapped memory areas etc.. | ||
31 | */ | ||
32 | #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page)) | ||
33 | extern unsigned long empty_zero_page[1024]; | ||
34 | extern pgd_t swapper_pg_dir[1024]; | 28 | extern pgd_t swapper_pg_dir[1024]; |
35 | extern struct kmem_cache *pmd_cache; | 29 | extern struct kmem_cache *pmd_cache; |
36 | extern spinlock_t pgd_lock; | 30 | extern spinlock_t pgd_lock; |
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h index 987f51f684a5..435e17187eb6 100644 --- a/include/asm-x86/pgtable_64.h +++ b/include/asm-x86/pgtable_64.h | |||
@@ -23,13 +23,6 @@ extern pgd_t init_level4_pgt[]; | |||
23 | extern void paging_init(void); | 23 | extern void paging_init(void); |
24 | extern void clear_kernel_mapping(unsigned long addr, unsigned long size); | 24 | extern void clear_kernel_mapping(unsigned long addr, unsigned long size); |
25 | 25 | ||
26 | /* | ||
27 | * ZERO_PAGE is a global shared page that is always zero: used | ||
28 | * for zero-mapped memory areas etc.. | ||
29 | */ | ||
30 | extern unsigned long empty_zero_page[PAGE_SIZE/sizeof(unsigned long)]; | ||
31 | #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page)) | ||
32 | |||
33 | #endif /* !__ASSEMBLY__ */ | 26 | #endif /* !__ASSEMBLY__ */ |
34 | 27 | ||
35 | /* | 28 | /* |