Commit | Line | Data |
---|---|---|
1965aae3 PA |
1 | #ifndef _ASM_X86_PAGE_32_H |
2 | #define _ASM_X86_PAGE_32_H | |
11b7c7dc | 3 | |
51c78eb3 | 4 | #include <asm/page_32_types.h> |
3bf8f5a9 | 5 | |
beb6943d IM |
6 | #ifndef __ASSEMBLY__ |
7 | ||
af5c2bd1 | 8 | #define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET) |
a1bf9631 | 9 | #ifdef CONFIG_DEBUG_VIRTUAL |
59ea7463 | 10 | extern unsigned long __phys_addr(unsigned long); |
a1bf9631 | 11 | #else |
af5c2bd1 | 12 | #define __phys_addr(x) __phys_addr_nodebug(x) |
a1bf9631 | 13 | #endif |
7d74275d | 14 | #define __phys_addr_symbol(x) __phys_addr(x) |
11b7c7dc JF |
15 | #define __phys_reloc_hide(x) RELOC_HIDE((x), 0) |
16 | ||
17 | #ifdef CONFIG_FLATMEM | |
18 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | |
19 | #endif /* CONFIG_FLATMEM */ | |
20 | ||
11b7c7dc JF |
21 | #ifdef CONFIG_X86_USE_3DNOW |
22 | #include <asm/mmx.h> | |
e6e5494c | 23 | |
11b7c7dc JF |
24 | static inline void clear_page(void *page) |
25 | { | |
26 | mmx_clear_page(page); | |
27 | } | |
1da177e4 | 28 | |
11b7c7dc JF |
29 | static inline void copy_page(void *to, void *from) |
30 | { | |
31 | mmx_copy_page(to, from); | |
32 | } | |
33 | #else /* !CONFIG_X86_USE_3DNOW */ | |
34 | #include <linux/string.h> | |
1da177e4 | 35 | |
11b7c7dc JF |
36 | static inline void clear_page(void *page) |
37 | { | |
38 | memset(page, 0, PAGE_SIZE); | |
39 | } | |
fd4fd5aa | 40 | |
11b7c7dc JF |
41 | static inline void copy_page(void *to, void *from) |
42 | { | |
43 | memcpy(to, from, PAGE_SIZE); | |
44 | } | |
45 | #endif /* CONFIG_X86_3DNOW */ | |
46 | #endif /* !__ASSEMBLY__ */ | |
cd469e0c | 47 | |
1965aae3 | 48 | #endif /* _ASM_X86_PAGE_32_H */ |