diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-04-04 21:58:55 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-04-04 21:58:55 +0300 |
commit | ea9448b254e253e4d95afaab071b341d86c11795 (patch) | |
tree | a0cfe5963169272487b9ae9fb989e29a42555bab /include/linux/mm.h | |
parent | 83eb69f3b80f7cf2ca6357fb9c23adc48632a0e3 (diff) | |
parent | 0e7e6198af28c1573267aba1be33dd0b7fb35691 (diff) | |
download | linux-ea9448b254e253e4d95afaab071b341d86c11795.tar.xz |
Merge tag 'drm-next-2020-04-03-1' of git://anongit.freedesktop.org/drm/drm
Pull drm hugepage support from Dave Airlie:
"This adds support for hugepages to TTM and has been tested with the
vmwgfx drivers, though I expect other drivers to start using it"
* tag 'drm-next-2020-04-03-1' of git://anongit.freedesktop.org/drm/drm:
drm/vmwgfx: Hook up the helpers to align buffer objects
drm/vmwgfx: Introduce a huge page aligning TTM range manager
drm: Add a drm_get_unmapped_area() helper
drm/vmwgfx: Support huge page faults
drm/ttm, drm/vmwgfx: Support huge TTM pagefaults
mm: Add vmf_insert_pfn_xxx_prot() for huge page-table entries
mm: Split huge pages on write-notify or COW
mm: Introduce vma_is_special_huge
fs: Constify vma argument to vma_is_dax
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 937bf719c329..7dd5c4ccbf85 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -3014,6 +3014,23 @@ extern long copy_huge_page_from_user(struct page *dst_page, const void __user *usr_src, unsigned int pages_per_huge_page, bool allow_pagefault); + +/** + * vma_is_special_huge - Are transhuge page-table entries considered special? + * @vma: Pointer to the struct vm_area_struct to consider + * + * Whether transhuge page-table entries are considered "special" following + * the definition in vm_normal_page(). + * + * Return: true if transhuge page-table entries should be considered special, + * false otherwise. + */ +static inline bool vma_is_special_huge(const struct vm_area_struct *vma) +{ + return vma_is_dax(vma) || (vma->vm_file && + (vma->vm_flags & (VM_PFNMAP | VM_MIXEDMAP))); +} + #endif /* CONFIG_TRANSPARENT_HUGEPAGE || CONFIG_HUGETLBFS */ #ifdef CONFIG_DEBUG_PAGEALLOC |