From owner-freebsd-current@FreeBSD.ORG Thu May 10 14:28:50 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83AE6106566C for ; Thu, 10 May 2012 14:28:50 +0000 (UTC) (envelope-from fabien.thomas@netasq.com) Received: from work.netasq.com (gwlille.netasq.com [91.212.116.1]) by mx1.freebsd.org (Postfix) with ESMTP id 19D808FC0C for ; Thu, 10 May 2012 14:28:49 +0000 (UTC) Received: from [10.2.1.1] (unknown [10.2.1.1]) by work.netasq.com (Postfix) with ESMTPSA id 5E08F2703D13; Thu, 10 May 2012 16:30:11 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: multipart/signed; boundary="Apple-Mail=_4EE97FF8-E5B3-43F3-960A-7DAA9D7602A3"; protocol="application/pkcs7-signature"; micalg=sha1 From: Fabien Thomas In-Reply-To: Date: Thu, 10 May 2012 16:28:46 +0200 Message-Id: <6912E995-AB15-498F-A9AF-03A8A8D5BC61@netasq.com> References: <20120509051619.GA60571@server.rulingia.com> To: Peter Jeremy X-Mailer: Apple Mail (2.1257) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-current , Ryan Stone Subject: Re: panic: incorrect npmc count X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2012 14:28:50 -0000 --Apple-Mail=_4EE97FF8-E5B3-43F3-960A-7DAA9D7602A3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Le 9 mai 2012 =E0 16:30, Ryan Stone a =E9crit : > On Wed, May 9, 2012 at 1:16 AM, Peter Jeremy = wrote: >> [This may be a duplicate because I forgot to update my subscription >> after changing address but I've also corrected a typo] >>=20 >> (I've copied fabient@ because r233628 appears to have been the last >> commit in this area). >>=20 >> I've just updated a P4 test box from r232545 to r235127 and it now >> panics during boot: >> panic: [intel,202] incorrect npmc count 35 >> Looking at sys/dev/hwpmc/hmpmc_intel.c line 202, the expected >> npmc count is 19. >>=20 >> When I look at the actual code in pmc_intel_initialize(): >> pmc_mdep_alloc() initialises pmd_npmc to zero and then increments >> it by SOFT_NPMCS (16) in pmc_soft_initialize(). >> pmc_tsc_initialize() then increments it by TSC_NPMCS (1) >> pmc_p4_initialize() then increments it by P4_NPMCS (18) >> This totals 35 (as per the panic message). >>=20 >> Can someone explain the KASSERT() that expects 19 - it boils down to >> KASSERT(0+16+1+18 =3D=3D 1+18, ...) >> I gather not many people are running -current on a P4. >>=20 >> -- >> Peter Jeremy >=20 > That KASSERT is just out of date. The soft PMC support is quite new. > I would just drop the KASSERT entirely; it really isn't adding any > value. Back from vacation. Yes, as Ryan stated the KASSERT is out of date and i've missed the update / removal with soft PMC. Fixed with r235229. Fabien --Apple-Mail=_4EE97FF8-E5B3-43F3-960A-7DAA9D7602A3--