Skip to contentSkip to conversation

amdgpu: fix high VA mask

PATCH In review Christian König 2 participants 2 messages Jan 22, 2018 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 amdgpu: fix high VA mask

That constant needs to be 64bits.

Fixes amdgpu: use the high VA range if possible v2
---
 amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
amdgpu/amdgpu_device.c +1 -1
index a0d01727..f34e27a9 100644
@@ -272,7 +272,7 @@ int amdgpu_device_initialize(int fd,
 		max = dev->dev_info.virtual_address_max;
 	}
 
-	max = MIN2(max, (start & ~0xffffffff) + 0x100000000ULL);
+	max = MIN2(max, (start & ~0xffffffffULL) + 0x100000000ULL);
 	amdgpu_vamgr_init(&dev->vamgr_32, start, max,
 			  dev->dev_info.virtual_address_alignment);
 
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20180122121837.1266-1-christian.koenig-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 5 lines · Christian König

That constant needs to be 64bits.

Fixes amdgpu: use the high VA range if possible v2
Quoted 20 lines
---
 amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
amdgpu/amdgpu_device.c +1 -2
index a0d01727..f34e27a9 100644
@@ -272,7 +272,7 @@ int amdgpu_device_initialize(int fd,
                max = dev->dev_info.virtual_address_max;
        }
 
-       max = MIN2(max, (start & ~0xffffffff) + 0x100000000ULL);
+       max = MIN2(max, (start & ~0xffffffffULL) + 0x100000000ULL);
        amdgpu_vamgr_init(&dev->vamgr_32, start, max,
                          dev->dev_info.virtual_address_alignment);
 
--

2.14.1

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx