From: Benjamin LaHaise <bcrl@redhat.com>
To: Ben Ryan <ben@bssc.edu.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Uniprocessor Compile error: 2.4.15-pre4 (-tr) in kernel.o (cpu_init()) - Works with SMP
Date: Tue, 13 Nov 2001 16:28:18 -0500 [thread overview]
Message-ID: <20011113162814.A28319@redhat.com> (raw)
In-Reply-To: <2482591359.20011114043702@bssc.edu.au> <187493868425.20011114074459@bssc.edu.au>
In-Reply-To: <187493868425.20011114074459@bssc.edu.au>; from ben@bssc.edu.au on Wed, Nov 14, 2001 at 07:44:59AM +1100
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,
-ben
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 @@
synchronize_tsc_ap();
}
-extern int cpucount;
+int cpucount;
extern int cpu_idle(void);
next prev parent reply other threads:[~2001-11-13 21:28 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 ` Uniprocessor Compile error: 2.4.15-pre4 (-tr) in kernel.o (cpu_init()) - Works with SMP Ben Ryan
2001-11-13 21:28 ` Benjamin LaHaise [this message]
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=20011113162814.A28319@redhat.com \
--to=bcrl@redhat.com \
--cc=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