diff options
| author | Leon Romanovsky <leon@kernel.org> | 2023-12-12 09:04:59 +0200 |
|---|---|---|
| committer | Leon Romanovsky <leon@kernel.org> | 2023-12-12 09:04:59 +0200 |
| commit | afcda192dbab7df48dfedb1813a6d03bf6bd4996 (patch) | |
| tree | 270d0e74520e0f8d17da34bbdd8d91dec47f3585 /mm/hugetlb.c | |
| parent | 07f830ae4913d0b986c8c0ff88a7d597948b9bd8 (diff) | |
| parent | d727d27db536faea7178290c677cc0567f647231 (diff) | |
Expose c0 and SW encap ICM for RDMA
These two series from Mark and Shun extend RDMA mlx5 API.
Mark's series provides c0 register used to match egress
traffic sent by local device.
Shun's series adds new type for ICM area.
Link: https://lore.kernel.org/all/cover.1701871118.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'mm/hugetlb.c')
| -rw-r--r-- | mm/hugetlb.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 1169ef2f2176..6feb3e0630d1 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1182,6 +1182,13 @@ static int is_vma_resv_set(struct vm_area_struct *vma, unsigned long flag) return (get_vma_private_data(vma) & flag) != 0; } +bool __vma_private_lock(struct vm_area_struct *vma) +{ + return !(vma->vm_flags & VM_MAYSHARE) && + get_vma_private_data(vma) & ~HPAGE_RESV_MASK && + is_vma_resv_set(vma, HPAGE_RESV_OWNER); +} + void hugetlb_dup_vma_private(struct vm_area_struct *vma) { VM_BUG_ON_VMA(!is_vm_hugetlb_page(vma), vma); |
