Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/sommerfeld_i386mp_1]: src/sys/arch/i386 Make sure that there's at least ...



details:   https://anonhg.NetBSD.org/src/rev/fba16066d876
branches:  sommerfeld_i386mp_1
changeset: 482345:fba16066d876
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Jan 04 06:07:45 2001 +0000

description:
Make sure that there's at least one "cpu_info" slot, so that we don't
trash random memory in the non-MULTIPROCESSOR case.

diffstat:

 sys/arch/i386/i386/pmap.c   |  7 +------
 sys/arch/i386/include/cpu.h |  8 +++++---
 2 files changed, 6 insertions(+), 9 deletions(-)

diffs (51 lines):

diff -r 393511492825 -r fba16066d876 sys/arch/i386/i386/pmap.c
--- a/sys/arch/i386/i386/pmap.c Thu Jan 04 04:59:41 2001 +0000
+++ b/sys/arch/i386/i386/pmap.c Thu Jan 04 06:07:45 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.83.2.23 2001/01/04 04:59:41 thorpej Exp $   */
+/*     $NetBSD: pmap.c,v 1.83.2.24 2001/01/04 06:07:45 thorpej Exp $   */
 
 /*
  *
@@ -257,11 +257,6 @@
 
 #define COUNT(x)       /* nothing */
 
-#ifndef I386_MAXPROCS
-#define I386_MAXPROCS 0
-#define cpu_number() 0
-#endif
-
 /*
  * TLB Shootdown:
  *
diff -r 393511492825 -r fba16066d876 sys/arch/i386/include/cpu.h
--- a/sys/arch/i386/include/cpu.h       Thu Jan 04 04:59:41 2001 +0000
+++ b/sys/arch/i386/include/cpu.h       Thu Jan 04 06:07:45 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.59.2.15 2001/01/04 04:44:34 thorpej Exp $    */
+/*     $NetBSD: cpu.h,v 1.59.2.16 2001/01/04 06:07:46 thorpej Exp $    */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -140,9 +140,9 @@
 #define        CPU_INFO_FOREACH(cii, ci)       cii = 0, ci = cpu_info_list; \
                                        ci != NULL; ci = ci->ci_next
 
-#ifdef MULTIPROCESSOR
+#if defined(MULTIPROCESSOR)
 
-#define I386_MAXPROCS          0x10
+#define I386_MAXPROCS          32      /* because we use a bitmask */
 
 #define CPU_STARTUP(_ci)       ((_ci)->ci_func->start(_ci))
 #define CPU_STOP(_ci)          ((_ci)->ci_func->stop(_ci))
@@ -175,6 +175,8 @@
 
 #else /* !MULTIPROCESSOR */
 
+#define        I386_MAXPROCS           1
+
 volatile u_int32_t astpending;
 
 #ifdef _KERNEL



Home | Main Index | Thread Index | Old Index