xref: /openbmc/linux/arch/arm/include/asm/page-nommu.h (revision e2028c8e)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  *  arch/arm/include/asm/page-nommu.h
4  *
5  *  Copyright (C) 2004 Hyok S. Choi
6  */
7 
8 #ifndef _ASMARM_PAGE_NOMMU_H
9 #define _ASMARM_PAGE_NOMMU_H
10 
11 #define clear_page(page)	memset((page), 0, PAGE_SIZE)
12 #define copy_page(to,from)	memcpy((to), (from), PAGE_SIZE)
13 
14 #define clear_user_page(page, vaddr, pg)	clear_page(page)
15 #define copy_user_page(to, from, vaddr, pg)	copy_page(to, from)
16 
17 /*
18  * These are used to make use of C type-checking..
19  */
20 typedef unsigned long pte_t;
21 typedef unsigned long pmd_t;
22 typedef unsigned long pgd_t[2];
23 typedef unsigned long pgprot_t;
24 
25 #define pte_val(x)      (x)
26 #define pmd_val(x)      (x)
27 #define pgd_val(x)	((x)[0])
28 #define pgprot_val(x)   (x)
29 
30 #define __pte(x)        (x)
31 #define __pmd(x)        (x)
32 #define __pgprot(x)     (x)
33 
34 #endif
35