x86: create _types.h counterparts for page*.h
[linux-2.6-block.git] / arch / x86 / include / asm / page_32.h
1 #ifndef _ASM_X86_PAGE_32_H
2 #define _ASM_X86_PAGE_32_H
3
4 #include <asm/page_32_types.h>
5
6 #ifdef CONFIG_HUGETLB_PAGE
7 #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
8 #endif
9
10 #define __phys_addr_nodebug(x)  ((x) - PAGE_OFFSET)
11 #ifdef CONFIG_DEBUG_VIRTUAL
12 extern unsigned long __phys_addr(unsigned long);
13 #else
14 #define __phys_addr(x)          __phys_addr_nodebug(x)
15 #endif
16 #define __phys_reloc_hide(x)    RELOC_HIDE((x), 0)
17
18 #ifdef CONFIG_FLATMEM
19 #define pfn_valid(pfn)          ((pfn) < max_mapnr)
20 #endif /* CONFIG_FLATMEM */
21
22 #ifndef __ASSEMBLY__
23
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
51 #endif /* _ASM_X86_PAGE_32_H */