]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/selftests: Use mul_u32_u32() for 32b x 32b -> 64b result
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 13 Sep 2017 10:51:54 +0000 (11:51 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 13 Sep 2017 12:27:20 +0000 (13:27 +0100)
commit677ddce24947f2874b529bf4e7276acd5153b7af
tree519363302f8b9d6ebd65278975a48ddb99ce6e99
parent3a2ae21508f5cc0f29c867c4e92245c647784df6
drm/i915/selftests: Use mul_u32_u32() for 32b x 32b -> 64b result

As realised by commit f98f17c0f33d ("math64, timers: Fix 32bit
mul_u64_u32_shr() and friends"), GCC does not always generate ideal code
for performing a 32b x 32b multiply returning a 64b result (i.e. where
we idiomatically use u64 result = (u64)x * (u32)x).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20170913105154.2910-2-chris@chris-wilson.co.uk
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
drivers/gpu/drm/i915/selftests/i915_gem_timeline.c
drivers/gpu/drm/i915/selftests/i915_random.c
drivers/gpu/drm/i915/selftests/i915_random.h