From: "Paolo 'Blaisorblade' Giarrusso" <blaisorblade@yahoo.it>
To: Andrew Morton <akpm@osdl.org>
Cc: Jeff Dike <jdike@addtoit.com>,
linux-kernel@vger.kernel.org,
user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] [PATCH 8/8] uml: avoid "CONFIG_NR_CPUS undeclared" bogus error messages
Date: Thu, 19 Jan 2006 00:55:23 +0100 [thread overview]
Message-ID: <20060118235522.4626.2825.stgit@zion.home.lan> (raw)
In-Reply-To: <20060118235132.4626.74049.stgit@zion.home.lan>
From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>, Olaf Hering <olh@suse.de>
Olaf reported UML doesn't build for him with a clear analisys of what happened -
we're using NR_CPUS in files linked against glibc headers. Seems like it defines
CONFIG_SMP but not CONFIG_NR_CPUS, so we get CONFIG_NR_CPUS undeclared.
The fix is to move the declaration away from that header file and move it in
asm-um headers, and to add that header where needed.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---
arch/um/include/kern_util.h | 2 --
arch/um/kernel/reboot.c | 1 +
include/asm-um/smp.h | 2 ++
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h
index c649108..07176d9 100644
--- a/arch/um/include/kern_util.h
+++ b/arch/um/include/kern_util.h
@@ -31,8 +31,6 @@ extern int timer_irq_inited;
extern int jail;
extern int nsyscalls;
-extern struct task_struct *idle_threads[NR_CPUS];
-
#define UML_ROUND_DOWN(addr) ((void *)(((unsigned long) addr) & PAGE_MASK))
#define UML_ROUND_UP(addr) \
UML_ROUND_DOWN(((unsigned long) addr) + PAGE_SIZE - 1)
diff --git a/arch/um/kernel/reboot.c b/arch/um/kernel/reboot.c
index 6f1a3a2..3ef73bf 100644
--- a/arch/um/kernel/reboot.c
+++ b/arch/um/kernel/reboot.c
@@ -5,6 +5,7 @@
#include "linux/module.h"
#include "linux/sched.h"
+#include "asm/smp.h"
#include "user_util.h"
#include "kern_util.h"
#include "kern.h"
diff --git a/include/asm-um/smp.h b/include/asm-um/smp.h
index d879eba..aeda665 100644
--- a/include/asm-um/smp.h
+++ b/include/asm-um/smp.h
@@ -23,6 +23,8 @@ extern inline void smp_cpus_done(unsigne
{
}
+extern struct task_struct *idle_threads[NR_CPUS];
+
#endif
#endif
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2006-01-18 23:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-18 23:51 [uml-devel] [PATCH 0/8] Other UML batch Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:54 ` [uml-devel] [PATCH 1/8] uml: typo fixup Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` [uml-devel] [PATCH 2/8] uml: comments about libc-conflict guards Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` [uml-devel] [PATCH 3/8] uml: fix hugest stack users Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` [uml-devel] [PATCH 4/8] uml: fix "apples/bananas" typo Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` [uml-devel] [PATCH 5/8] uml: TT - SYSCALL_DEBUG - fix buglet introduced in cleanup Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` [uml-devel] [PATCH 6/8] uml: skas0-hold-own-ldt fixups for x86-64 Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` [uml-devel] [PATCH 7/8] uml: some harmless sparse warning fixes Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` Paolo 'Blaisorblade' Giarrusso [this message]
2006-01-19 4:21 ` [uml-devel] [PATCH 8/8] uml: avoid "CONFIG_NR_CPUS undeclared" bogus error messages Jeff Dike
2006-01-19 15:01 ` Blaisorblade
2006-01-19 19:43 ` Jeff Dike
2006-01-19 23:41 ` Blaisorblade
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=20060118235522.4626.2825.stgit@zion.home.lan \
--to=blaisorblade@yahoo.it \
--cc=akpm@osdl.org \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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