Module Name:    src
Committed By:   mrg
Date:           Mon Mar  8 04:18:48 UTC 2010

Modified Files:
        src/sys/arch/sparc64/sparc64: cpu.c

Log Message:
- when given "boot -1", apply the !MULTIPROCESSOR cpu_match() criteria.

- don't print cache sizes * associativity.  this has been wrong for years.


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/arch/sparc64/sparc64/cpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sparc64/sparc64/cpu.c
diff -u src/sys/arch/sparc64/sparc64/cpu.c:1.90 src/sys/arch/sparc64/sparc64/cpu.c:1.91
--- src/sys/arch/sparc64/sparc64/cpu.c:1.90	Sat Mar  6 08:08:29 2010
+++ src/sys/arch/sparc64/sparc64/cpu.c	Mon Mar  8 04:18:48 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.90 2010/03/06 08:08:29 mrg Exp $ */
+/*	$NetBSD: cpu.c,v 1.91 2010/03/08 04:18:48 mrg Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -52,7 +52,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.90 2010/03/06 08:08:29 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.91 2010/03/08 04:18:48 mrg Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -198,14 +198,16 @@
 	if (strcmp(cf->cf_name, ma->ma_name) != 0)
 		return 0;
 
-#ifndef MULTIPROCESSOR
 	/*
 	 * If we are going to only attach a single cpu, make sure
 	 * to pick the one we are running on right now.
 	 */
-	if (upaid_from_node(ma->ma_node) != CPU_UPAID)
-		return 0;
+	if (upaid_from_node(ma->ma_node) != CPU_UPAID) {
+#ifdef MULTIPROCESSOR
+		if (boothowto & RB_MD1)
 #endif
+			return 0;
+	}
 
 	return 1;
 }
@@ -314,8 +316,7 @@
 		/* void */;
 	if ((1 << i) != l && l)
 		panic("bad icache line size %d", l);
-	totalsize = icachesize *
-		prom_getpropint(node, "icache-associativity", 1);
+	totalsize = icachesize;
 	if (totalsize == 0)
 		totalsize = l *
 			prom_getpropint(node, "icache-nlines", 64) *
@@ -344,8 +345,7 @@
 		/* void */;
 	if ((1 << i) != l && l)
 		panic("bad dcache line size %d", l);
-	totalsize = dcachesize *
-		prom_getpropint(node, "dcache-associativity", 1);
+	totalsize = dcachesize;
 	if (totalsize == 0)
 		totalsize = l *
 			prom_getpropint(node, "dcache-nlines", 128) *
@@ -369,9 +369,7 @@
 		/* void */;
 	if ((1 << i) != l && l)
 		panic("bad ecache line size %d", l);
-	totalsize = 
-		prom_getpropint(node, "ecache-size", 0) *
-		prom_getpropint(node, "ecache-associativity", 1);
+	totalsize = prom_getpropint(node, "ecache-size", 0);
 	if (totalsize == 0)
 		totalsize = l *
 			prom_getpropint(node, "ecache-nlines", 32768) *

Reply via email to