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>
This commit is contained in:
Jeremy Fitzhardinge
2008-01-30 13:32:58 +01:00
committed by Ingo Molnar
parent d8d89827fc
commit 8405b122ad
3 changed files with 8 additions and 13 deletions

View File

@ -117,6 +117,14 @@ extern unsigned long long __PAGE_KERNEL, __PAGE_KERNEL_EXEC;
#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.
* Undefined behaviour if not..