1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Based on arch/arm/include/asm/page.h
5 * Copyright (C) 1995-2003 Russell King
6 * Copyright (C) 2012 ARM Ltd.
11 #include <asm/page-def.h>
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
,
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>