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;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to