]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amdgpu: Reduce VA_RESERVED_BOTTOM to 64KB
authorFelix Kuehling <felix.kuehling@amd.com>
Tue, 30 Jan 2024 19:34:41 +0000 (14:34 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 14 Feb 2024 22:15:50 +0000 (17:15 -0500)
The reservation is there to catch NULL pointer dereferences from the
GPU. Reduce the size to 64KB to make sure that shared virtual address
programming models can map all CPU-accessible virtual addresses for GPU
access. This is also the default for CPU virtual address mappings as
seen in /proc/sys/vm/mmap_min_addr.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h

index 666698a571927a1584c6655c8d8d0a12bef94e30..2c4053b29bb312d449d83cb3d2f9275dfed60774 100644 (file)
@@ -135,10 +135,10 @@ struct amdgpu_mem_stats;
 #define AMDGPU_IS_MMHUB0(x) ((x) >= AMDGPU_MMHUB0_START && (x) < AMDGPU_MMHUB1_START)
 #define AMDGPU_IS_MMHUB1(x) ((x) >= AMDGPU_MMHUB1_START && (x) < AMDGPU_MAX_VMHUBS)
 
-/* Reserve 2MB at top/bottom of address space for kernel use */
+/* Reserve space at top/bottom of address space for kernel use */
 #define AMDGPU_VA_RESERVED_CSA_SIZE            (2ULL << 20)
 #define AMDGPU_VA_RESERVED_SEQ64_SIZE          (2ULL << 20)
-#define AMDGPU_VA_RESERVED_BOTTOM              (2ULL << 20)
+#define AMDGPU_VA_RESERVED_BOTTOM              (1ULL << 16)
 #define AMDGPU_VA_RESERVED_TOP                 (AMDGPU_VA_RESERVED_SEQ64_SIZE + \
                                                 AMDGPU_VA_RESERVED_CSA_SIZE)