summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--configfrag.ac8
-rw-r--r--i386/linux/dev/include/linux/autoconf.h1
-rw-r--r--linux/configfrag.ac3
4 files changed, 14 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index c450871..739a2e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,7 +20,7 @@
* i386/i386/i386asm.sym (MP_GDT, MP_IDT): Remove macros.
* i386/i386/lock.h: Don't include_next "lock.h".
* i386/linux/dev/include/linux/autoconf.h [NCPUS > 1]: Define
- CONFIG_SMP and __SMP__.
+ CONFIG_SMP.
* linux/dev/include/asm-i386/smp.h: New file.
* linux/dev/init/main.c [__SMP__ && __i386] (smp_loops_per_tick):
Restore variable.
@@ -29,6 +29,10 @@
* linux/pcmcia-cs/modules/i82365.c: Likewise.
* linux/pcmcia-cs/modules/rsrc_mgr.c: Likewise.
* linux/dev/include/asm-i386/system.h: Update to Linux 2.2 for SMP.
+ * configfrag.ac (mach_ncpus): Define to 1.
+ (NCPUS): Set to $mach_ncpus.
+ [$mach_ncpus > 1] (MULTIPROCESSOR): Set to 1.
+ * linux/configfrag.ac [$mach_ncpus > 1] (__SMP__): Define.
2007-07-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
diff --git a/configfrag.ac b/configfrag.ac
index 361bf38..77b0024 100644
--- a/configfrag.ac
+++ b/configfrag.ac
@@ -30,9 +30,13 @@ AC_DEFINE([KERNEL], [1], [KERNEL])
# Used in `kern/bootstrap.c'.
AC_DEFINE([BOOTSTRAP_SYMBOLS], [0], [BOOTSTRAP_SYMBOLS])
-# Multiprocessor support is broken.
-AC_DEFINE([NCPUS], [1], [set things up for a uniprocessor])
+# Multiprocessor support is still broken.
AH_TEMPLATE([MULTIPROCESSOR], [set things up for a uniprocessor])
+mach_ncpus=1
+AC_DEFINE_UNQUOTED([NCPUS], [$mach_ncpus], [number of CPUs])
+[if [ $mach_ncpus -gt 1 ]; then]
+ AC_DEFINE([MULTIPROCESSOR], [1], [set things up for a multiprocessor])
+[fi]
# Restartable Atomic Sequences to get a really fast test-n-set. Can't be
# enabled, as the `void recover_ras()' function is missing.
diff --git a/i386/linux/dev/include/linux/autoconf.h b/i386/linux/dev/include/linux/autoconf.h
index 93c6716..037829b 100644
--- a/i386/linux/dev/include/linux/autoconf.h
+++ b/i386/linux/dev/include/linux/autoconf.h
@@ -36,7 +36,6 @@
#if NCPUS > 1
#define CONFIG_SMP 1
-#define __SMP__ 1
#endif
/*
diff --git a/linux/configfrag.ac b/linux/configfrag.ac
index 9c51235..ff465b2 100644
--- a/linux/configfrag.ac
+++ b/linux/configfrag.ac
@@ -595,6 +595,9 @@ AC_DEFUN([hurd_host_CPU], [
AC_DEFINE([LINUX_DEV], [1], [Linux device drivers.])
# Instead of Mach's KERNEL, Linux uses __KERNEL__. Whee.
AC_DEFINE([__KERNEL__], [1], [__KERNEL__])
+ [if [ $mach_ncpus -gt 1 ]; then]
+ AC_DEFINE([__SMP__], [1], [__SMP__])
+ [fi]
# Set up `asm-SYSTYPE' links.
AC_CONFIG_LINKS([linux/src/include/asm:linux/src/include/asm-$systype