Merge branch 'work.dotdot1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux-2.6-block.git] / arch / x86 / include / asm / page_32.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
1965aae3
PA
2#ifndef _ASM_X86_PAGE_32_H
3#define _ASM_X86_PAGE_32_H
11b7c7dc 4
51c78eb3 5#include <asm/page_32_types.h>
3bf8f5a9 6
beb6943d
IM
7#ifndef __ASSEMBLY__
8
af5c2bd1 9#define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET)
a1bf9631 10#ifdef CONFIG_DEBUG_VIRTUAL
59ea7463 11extern unsigned long __phys_addr(unsigned long);
a1bf9631 12#else
af5c2bd1 13#define __phys_addr(x) __phys_addr_nodebug(x)
a1bf9631 14#endif
7d74275d 15#define __phys_addr_symbol(x) __phys_addr(x)
11b7c7dc
JF
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
11b7c7dc
JF
22#ifdef CONFIG_X86_USE_3DNOW
23#include <asm/mmx.h>
e6e5494c 24
11b7c7dc
JF
25static inline void clear_page(void *page)
26{
27 mmx_clear_page(page);
28}
1da177e4 29
11b7c7dc
JF
30static inline void copy_page(void *to, void *from)
31{
32 mmx_copy_page(to, from);
33}
34#else /* !CONFIG_X86_USE_3DNOW */
35#include <linux/string.h>
1da177e4 36
11b7c7dc
JF
37static inline void clear_page(void *page)
38{
39 memset(page, 0, PAGE_SIZE);
40}
fd4fd5aa 41
11b7c7dc
JF
42static inline void copy_page(void *to, void *from)
43{
44 memcpy(to, from, PAGE_SIZE);
45}
46#endif /* CONFIG_X86_3DNOW */
47#endif /* !__ASSEMBLY__ */
cd469e0c 48
1965aae3 49#endif /* _ASM_X86_PAGE_32_H */