xref: /openbmc/linux/arch/x86/include/asm/page_32.h (revision e5080a96)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
21965aae3SH. Peter Anvin #ifndef _ASM_X86_PAGE_32_H
31965aae3SH. Peter Anvin #define _ASM_X86_PAGE_32_H
4bb898558SAl Viro 
551c78eb3SJeremy Fitzhardinge #include <asm/page_32_types.h>
6bb898558SAl Viro 
7beb6943dSIngo Molnar #ifndef __ASSEMBLY__
8beb6943dSIngo Molnar 
9bb898558SAl Viro #define __phys_addr_nodebug(x)	((x) - PAGE_OFFSET)
10bb898558SAl Viro #ifdef CONFIG_DEBUG_VIRTUAL
11bb898558SAl Viro extern unsigned long __phys_addr(unsigned long);
12bb898558SAl Viro #else
13bb898558SAl Viro #define __phys_addr(x)		__phys_addr_nodebug(x)
14bb898558SAl Viro #endif
157d74275dSAlexander Duyck #define __phys_addr_symbol(x)	__phys_addr(x)
16bb898558SAl Viro #define __phys_reloc_hide(x)	RELOC_HIDE((x), 0)
17bb898558SAl Viro 
18bb898558SAl Viro #include <linux/string.h>
19bb898558SAl Viro 
clear_page(void * page)20bb898558SAl Viro static inline void clear_page(void *page)
21bb898558SAl Viro {
22bb898558SAl Viro 	memset(page, 0, PAGE_SIZE);
23bb898558SAl Viro }
24bb898558SAl Viro 
copy_page(void * to,void * from)25bb898558SAl Viro static inline void copy_page(void *to, void *from)
26bb898558SAl Viro {
27bb898558SAl Viro 	memcpy(to, from, PAGE_SIZE);
28bb898558SAl Viro }
29bb898558SAl Viro #endif	/* !__ASSEMBLY__ */
30bb898558SAl Viro 
311965aae3SH. Peter Anvin #endif /* _ASM_X86_PAGE_32_H */
32