[lkml]   [2001]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    SubjectRe: Uniprocessor Compile error: 2.4.15-pre4 (-tr) in kernel.o (cpu_init()) - Works with SMP
    On Wed, Nov 14, 2001 at 07:44:59AM +1100, Ben Ryan wrote:
    > SMP compile succeeded. (albeit with lots of warnings on 'pure')

    Which version of gcc? 2.95? I guess the pure attribute needs to be
    made a compiler.h thing.

    > It seems cpucount is only defined when SMP is compiled in, I guess cpucount
    > hasn't been set to 1 in uniprocessor build, breaking non-smp builds?
    > How can I hardcode that into setup.c? I know little of C, so if someone could
    > point out a line of code to set this (diff even?) :)

    This will fix the link error by moving cpucount into setup.c. Cheers,


    diff -ur tr-2.4.15-pre4/arch/i386/kernel/setup.c tr.prev/arch/i386/kernel/setup.c
    --- tr-2.4.15-pre4/arch/i386/kernel/setup.c Tue Nov 13 16:25:33 2001
    +++ tr.prev/arch/i386/kernel/setup.c Tue Nov 13 15:00:40 2001
    @@ -2807,7 +2807,7 @@

    unsigned long cpu_initialized __initdata = 0;
    -int cpucount;
    +extern int cpucount;

    * cpu_init() initializes state that is per-CPU. Some data is already
    diff -ur tr-2.4.15-pre4/arch/i386/kernel/smpboot.c tr.prev/arch/i386/kernel/smpboot.c
    --- tr-2.4.15-pre4/arch/i386/kernel/smpboot.c Tue Nov 13 16:25:46 2001
    +++ tr.prev/arch/i386/kernel/smpboot.c Tue Nov 13 15:00:40 2001
    @@ -443,7 +443,7 @@

    -extern int cpucount;
    +int cpucount;

    extern int cpu_idle(void);

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at
     \ /
      Last update: 2005-03-22 13:13    [W:0.022 / U:12.248 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site