From owner-freebsd-current@FreeBSD.ORG Wed May 9 05:16:38 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 48B06106564A; Wed, 9 May 2012 05:16:38 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from fallbackmx08.syd.optusnet.com.au (fallbackmx08.syd.optusnet.com.au [211.29.132.10]) by mx1.freebsd.org (Postfix) with ESMTP id CCE178FC08; Wed, 9 May 2012 05:16:37 +0000 (UTC) Received: from mail15.syd.optusnet.com.au (mail15.syd.optusnet.com.au [211.29.132.196]) by fallbackmx08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q495GTSv025339; Wed, 9 May 2012 15:16:29 +1000 Received: from server.rulingia.com (c220-239-251-180.belrs5.nsw.optusnet.com.au [220.239.251.180]) by mail15.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q495GJR2030338 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 9 May 2012 15:16:21 +1000 X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.5/8.14.5) with ESMTP id q495GJdO060601; Wed, 9 May 2012 15:16:19 +1000 (EST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.5/8.14.5/Submit) id q495GJdn060600; Wed, 9 May 2012 15:16:19 +1000 (EST) (envelope-from peter) Date: Wed, 9 May 2012 15:16:19 +1000 From: Peter Jeremy To: freebsd-current@freebsd.org Message-ID: <20120509051619.GA60571@server.rulingia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PNTmBPCT7hxwcZjr" Content-Disposition: inline X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Fabien Thomas Subject: 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: Wed, 09 May 2012 05:16:38 -0000 --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [This may be a duplicate because I forgot to update my subscription after changing address but I've also corrected a typo] (I've copied fabient@ because r233628 appears to have been the last commit in this area). 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. 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). 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 --PNTmBPCT7hxwcZjr Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk+p/aMACgkQ/opHv/APuIe61ACeNk/cXQQ6zZnTQ6poZEbD66+n ELUAmgNwk5P8Vsk6KgpjpBBHqZzBi/9T =EUZQ -----END PGP SIGNATURE----- --PNTmBPCT7hxwcZjr--