From owner-svn-src-projects@freebsd.org Tue Aug 16 00:40:39 2016 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73D0BBBA4C5 for ; Tue, 16 Aug 2016 00:40:39 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BC9E1BD3; Tue, 16 Aug 2016 00:40:39 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7G0ec2U015112; Tue, 16 Aug 2016 00:40:38 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7G0ecPo015111; Tue, 16 Aug 2016 00:40:38 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201608160040.u7G0ecPo015111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Tue, 16 Aug 2016 00:40:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r304193 - projects/powernv/kern X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Aug 2016 00:40:39 -0000 Author: nwhitehorn Date: Tue Aug 16 00:40:38 2016 New Revision: 304193 URL: https://svnweb.freebsd.org/changeset/base/304193 Log: Fix yet another place in the kernel that assumes the BSP is CPU 0. Modified: projects/powernv/kern/kern_timeout.c Modified: projects/powernv/kern/kern_timeout.c ============================================================================== --- projects/powernv/kern/kern_timeout.c Tue Aug 16 00:15:15 2016 (r304192) +++ projects/powernv/kern/kern_timeout.c Tue Aug 16 00:40:38 2016 (r304193) @@ -262,7 +262,7 @@ cc_cce_migrating(struct callout_cpu *cc, /* * Kernel low level callwheel initialization - * called on cpu0 during kernel startup. + * called on the BSP during kernel startup. */ static void callout_callwheel_init(void *dummy) @@ -275,7 +275,7 @@ callout_callwheel_init(void *dummy) * XXX: Clip callout to result of previous function of maxusers * maximum 384. This is still huge, but acceptable. */ - memset(CC_CPU(0), 0, sizeof(cc_cpu)); + memset(CC_CPU(curcpu), 0, sizeof(cc_cpu)); ncallout = imin(16 + maxproc + maxfiles, 18508); TUNABLE_INT_FETCH("kern.ncallout", &ncallout); @@ -293,7 +293,7 @@ callout_callwheel_init(void *dummy) TUNABLE_INT_FETCH("kern.pin_pcpu_swi", &pin_pcpu_swi); /* - * Only cpu0 handles timeout(9) and receives a preallocation. + * Only BSP handles timeout(9) and receives a preallocation. * * XXX: Once all timeout(9) consumers are converted this can * be removed. @@ -328,7 +328,7 @@ callout_cpu_init(struct callout_cpu *cc, cc_cce_cleanup(cc, i); snprintf(cc->cc_ktr_event_name, sizeof(cc->cc_ktr_event_name), "callwheel cpu %d", cpu); - if (cc->cc_callout == NULL) /* Only cpu0 handles timeout(9) */ + if (cc->cc_callout == NULL) /* Only BSP handles timeout(9) */ return; for (i = 0; i < ncallout; i++) { c = &cc->cc_callout[i]; @@ -398,7 +398,7 @@ start_softclock(void *dummy) if (cpu == timeout_cpu) continue; cc = CC_CPU(cpu); - cc->cc_callout = NULL; /* Only cpu0 handles timeout(9). */ + cc->cc_callout = NULL; /* Only BSP handles timeout(9). */ callout_cpu_init(cc, cpu); snprintf(name, sizeof(name), "clock (%d)", cpu); ie = NULL;