public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/selftests: Fixup naked 64b divide
@ 2019-10-13  9:11 Chris Wilson
  2019-10-13  9:56 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Chris Wilson @ 2019-10-13  9:11 UTC (permalink / raw)
  To: intel-gfx; +Cc: Matthew Auld

drivers/gpu/drm/i915/intel_memory_region.o: in function `igt_mock_contiguous':
drivers/gpu/drm/i915/selftests/intel_memory_region.c:166: undefined reference to `__umoddi3'

Reported-by: kbuild test robot <lkp@intel.com>
Fixes: 2f0b97ca0211 ("drm/i915/region: support contiguous allocations")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
---
 drivers/gpu/drm/i915/selftests/intel_memory_region.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/selftests/intel_memory_region.c b/drivers/gpu/drm/i915/selftests/intel_memory_region.c
index 4e44c81e8e5b..013dfb7683a3 100644
--- a/drivers/gpu/drm/i915/selftests/intel_memory_region.c
+++ b/drivers/gpu/drm/i915/selftests/intel_memory_region.c
@@ -163,7 +163,9 @@ static int igt_mock_contiguous(void *arg)
 	igt_object_release(obj);
 
 	/* Internal fragmentation should not bleed into the object size */
-	target = round_up(prandom_u32_state(&prng) % total, PAGE_SIZE);
+	target = i915_prandom_u64_state(&prng);
+	div64_u64_rem(target, total, &target);
+	target = round_up(target, PAGE_SIZE);
 	target = max_t(u64, PAGE_SIZE, target);
 
 	obj = igt_object_create(mem, &objects, target,
-- 
2.23.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-10-14 15:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-13  9:11 [PATCH] drm/i915/selftests: Fixup naked 64b divide Chris Wilson
2019-10-13  9:56 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-10-13  9:56 ` ✗ Fi.CI.BUILD: warning " Patchwork
2019-10-13 11:45 ` [PATCH v2] " Chris Wilson
2019-10-14  8:15   ` Matthew Auld
2019-10-14  8:25 ` ✓ Fi.CI.IGT: success for " Patchwork
2019-10-14 15:44 ` ✗ Fi.CI.BAT: failure for drm/i915/selftests: Fixup naked 64b divide (rev2) Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox