hugetlb.h 1.9 KB
Newer Older
1
/* SPDX-License-Identifier: GPL-2.0-only */
2 3 4 5 6 7 8 9 10 11 12 13 14
/*
 * arch/arm64/include/asm/hugetlb.h
 *
 * Copyright (C) 2013 Linaro Ltd.
 *
 * Based on arch/x86/include/asm/hugetlb.h
 */

#ifndef __ASM_HUGETLB_H
#define __ASM_HUGETLB_H

#include <asm/page.h>

15 16 17 18 19
#ifdef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
#define arch_hugetlb_migration_supported arch_hugetlb_migration_supported
extern bool arch_hugetlb_migration_supported(struct hstate *h);
#endif

20 21 22 23
static inline void arch_clear_hugepage_flags(struct page *page)
{
	clear_bit(PG_dcache_clean, &page->flags);
}
24
#define arch_clear_hugepage_flags arch_clear_hugepage_flags
25

26 27 28
extern pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct *vma,
				struct page *page, int writable);
#define arch_make_huge_pte arch_make_huge_pte
29
#define __HAVE_ARCH_HUGE_SET_HUGE_PTE_AT
30 31
extern void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
			    pte_t *ptep, pte_t pte);
32
#define __HAVE_ARCH_HUGE_PTEP_SET_ACCESS_FLAGS
33 34 35
extern int huge_ptep_set_access_flags(struct vm_area_struct *vma,
				      unsigned long addr, pte_t *ptep,
				      pte_t pte, int dirty);
36
#define __HAVE_ARCH_HUGE_PTEP_GET_AND_CLEAR
37 38
extern pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
				     unsigned long addr, pte_t *ptep);
39
#define __HAVE_ARCH_HUGE_PTEP_SET_WRPROTECT
40 41
extern void huge_ptep_set_wrprotect(struct mm_struct *mm,
				    unsigned long addr, pte_t *ptep);
42
#define __HAVE_ARCH_HUGE_PTEP_CLEAR_FLUSH
43 44
extern void huge_ptep_clear_flush(struct vm_area_struct *vma,
				  unsigned long addr, pte_t *ptep);
45
#define __HAVE_ARCH_HUGE_PTE_CLEAR
46 47
extern void huge_pte_clear(struct mm_struct *mm, unsigned long addr,
			   pte_t *ptep, unsigned long sz);
48 49 50
extern void set_huge_swap_pte_at(struct mm_struct *mm, unsigned long addr,
				 pte_t *ptep, pte_t pte, unsigned long sz);
#define set_huge_swap_pte_at set_huge_swap_pte_at
51

52 53
void __init arm64_hugetlb_cma_reserve(void);

54
#include <asm-generic/hugetlb.h>
55

56
#endif /* __ASM_HUGETLB_H */
新手
引导
客服 返回
顶部