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 __alloc_zeroed_user_highpage(movableflags, vma, vaddr) \ 25 alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vaddr) 26 #define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE 27 28 #define clear_user_page(addr,vaddr,pg) __cpu_clear_user_page(addr, vaddr) 29 #define copy_user_page(to,from,vaddr,pg) __cpu_copy_user_page(to, from, vaddr) 30 31 typedef struct page *pgtable_t; 32 33 extern int pfn_valid(unsigned long); 34 35 #include <asm/memory.h> 36 37 #endif /* !__ASSEMBLY__ */ 38 39 #define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC 40 41 #include <asm-generic/getorder.h> 42 43 #endif 44