lkml.org 
[lkml]   [2011]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] USB: ehci: use packed,aligned(4) instead of removing the packed attribute
    On Mon, Jun 20, 2011 at 01:35:35PM -0400, Alan Stern wrote:
    > According to Arnd, any remaining possible issues will be addressed by
    > changing the implementation of readl/writel on ARM. It doesn't look as
    > though the ehci files need anything else done.

    I'm not about to change their implementation because they've proven
    themselves over the last 10 years to be perfectly fine, and changing
    them has a habbit of causing GCC to play less optimally than it should
    do.

    I've seen drivers where GCC reloads the base address from the driver
    private data structure each time a register access is performed, rather
    than caching the base address in a register. I've seen it issuing
    separate add instructions and using a zero pre-index load/store. The
    existing way is the only way I've found to get GCC to come anywhere
    close to producing "optimal" code for the IO accessors.

    If it is the case that these structures do not require packing to get
    their desired layout, then they don't require packing, and the packed
    attribute should be dropped.


    \
     
     \ /
      Last update: 2011-06-20 20:51    [W:4.294 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site