From: Bongani <bonganilinux@mweb.co.za>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: lkml <linux-kernel@vger.kernel.org>, Ian Carr-de Avelon <avelon@emit.pl>
Subject: [RFC][PATCH] Compilation fix 2.4.20-pre7
Date: 24 Sep 2002 06:38:26 +0200 [thread overview]
Message-ID: <1032842308.2347.12.camel@localhost.localdomain> (raw)
Hi Marcelo
Ian had some compilation error while trying to compile 2.4.20-pre7
this is the error that he got:
/usr/src/linux/include/linux/kernel_stat.h: In function `kstat_irqs':
/usr/src/linux/include/linux/kernel_stat.h:57: `smp_num_cpus' undeclared
(first use in this function)
/usr/src/linux/include/linux/kernel_stat.h:57: (Each undeclared
identifier is reported only once
/usr/src/linux/include/linux/kernel_stat.h:57: for each function it
appears in.)make[2]:
*** [ksyms.o] Error 1
make[2]: Leaving directory `/usr/src/linux/kernel'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/usr/src/linux/kernel'
make: *** [_dir_kernel] Error 2
He got this when he was compiling a UP kernel. When
he tries to compile for a SMP kernel the error goes away.
Which makes sense because smp_num_cpus is only defined fro SMP
kernels. Does the following patch look OK? This is adopted from 2.5.38.
Cheers
diff -uNr include/linux/kernel_stat.h~ include/linux/kernel_stat.h
--- include/linux/kernel_stat.h~ 2002-09-23 16:16:45.000000000
+0200
+++ include/linux/kernel_stat.h 2002-09-23 16:42:42.000000000 +0200
@@ -54,7 +54,7 @@
{
int i, sum=0;
- for (i = 0 ; i < smp_num_cpus ; i++)
+ for (i = 0 ; i < NR_CPUS ; i++)
sum += kstat.irqs[cpu_logical_map(i)][irq];
return sum
next reply other threads:[~2002-09-24 4:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-24 4:38 Bongani [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-09-24 4:38 [RFC][PATCH] Compilation fix 2.4.20-pre7 Bongani
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=1032842308.2347.12.camel@localhost.localdomain \
--to=bonganilinux@mweb.co.za \
--cc=avelon@emit.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/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