Messages in this thread |  | | Date | Wed, 14 Nov 2001 07:44:59 +1100 | From | Ben Ryan <> | Subject | Uniprocessor Compile error: 2.4.15-pre4 (-tr) in kernel.o (cpu_init()) - Works with SMP |
| |
> linux-2.4.14.tar (kernel tar) > patch-2.4.15-pre4 (merge) > fix-2.4.15-pre4-tr.diff (benlahaise; don't mind the filename, i just > reckon calling the patch for the patch, > patch-2.4.* is brokenness)
> arch/i386/kernel/kernel.o: In function 'cpu_init': > arch/i386/kernel/kernel.o(.text.init+0x27f9): undefined reference to 'cpucount' > arch/i386/kernel/kernel.o(.text.init+0x2831): undefined reference to 'cpucount' > Segment of kernel.o containing the offender: > ================ > * cpu_init() initializes state that is per-CPU. Some data is already > @@ -2815,14 +2817,15 @@ > */ > void __init cpu_init (void) > { > - int nr = smp_processor_id(); > + int nr = cpucount; > + struct task_struct *cur = init_tasks[nr]; > struct tss_struct * t = &init_tss[nr];
> if (test_and_set_bit(nr, &cpu_initialized)) { > printk(KERN_WARNING "CPU#%d already initialized!\n", nr); > for (;;) __sti();
SMP compile succeeded. (albeit with lots of warnings on 'pure')
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?) :)
- 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/
|  |