drivers: Use conftest for vm_flags

The conftest script has a test for checking if the vm_area struct has a
const vm_flags member. So enable this test and use the definition
generated in the appropriate drivers.

Bug 4374520

Change-Id: I0e7bd105fe8a821b0af23c0a5553b8d4468fa8c4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026924
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Jon Hunter
2023-12-02 16:40:32 +00:00
committed by mobile promotions
parent 732a0db90e
commit d0e427c6e1
6 changed files with 8 additions and 13 deletions

View File

@@ -452,8 +452,7 @@ int __nvmap_map(struct nvmap_handle *h, struct vm_area_struct *vma)
}
priv->handle = h;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) \
|| (defined(CONFIG_TEGRA_SYSTEM_TYPE_ACK) && (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)))
#if defined(NV_VM_AREA_STRUCT_HAS_CONST_VM_FLAGS) /* Linux v6.3 */
vm_flags_set(vma, VM_SHARED | VM_DONTEXPAND |
VM_DONTDUMP | VM_DONTCOPY |
(h->heap_pgalloc ? 0 : VM_PFNMAP));