[Intel-gfx] [PATCH 02/10] drm/i915: Use insert_page for pwrite_fast

Chris Wilson chris at chris-wilson.co.uk
Tue Dec 22 05:38:48 PST 2015

On Tue, Dec 22, 2015 at 12:03:32PM +0000, Tvrtko Ursulin wrote:
> On 22/12/15 11:52, Chris Wilson wrote:
> >On Tue, Dec 22, 2015 at 04:45:51PM +0530, Ankitprasad Sharma wrote:
> >>>Compiler does not complain about possible truncation here? I would
> >>>change it to a type of equivalent width just in case. Even before it was
> >>>loff_t.
> >>Never saw a compiler warning related to this truncation. Though this is
> >>not going to affect the functionality, I will update it to u64.
> >
> >Which is ridiculous.
> Well you are campaigning for -Werror. :)

The standard compiler flags don't include warns for loss of precision,
but I mean just using u64 here is silly and would imply something is very
wrong with our understanding of the hardware and code. By all means have
an assert that the mappable aperture cannot exceed 32bits (which will be
quite a feat to fit inside the low 4GiB of addressable space).

Chris Wilson, Intel Open Source Technology Centre

More information about the Intel-gfx mailing list