lkml.org 
[lkml]   [2009]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 14/15] x86: convert to use __HEAD and HEAD_TEXT macros.

    * Linus Torvalds <torvalds@linux-foundation.org> wrote:

    > On Sun, 26 Apr 2009, Sam Ravnborg wrote:
    >
    > > On Sun, Apr 26, 2009 at 10:12:47AM -0700, Linus Torvalds wrote:
    > > >
    > > >
    > > > On Sun, 26 Apr 2009, Linus Torvalds wrote:
    > > > >
    > > > > Btw, this one really needs to unify the two lds files first. Look at
    > > > >
    > > > > diff -u arch/x86/boot/compressed/vmlinux_*.lds
    > > > >
    > > > > output and realize that they're basially exctly the same except for
    > > > > trivial naming differences, and the fact that the64-bit version hs a
    > > > > "pgtable" thing.
    > > > >
    > > > > So this really needs to be done by first unifying the thing so that there
    > > > > is _one_ arch/x86/boot/compressed/vmlinux.lds.S file with a preprocessor
    > > > > that takes care of the trivial differences [..]
    > > >
    > > > Something like this?
    > >
    > > Looks good/correct.
    > > Acked-by: Sam Ravnborg <sam@ravnborg.org>
    > >
    > > You should add your s-o-b if you expect Ingo to pick it up.
    >
    > Sure. I don't tend to add SOB lines for stuff that I'd not be
    > ready to commit, but with some testing and other people looking at
    > it, I think it's good to go.
    >
    > Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

    Thanks, applied to tip:x86/kbuild. I'll do some more testing of it
    before pushing it out.

    > As mentioned, though, the much more interesting case would be the
    > _real_ kernel vmlinux.lds.S file, which is a lot more complex and
    > where the differences between 32-bit and 64-bit cases aren't
    > totally trivial.
    >
    > Looking at
    >
    > diff -u arch/x86/kernel/vmlinux_*.lds.S | less -S
    >
    > output, many of them are just whitespace, and others are trivial
    > and meaningless (comments in one, not the other, placement of
    > alignment etc, different ordering of sections like
    > "parainstructions"). Yet others seem to be things that we _could_
    > do in general, but that don't matter on one architecture or other
    > (x86-64 has ".eh_frame" in the DISCARD section, i386 apparently
    > doesn't ever generate them, we could just use the x86-64 version).

    We generally do these by separating the unification into at least
    2-3 distinct steps - a mechanic, low-risk cleanup first, preparatory
    changes to bring the two files in sync second, and mechanic
    unification as the third and final step.

    That way any bugs are easily bisectable to a reasonably sized (and
    reasonably risky) sub-patch. Review also gets much easier.

    I've yet to see a non-trivial Makefile unification in arch/x86 that
    does not regress :-) They concentrate a lot of quirks and implicit
    dependencies and small but significant tricks. [usually we catch the
    bugs early on though - but even at an early stage it's good to have
    a reasonable splitup.]

    Ingo


    \
     
     \ /
      Last update: 2009-04-27 05:51    [W:3.482 / U:0.896 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site