[PATCH 12/40] drm/i915: Use phys_addr_t for the address of stolen memory

Chris Wilson chris at chris-wilson.co.uk
Thu Jan 5 16:54:35 UTC 2017


On Thu, Jan 05, 2017 at 04:40:42PM +0000, Tvrtko Ursulin wrote:
> 
> On 05/01/2017 14:54, Chris Wilson wrote:
> >Though we know the hw is limited to keeping stolen memory inside the
> >first 4GiB, it is clearer to the reader that we are handling physical
> >address if we use phys_addr_t to refer to the base of stolen memory.
> 
> Not sure about this one. If we are changing it could as well make
> our own stolen_addr_t and save some bytes?

My feeling was that phys_addr_t would be more obvious to semantic
checkers. It comes with its own printk-format and everything!

Anyway thay maybe smatch/sparse/whatever could do more with knowing that
we are handling physical address here would be worth the 4bytes wasted.
I may be very mistaken in thinking that there are tools to check that
physical addresses are not leaked.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx-trybot mailing list