[Intel-gfx] [PATCH 2/8] drm/i915: Make the intel_device_info structure kept in dev_priv writable

Ville Syrjälä ville.syrjala at linux.intel.com
Mon Feb 10 15:17:10 CET 2014


On Mon, Feb 10, 2014 at 02:06:16PM +0000, Damien Lespiau wrote:
> On Mon, Feb 10, 2014 at 02:53:29PM +0200, Ville Syrjälä wrote:
> > > Since every access should now go through the macro I think it'd be good to
> > > give this a __ prefix to make it clear that users better think twice
> > > before using it. Maybe as a patch on top of all this?
> > 
> > No. Everyone having to use the macro was a requirement of the v2 patch.
> > With v3 that requirement was lifted since the const is right there on
> > the struct itself. I think that was the whole point of v3.
> 
> The "everyone should now go through the macro" is not for the const.
> There's a new idea floating around to replace the macros by hardcoded
> values to be able to compile the driver for a specific platform and use
> the compiler dead code elimiation pass(es) to reduce the text size.
> 
> There may be more cunning ways to reduce the driver size, haven't
> thought much about it.

One easy thing to do would be just dropping the unused output types
from the driver when doing the special build. I'd be surprised if
the compiler is smart enough to figure that stuff out with the
function pointer indirections we do there. Not sure how much we'd
save though.

Or just make kernel memory swappable ;)

-- 
Ville Syrjälä
Intel OTC



More information about the Intel-gfx mailing list