lkml.org 
[lkml]   [2011]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 0/2] jump label: update for .39
    On Thu, 10 Mar 2011, David Daney wrote:

    > On 03/10/2011 03:16 PM, Steven Rostedt wrote:
    > > On Thu, 2011-03-10 at 17:48 -0500, Mathieu Desnoyers wrote:
    > > > * Steven Rostedt (rostedt@goodmis.org) wrote:
    > > > > On Thu, 2011-03-10 at 16:22 -0500, Mathieu Desnoyers wrote:
    > > > >
    > > > > > > Anyway, I think the best thing for now is to have Jason add
    > > > > > > the .align(sizeof(long)) in the inline assembly for all locations
    > > > > > > and be
    > > > > > > done with it.
    > > > > >
    > > > > > You seem to be contradicting yourself here. I'm concerned about having
    > > > > > "structures" of a size not power of two. Can we simply either
    > > > >
    > > > > But we don't have structures. We have data that has been allocated in
    > > > > assembly. Come to think of it, it may be best to keep these as
    > > > > ".align 4".
    > > >
    > > > The .align 4 is certainly not the right answer, because it will trigger
    > > > unaligned accesses on some 64-bit architectures, as we have faced with
    > > > trace event.
    > >
    > > Will it? Seems that sparc does this regardless.
    > >
    > > Remember, this is 3 natural word sized objects, and vmlinux.ld starts
    > > the section off with .ALIGN 8, hence, the section is already 8 byte
    > > aligned, all objects within this section are 8 bytes (for 64bit archs,
    > > and 4 bytes for 32bit), why would saying ".align 4" cause the linker to
    > > add holes to make it 4 byte aligned when it is already 8 byte aligned.
    > > The ".align 4" should work with both 32bit and 64bit archs.
    > >
    >
    > It should work, but it hurts my eyes to see the source code forcing a 64-bit
    > word to 32-bit alignment.

    We solved such stuff with macros in other places already.

    #ifdef 64bit
    # define BLA 8
    #else
    # define BLA 4
    #endif

    and then use

    .aling BLA

    Where is the problem?

    Thanks,

    tglx


    \
     
     \ /
      Last update: 2011-03-11 00:35    [W:0.025 / U:88.508 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site