lkml.org 
[lkml]   [2002]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [PATCH] Re: crc32 and lib.a (was Re: [PATCH] nbd in 2.5.3 does
    On Fri, Feb 01, 2002 at 09:55:10AM -0500, Jeff Garzik wrote:
    > On Fri, Feb 01, 2002 at 03:03:13PM +0000, Alan Cox wrote:
    > > > If you have a dependency concern, you put yourself in the
    > > > right initcall group. You don't depend ever on the order within the
    > > > group, thats the whole idea. You can't depend on that, so you must
    > > > group things correctly.
    > >
    > > This was proposed right back at the start. Linus point blank vetoed it.

    Hi Linus,
    I've found that multiple level initcalls went into kernel
    behind my back, so you can throw away my yesterday patch
    which converted lib.a => lib.o, and apply this one.

    I decided to use fs_initcall level, as nobody is using this
    yet. If jffs2 will get initialized by fs_initcall, we'll have
    to switch init_crc32 from fs_initcall to arch_initcall or
    even sooner - crc32 initialization needs only working
    kmalloc, nothing else (and it could use static buffer happilly,
    as zeroes compress very good), so subsys_initcall could work
    too.

    This patch does NOT solve problem with useless option CRC32 in
    Config.in, as we compile crc32.o, but nobody picks it up for kernel
    link. It is impossible to have .a for this directory unless we'll
    start using --undefined= linker option to bring crc32 into final
    image.

    Best is probably applying this over lib.a=>lib.o patch. Then
    ordering is ensured by initcall level, and not by Makefiles,
    and in addition CRC32 makefile option really does something...
    Best regards,
    Petr Vandrovec
    vandrove@vc.cvut.cz

    [Patch tested with both lib.a and lib.o - it boots correctly
    in both cases]


    diff -urdN linux/lib/crc32.c linux/lib/crc32.c
    --- linux/lib/crc32.c Tue Jan 15 19:08:05 2002
    +++ linux/lib/crc32.c Fri Feb 1 14:54:28 2002
    @@ -564,7 +564,7 @@
    crc32cleanup_be();
    }

    -module_init(init_crc32);
    +fs_initcall(init_crc32);
    module_exit(cleanup_crc32);

    EXPORT_SYMBOL(crc32_le);
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2005-03-22 13:18    [W:4.016 / U:0.180 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site