Linux-libre 5.4.48-gnu
[librecmc/linux-libre.git] / arch / arm64 / include / asm / page.h
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Based on arch/arm/include/asm/page.h
4  *
5  * Copyright (C) 1995-2003 Russell King
6  * Copyright (C) 2012 ARM Ltd.
7  */
8 #ifndef __ASM_PAGE_H
9 #define __ASM_PAGE_H
10
11 #include <asm/page-def.h>
12
13 #ifndef __ASSEMBLY__
14
15 #include <linux/personality.h> /* for READ_IMPLIES_EXEC */
16 #include <asm/pgtable-types.h>
17
18 extern void __cpu_clear_user_page(void *p, unsigned long user);
19 extern void __cpu_copy_user_page(void *to, const void *from,
20                                  unsigned long user);
21 extern void copy_page(void *to, const void *from);
22 extern void clear_page(void *to);
23
24 #define clear_user_page(addr,vaddr,pg)  __cpu_clear_user_page(addr, vaddr)
25 #define copy_user_page(to,from,vaddr,pg) __cpu_copy_user_page(to, from, vaddr)
26
27 typedef struct page *pgtable_t;
28
29 extern int pfn_valid(unsigned long);
30
31 #include <asm/memory.h>
32
33 #endif /* !__ASSEMBLY__ */
34
35 #define VM_DATA_DEFAULT_FLAGS \
36         (((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
37          VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
38
39 #include <asm-generic/getorder.h>
40
41 #endif