Commit 72e55257 authored by Paolo 'Blaisorblade' Giarrusso's avatar Paolo 'Blaisorblade' Giarrusso Committed by Linus Torvalds

[PATCH] uml: avoid "CONFIG_NR_CPUS undeclared" bogus error messages

      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: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 42947cb9
...@@ -31,8 +31,6 @@ extern int timer_irq_inited; ...@@ -31,8 +31,6 @@ extern int timer_irq_inited;
extern int jail; extern int jail;
extern int nsyscalls; 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_DOWN(addr) ((void *)(((unsigned long) addr) & PAGE_MASK))
#define UML_ROUND_UP(addr) \ #define UML_ROUND_UP(addr) \
UML_ROUND_DOWN(((unsigned long) addr) + PAGE_SIZE - 1) UML_ROUND_DOWN(((unsigned long) addr) + PAGE_SIZE - 1)
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "linux/module.h" #include "linux/module.h"
#include "linux/sched.h" #include "linux/sched.h"
#include "asm/smp.h"
#include "user_util.h" #include "user_util.h"
#include "kern_util.h" #include "kern_util.h"
#include "kern.h" #include "kern.h"
......
...@@ -23,6 +23,8 @@ extern inline void smp_cpus_done(unsigned int maxcpus) ...@@ -23,6 +23,8 @@ extern inline void smp_cpus_done(unsigned int maxcpus)
{ {
} }
extern struct task_struct *idle_threads[NR_CPUS];
#endif #endif
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment