Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at d986ba0329dcca102e227995371135c9bbcefb6b 38 lines 687 B view raw
1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef _LINUX_HUGETLB_INLINE_H 3#define _LINUX_HUGETLB_INLINE_H 4 5#include <linux/mm.h> 6 7#ifdef CONFIG_HUGETLB_PAGE 8 9static inline bool is_vm_hugetlb_flags(vm_flags_t vm_flags) 10{ 11 return !!(vm_flags & VM_HUGETLB); 12} 13 14static inline bool is_vma_hugetlb_flags(const vma_flags_t *flags) 15{ 16 return vma_flags_test_any(flags, VMA_HUGETLB_BIT); 17} 18 19#else 20 21static inline bool is_vm_hugetlb_flags(vm_flags_t vm_flags) 22{ 23 return false; 24} 25 26static inline bool is_vma_hugetlb_flags(const vma_flags_t *flags) 27{ 28 return false; 29} 30 31#endif 32 33static inline bool is_vm_hugetlb_page(const struct vm_area_struct *vma) 34{ 35 return is_vm_hugetlb_flags(vma->vm_flags); 36} 37 38#endif