H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 1 | #ifndef _ASM_X86_PAGE_32_H |
| 2 | #define _ASM_X86_PAGE_32_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | |
Jeremy Fitzhardinge | 51c78eb | 2009-02-08 22:52:14 -0800 | [diff] [blame] | 4 | #include <asm/page_32_types.h> |
Ingo Molnar | 3bf8f5a | 2008-02-09 00:15:06 +0100 | [diff] [blame] | 5 | |
Ingo Molnar | beb6943 | 2009-02-13 13:36:47 +0100 | [diff] [blame] | 6 | #ifndef __ASSEMBLY__ |
| 7 | |
Jeremy Fitzhardinge | 11b7c7d | 2008-01-30 13:32:44 +0100 | [diff] [blame] | 8 | #ifdef CONFIG_HUGETLB_PAGE |
| 9 | #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA |
| 10 | #endif |
| 11 | |
Vegard Nossum | af5c2bd | 2008-10-03 17:54:25 +0200 | [diff] [blame] | 12 | #define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET) |
Jiri Slaby | a1bf963 | 2008-06-12 13:56:40 +0200 | [diff] [blame] | 13 | #ifdef CONFIG_DEBUG_VIRTUAL |
Jiri Slaby | 59ea746 | 2008-06-12 13:56:40 +0200 | [diff] [blame] | 14 | extern unsigned long __phys_addr(unsigned long); |
Jiri Slaby | a1bf963 | 2008-06-12 13:56:40 +0200 | [diff] [blame] | 15 | #else |
Vegard Nossum | af5c2bd | 2008-10-03 17:54:25 +0200 | [diff] [blame] | 16 | #define __phys_addr(x) __phys_addr_nodebug(x) |
Jiri Slaby | a1bf963 | 2008-06-12 13:56:40 +0200 | [diff] [blame] | 17 | #endif |
Jeremy Fitzhardinge | 11b7c7d | 2008-01-30 13:32:44 +0100 | [diff] [blame] | 18 | #define __phys_reloc_hide(x) RELOC_HIDE((x), 0) |
| 19 | |
| 20 | #ifdef CONFIG_FLATMEM |
| 21 | #define pfn_valid(pfn) ((pfn) < max_mapnr) |
| 22 | #endif /* CONFIG_FLATMEM */ |
| 23 | |
Jeremy Fitzhardinge | 11b7c7d | 2008-01-30 13:32:44 +0100 | [diff] [blame] | 24 | #ifdef CONFIG_X86_USE_3DNOW |
| 25 | #include <asm/mmx.h> |
| 26 | |
| 27 | static inline void clear_page(void *page) |
| 28 | { |
| 29 | mmx_clear_page(page); |
| 30 | } |
| 31 | |
| 32 | static inline void copy_page(void *to, void *from) |
| 33 | { |
| 34 | mmx_copy_page(to, from); |
| 35 | } |
| 36 | #else /* !CONFIG_X86_USE_3DNOW */ |
| 37 | #include <linux/string.h> |
| 38 | |
| 39 | static inline void clear_page(void *page) |
| 40 | { |
| 41 | memset(page, 0, PAGE_SIZE); |
| 42 | } |
| 43 | |
| 44 | static inline void copy_page(void *to, void *from) |
| 45 | { |
| 46 | memcpy(to, from, PAGE_SIZE); |
| 47 | } |
| 48 | #endif /* CONFIG_X86_3DNOW */ |
| 49 | #endif /* !__ASSEMBLY__ */ |
| 50 | |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 51 | #endif /* _ASM_X86_PAGE_32_H */ |