Skip to content

Commit

Permalink
[PATCH] uml: avoid "CONFIG_NR_CPUS undeclared" bogus error messages
Browse files Browse the repository at this point in the history
      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>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Paolo 'Blaisorblade' Giarrusso authored and Linus Torvalds committed Feb 1, 2006
1 parent 42947cb commit 72e5525
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions arch/um/include/kern_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions arch/um/kernel/reboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions include/asm-um/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ extern inline void smp_cpus_done(unsigned int maxcpus)
{
}

extern struct task_struct *idle_threads[NR_CPUS];

#endif

#endif

0 comments on commit 72e5525

Please sign in to comment.