Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Oct 2010 09:41:36 +0000 (UTC)
From:      "Jayachandran C." <jchandra@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r214106 - head/sys/mips/rmi
Message-ID:  <201010200941.o9K9fauM044654@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jchandra
Date: Wed Oct 20 09:41:36 2010
New Revision: 214106
URL: http://svn.freebsd.org/changeset/base/214106

Log:
  On uniprocessor, warn and fixup hardware cpu mask if more than on CPU
  is enabled by the bootloader.

Modified:
  head/sys/mips/rmi/xlr_machdep.c

Modified: head/sys/mips/rmi/xlr_machdep.c
==============================================================================
--- head/sys/mips/rmi/xlr_machdep.c	Wed Oct 20 09:35:20 2010	(r214105)
+++ head/sys/mips/rmi/xlr_machdep.c	Wed Oct 20 09:41:36 2010	(r214106)
@@ -167,6 +167,14 @@ xlr_parse_mmu_options(void)
 	 */
 	xlr_ncores = 1;
 	cpu_map = xlr_boot1_info.cpu_online_map;
+
+#ifndef SMP /* Uniprocessor! */
+	if (cpu_map != 0x1) {
+		printf("WARNING: Starting uniprocessor kernel on cpumask [0x%lx]!\n"
+		   "WARNING: Other CPUs will be unused.\n", (u_long)cpu_map);
+		cpu_map = 0x1;
+	}
+#endif
 	core0_thr_mask = cpu_map & 0xf;
 	switch (core0_thr_mask) {
 	case 1:
@@ -188,9 +196,9 @@ xlr_parse_mmu_options(void)
 			xlr_ncores++;
 		}
 	}
+	xlr_hw_thread_mask = cpu_map;
 
 	/* setup hardware processor id to cpu id mapping */
-	xlr_hw_thread_mask = xlr_boot1_info.cpu_online_map;
 	for (i = 0; i< MAXCPU; i++)
 		xlr_cpuid_to_hwtid[i] = 
 		    xlr_hwtid_to_cpuid [i] = -1;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010200941.o9K9fauM044654>