diff options
Diffstat (limited to 'include/os/linux/vm.c')
-rw-r--r-- | include/os/linux/vm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/os/linux/vm.c b/include/os/linux/vm.c index dc807ab..8956cce 100644 --- a/include/os/linux/vm.c +++ b/include/os/linux/vm.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2017-2022, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -50,8 +50,10 @@ static u32 nvgpu_vm_translate_linux_flags(struct gk20a *g, u32 flags) | |||
50 | core_flags |= NVGPU_VM_MAP_IO_COHERENT; | 50 | core_flags |= NVGPU_VM_MAP_IO_COHERENT; |
51 | if (flags & NVGPU_AS_MAP_BUFFER_FLAGS_UNMAPPED_PTE) | 51 | if (flags & NVGPU_AS_MAP_BUFFER_FLAGS_UNMAPPED_PTE) |
52 | core_flags |= NVGPU_VM_MAP_UNMAPPED_PTE; | 52 | core_flags |= NVGPU_VM_MAP_UNMAPPED_PTE; |
53 | if (flags & NVGPU_AS_MAP_BUFFER_FLAGS_L3_ALLOC) | 53 | if (!nvgpu_is_enabled(g, NVGPU_DISABLE_L3_SUPPORT)) { |
54 | core_flags |= NVGPU_VM_MAP_L3_ALLOC; | 54 | if (flags & NVGPU_AS_MAP_BUFFER_FLAGS_L3_ALLOC) |
55 | core_flags |= NVGPU_VM_MAP_L3_ALLOC; | ||
56 | } | ||
55 | if (flags & NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL) | 57 | if (flags & NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL) |
56 | core_flags |= NVGPU_VM_MAP_DIRECT_KIND_CTRL; | 58 | core_flags |= NVGPU_VM_MAP_DIRECT_KIND_CTRL; |
57 | if (flags & NVGPU_AS_MAP_BUFFER_FLAGS_PLATFORM_ATOMIC) | 59 | if (flags & NVGPU_AS_MAP_BUFFER_FLAGS_PLATFORM_ATOMIC) |