blob: da4e762406f7da5913080fb5394b9d5b1197965e [file] [log] [blame]
H. Peter Anvin1965aae2008-10-22 22:26:29 -07001#ifndef _ASM_X86_PAGE_32_H
2#define _ASM_X86_PAGE_32_H
Linus Torvalds1da177e2005-04-16 15:20:36 -07003
Jeremy Fitzhardinge51c78eb2009-02-08 22:52:14 -08004#include <asm/page_32_types.h>
Ingo Molnar3bf8f5a2008-02-09 00:15:06 +01005
Ingo Molnarbeb69432009-02-13 13:36:47 +01006#ifndef __ASSEMBLY__
7
Jeremy Fitzhardinge11b7c7d2008-01-30 13:32:44 +01008#ifdef CONFIG_HUGETLB_PAGE
9#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
10#endif
11
Vegard Nossumaf5c2bd2008-10-03 17:54:25 +020012#define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET)
Jiri Slabya1bf9632008-06-12 13:56:40 +020013#ifdef CONFIG_DEBUG_VIRTUAL
Jiri Slaby59ea7462008-06-12 13:56:40 +020014extern unsigned long __phys_addr(unsigned long);
Jiri Slabya1bf9632008-06-12 13:56:40 +020015#else
Vegard Nossumaf5c2bd2008-10-03 17:54:25 +020016#define __phys_addr(x) __phys_addr_nodebug(x)
Jiri Slabya1bf9632008-06-12 13:56:40 +020017#endif
Jeremy Fitzhardinge11b7c7d2008-01-30 13:32:44 +010018#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 Fitzhardinge11b7c7d2008-01-30 13:32:44 +010024#ifdef CONFIG_X86_USE_3DNOW
25#include <asm/mmx.h>
26
27static inline void clear_page(void *page)
28{
29 mmx_clear_page(page);
30}
31
32static 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
39static inline void clear_page(void *page)
40{
41 memset(page, 0, PAGE_SIZE);
42}
43
44static 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 Anvin1965aae2008-10-22 22:26:29 -070051#endif /* _ASM_X86_PAGE_32_H */