Commit 8405b122 authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge Committed by Ingo Molnar

x86: unify zero_page definition

Move ZERO_PAGE/empty_zero_page to common place.
Signed-off-by: default avatarJeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent d8d89827
...@@ -117,6 +117,14 @@ extern unsigned long long __PAGE_KERNEL, __PAGE_KERNEL_EXEC; ...@@ -117,6 +117,14 @@ extern unsigned long long __PAGE_KERNEL, __PAGE_KERNEL_EXEC;
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
/*
* ZERO_PAGE is a global shared page that is always zero: used
* for zero-mapped memory areas etc..
*/
extern unsigned long empty_zero_page[PAGE_SIZE/sizeof(unsigned long)];
#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
/* /*
* The following only work if pte_present() is true. * The following only work if pte_present() is true.
* Undefined behaviour if not.. * Undefined behaviour if not..
......
...@@ -25,12 +25,6 @@ ...@@ -25,12 +25,6 @@
struct mm_struct; struct mm_struct;
struct vm_area_struct; struct vm_area_struct;
/*
* ZERO_PAGE is a global shared page that is always zero: used
* for zero-mapped memory areas etc..
*/
#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
extern unsigned long empty_zero_page[1024];
extern pgd_t swapper_pg_dir[1024]; extern pgd_t swapper_pg_dir[1024];
extern struct kmem_cache *pmd_cache; extern struct kmem_cache *pmd_cache;
extern spinlock_t pgd_lock; extern spinlock_t pgd_lock;
......
...@@ -23,13 +23,6 @@ extern pgd_t init_level4_pgt[]; ...@@ -23,13 +23,6 @@ extern pgd_t init_level4_pgt[];
extern void paging_init(void); extern void paging_init(void);
extern void clear_kernel_mapping(unsigned long addr, unsigned long size); extern void clear_kernel_mapping(unsigned long addr, unsigned long size);
/*
* ZERO_PAGE is a global shared page that is always zero: used
* for zero-mapped memory areas etc..
*/
extern unsigned long empty_zero_page[PAGE_SIZE/sizeof(unsigned long)];
#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
#endif /* !__ASSEMBLY__ */ #endif /* !__ASSEMBLY__ */
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment