mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Ryan <ben@bssc.edu.au>
To: linux-kernel@vger.kernel.org
Subject: Uniprocessor Compile error: 2.4.15-pre4 (-tr) in kernel.o (cpu_init()) - Works with SMP
Date: Wed, 14 Nov 2001 07:44:59 +1100	[thread overview]
Message-ID: <187493868425.20011114074459@bssc.edu.au> (raw)
In-Reply-To: <2482591359.20011114043702@bssc.edu.au>
In-Reply-To: <2482591359.20011114043702@bssc.edu.au>

> 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?) :)


  reply	other threads:[~2001-11-13 20:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-13 17:37 Compile error: 2.4.15-pre4 (-tr) in kernel.o (cpu_init()) - advice req'd Ben Ryan
2001-11-13 20:44 ` Ben Ryan [this message]
2001-11-13 21:28   ` Uniprocessor Compile error: 2.4.15-pre4 (-tr) in kernel.o (cpu_init()) - Works with SMP Benjamin LaHaise
2001-11-14  4:11   ` Robert Love
2001-11-15 19:10   ` Robert Love

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=187493868425.20011114074459@bssc.edu.au \
    --to=ben@bssc.edu.au \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®