treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / arm64 / include / asm / page.h
blobd39ddb258a04958ffdd72906dc77b4bd02484ea9
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Based on arch/arm/include/asm/page.h
5 * Copyright (C) 1995-2003 Russell King
6 * Copyright (C) 2012 ARM Ltd.
7 */
8 #ifndef __ASM_PAGE_H
9 #define __ASM_PAGE_H
11 #include <asm/page-def.h>
13 #ifndef __ASSEMBLY__
15 #include <linux/personality.h> /* for READ_IMPLIES_EXEC */
16 #include <asm/pgtable-types.h>
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);
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)
27 typedef struct page *pgtable_t;
29 extern int pfn_valid(unsigned long);
31 #include <asm/memory.h>
33 #endif /* !__ASSEMBLY__ */
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)
39 #include <asm-generic/getorder.h>
41 #endif