From owner-svn-src-all@FreeBSD.ORG Wed Oct 20 09:41:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54CA9106564A; Wed, 20 Oct 2010 09:41:36 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 430D38FC1F; Wed, 20 Oct 2010 09:41:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9K9faGS044656; Wed, 20 Oct 2010 09:41:36 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9K9fauM044654; Wed, 20 Oct 2010 09:41:36 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201010200941.o9K9fauM044654@svn.freebsd.org> From: "Jayachandran C." Date: Wed, 20 Oct 2010 09:41:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214106 - head/sys/mips/rmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Oct 2010 09:41:36 -0000 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;