lkml.org 
[lkml]   [2011]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [cpuops cmpxchg double V2 1/4] Gen eric support for this cpu cmpxchg double
    From
    Date
    Don't apply "packed" to a structure which needs padding!  That's just user error.

    "Mathieu Desnoyers" <mathieu.desnoyers@efficios.com> wrote:

    >* Tejun Heo (tj@kernel.org) wrote:
    >[...]
    >> > (note: packed here along with "aligned" does _not_ generate ugly
    >> > bytewise read/write memory ops like "packed" alone. The use of
    >> > "packed" is to let the compiler down-align the structure to the
    >> > value requested, instead of uselessly aligning it on 32-byte if it
    >> > chooses to.)
    >>
    >> Yeah, good point. :-)
    >
    >For the records, I just noticed that "packed, aligned(8)" can generate
    >unaligned
    >accesses on sparc64 by removing the padding between a "int" and a
    >following
    >pointer. So we should not use it.
    >
    >Thanks,
    >
    >Mathieu
    >
    >--
    >Mathieu Desnoyers
    >Operating System Efficiency R&D Consultant
    >EfficiOS Inc.
    >http://www.efficios.com

    --
    Sent from my mobile phone. Please pardon any lack of formatting.


    \
     
     \ /
      Last update: 2011-01-23 19:03    [W:0.022 / U:32.224 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site