Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc/sparc Always get the `mid' cpu property. Whin...



details:   https://anonhg.NetBSD.org/src/rev/3bd4ba288a1e
branches:  trunk
changeset: 539905:3bd4ba288a1e
user:      pk <pk%NetBSD.org@localhost>
date:      Fri Nov 29 08:29:57 2002 +0000

description:
Always get the `mid' cpu property. Whine if it's not set on an actual
multi-processor machine.

diffstat:

 sys/arch/sparc/sparc/cpu.c |  13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diffs (36 lines):

diff -r cf881dde1d28 -r 3bd4ba288a1e sys/arch/sparc/sparc/cpu.c
--- a/sys/arch/sparc/sparc/cpu.c        Fri Nov 29 08:02:05 2002 +0000
+++ b/sys/arch/sparc/sparc/cpu.c        Fri Nov 29 08:29:57 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.136 2002/11/29 08:02:05 pk Exp $ */
+/*     $NetBSD: cpu.c,v 1.137 2002/11/29 08:29:57 pk Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -287,12 +287,7 @@
        struct mainbus_attach_args *ma = aux;
        int mid;
 
-#if defined(MULTIPROCESSOR)
        mid = (ma->ma_node != 0) ? PROM_getpropint(ma->ma_node, "mid", 0) : 0;
-#else
-       mid = 0;
-#endif
-
        cpu_attach((struct cpu_softc *)self, ma->ma_node, mid);
 }
 
@@ -392,8 +387,12 @@
        cpi->node = node;
        simple_lock_init(&cpi->msg.lock);
 
-       if (ncpu > 1)
+       if (ncpu > 1) {
                printf(": mid %d", mid);
+               if (mid == 0)
+                       printf("[WARNING: mid should not be 0]");
+       }
+
 
        if (cpi->master) {
                cpu_setup(sc);



Home | Main Index | Thread Index | Old Index