drm/radeon: fix build on 64-bit with some compilers.
authorDave Airlie <airlied@linux.ie>
Sun, 20 Dec 2009 06:08:40 +0000 (16:08 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 23 Dec 2009 00:04:02 +0000 (10:04 +1000)
drivers/gpu/drm/radeon/radeon_test.c:45: undefined reference to `__udivdi3'

Reported-by: Mr. James W. Laferriere <babydr@baby-dragons.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_test.c

index 391c973ec4dbb7ef3c83bdfd3b757ff8b1ecb8b4..9f5e2f929da98e92cd8c418d010587ad7045d451 100644 (file)
@@ -42,8 +42,8 @@ void radeon_test_moves(struct radeon_device *rdev)
        /* Number of tests =
         * (Total GTT - IB pool - writeback page - ring buffer) / test size
         */
-       n = (rdev->mc.gtt_size - RADEON_IB_POOL_SIZE*64*1024 - RADEON_GPU_PAGE_SIZE -
-            rdev->cp.ring_size) / size;
+       n = ((u32)(rdev->mc.gtt_size - RADEON_IB_POOL_SIZE*64*1024 - RADEON_GPU_PAGE_SIZE -
+            rdev->cp.ring_size)) / size;
 
        gtt_obj = kzalloc(n * sizeof(*gtt_obj), GFP_KERNEL);
        if (!gtt_obj) {