2019-06-03 13:44:50 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2012-03-05 19:49:27 +08:00
|
|
|
/*
|
|
|
|
* Based on arch/arm/include/asm/page.h
|
|
|
|
*
|
|
|
|
* Copyright (C) 1995-2003 Russell King
|
|
|
|
* Copyright (C) 2012 ARM Ltd.
|
|
|
|
*/
|
|
|
|
#ifndef __ASM_PAGE_H
|
|
|
|
#define __ASM_PAGE_H
|
|
|
|
|
2017-07-15 02:43:56 +08:00
|
|
|
#include <asm/page-def.h>
|
2015-10-08 01:00:19 +08:00
|
|
|
|
2012-03-05 19:49:27 +08:00
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
2016-01-28 20:18:28 +08:00
|
|
|
#include <linux/personality.h> /* for READ_IMPLIES_EXEC */
|
2021-06-03 07:52:29 +08:00
|
|
|
#include <linux/types.h> /* for gfp_t */
|
2014-07-15 23:35:38 +08:00
|
|
|
#include <asm/pgtable-types.h>
|
2012-03-05 19:49:27 +08:00
|
|
|
|
2019-08-06 18:37:53 +08:00
|
|
|
struct page;
|
|
|
|
struct vm_area_struct;
|
|
|
|
|
2012-03-05 19:49:27 +08:00
|
|
|
extern void copy_page(void *to, const void *from);
|
|
|
|
extern void clear_page(void *to);
|
|
|
|
|
2019-08-06 18:37:53 +08:00
|
|
|
void copy_user_highpage(struct page *to, struct page *from,
|
|
|
|
unsigned long vaddr, struct vm_area_struct *vma);
|
|
|
|
#define __HAVE_ARCH_COPY_USER_HIGHPAGE
|
|
|
|
|
|
|
|
void copy_highpage(struct page *to, struct page *from);
|
|
|
|
#define __HAVE_ARCH_COPY_HIGHPAGE
|
|
|
|
|
2021-06-03 07:52:29 +08:00
|
|
|
struct page *alloc_zeroed_user_highpage_movable(struct vm_area_struct *vma,
|
|
|
|
unsigned long vaddr);
|
2021-06-03 07:52:27 +08:00
|
|
|
#define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE_MOVABLE
|
2020-03-12 23:59:20 +08:00
|
|
|
|
2021-06-03 07:52:29 +08:00
|
|
|
void tag_clear_highpage(struct page *to);
|
|
|
|
#define __HAVE_ARCH_TAG_CLEAR_HIGHPAGE
|
|
|
|
|
2020-06-21 18:41:27 +08:00
|
|
|
#define clear_user_page(page, vaddr, pg) clear_page(page)
|
2019-08-06 18:37:53 +08:00
|
|
|
#define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
|
2012-03-05 19:49:27 +08:00
|
|
|
|
|
|
|
typedef struct page *pgtable_t;
|
|
|
|
|
2021-07-01 09:51:19 +08:00
|
|
|
int pfn_is_map_memory(unsigned long pfn);
|
2012-03-05 19:49:27 +08:00
|
|
|
|
|
|
|
#include <asm/memory.h>
|
|
|
|
|
|
|
|
#endif /* !__ASSEMBLY__ */
|
|
|
|
|
2019-11-27 18:00:27 +08:00
|
|
|
#define VM_DATA_DEFAULT_FLAGS (VM_DATA_FLAGS_TSK_EXEC | VM_MTE_ALLOWED)
|
2012-03-05 19:49:27 +08:00
|
|
|
|
|
|
|
#include <asm-generic/getorder.h>
|
|
|
|
|
|
|
|
#endif
|