diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-01-30 07:32:43 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:32:43 -0500 |
commit | 98fd5aee348f0420afd1c636790d50aaaec6ceec (patch) | |
tree | c2e0e421ce7cfb809b643a6934e19f82e2c1ceae /include/asm-x86/page_32.h | |
parent | 6724a1d2fc6b40d55f232b8dacc12a915878bdc7 (diff) |
x86: page.h: move pa and va related things
# HG changeset patch
# User Jeremy Fitzhardinge <jeremy@xensource.com>
# Date 1199319656 28800
# Node ID d617b72a0cc9d14bde2087d065c36d4ed3265761
# Parent 3bd7db6e85e66e7f3362874802df26a82fcb2d92
x86: page.h: move pa and va related things
Move and unify the virtual<->physical address space conversion
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 'include/asm-x86/page_32.h')
-rw-r--r-- | include/asm-x86/page_32.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/include/asm-x86/page_32.h b/include/asm-x86/page_32.h index 2d60661ab340..a27424a2ee0d 100644 --- a/include/asm-x86/page_32.h +++ b/include/asm-x86/page_32.h | |||
@@ -29,18 +29,7 @@ extern int page_is_ram(unsigned long pagenr); | |||
29 | 29 | ||
30 | #define VMALLOC_RESERVE ((unsigned long)__VMALLOC_RESERVE) | 30 | #define VMALLOC_RESERVE ((unsigned long)__VMALLOC_RESERVE) |
31 | #define MAXMEM (-__PAGE_OFFSET-__VMALLOC_RESERVE) | 31 | #define MAXMEM (-__PAGE_OFFSET-__VMALLOC_RESERVE) |
32 | #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) | 32 | |
33 | /* __pa_symbol should be used for C visible symbols. | ||
34 | This seems to be the official gcc blessed way to do such arithmetic. */ | ||
35 | #define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x),0)) | ||
36 | #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) | ||
37 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) | ||
38 | #ifdef CONFIG_FLATMEM | ||
39 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | ||
40 | #endif /* CONFIG_FLATMEM */ | ||
41 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | ||
42 | |||
43 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) | ||
44 | 33 | ||
45 | #include <asm-generic/memory_model.h> | 34 | #include <asm-generic/memory_model.h> |
46 | #include <asm-generic/page.h> | 35 | #include <asm-generic/page.h> |