From owner-freebsd-current@FreeBSD.ORG Wed May 9 14:30:18 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 A686B1065677; Wed, 9 May 2012 14:30:18 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 13B598FC18; Wed, 9 May 2012 14:30:17 +0000 (UTC) Received: by werg1 with SMTP id g1so316553wer.13 for ; Wed, 09 May 2012 07:30:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=qg5kUxiFpYVWHH/Weji/Odvvv71vMI4WAdLKEnyOoKo=; b=rwiFsO/pEcgTJ8NCf96q2GcHEA8YL7uEcwrdyfI0QMifgh4VScmeFRZh7CWPTt2SB9 qVMi6M3xgO9UGpuxm1EnUGw6/272msMGnOpnuaY4YIgX7UfKd03642t0ZxfNb9ZySZVW DLsAn62BJHcY16uOiUMMtAWVQlERyLK16c34LIbzdXQhQD+gEyCs6uLAhyl223TSyODd 9NkaHtgNRHXdfHDEIaEx2smjCRlXHT4jGh7zPsWZ3xpwS7+0vCUeoS07FCN5JYKZukxs /1UVs5AdCXdV56bmpEyRSgkyZMcsZqiQ8U1Kzr7JZDgI5eplF7QG6ttO3nnM5csEWfYd 2G9w== MIME-Version: 1.0 Received: by 10.180.97.4 with SMTP id dw4mr7450326wib.18.1336573817037; Wed, 09 May 2012 07:30:17 -0700 (PDT) Received: by 10.180.94.97 with HTTP; Wed, 9 May 2012 07:30:17 -0700 (PDT) In-Reply-To: <20120509051619.GA60571@server.rulingia.com> References: <20120509051619.GA60571@server.rulingia.com> Date: Wed, 9 May 2012 10:30:17 -0400 Message-ID: From: Ryan Stone To: Peter Jeremy Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org, Fabien Thomas 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: Wed, 09 May 2012 14:30:18 -0000 On Wed, May 9, 2012 at 1:16 AM, Peter Jeremy wrote: > [This may be a duplicate because I forgot to update my subscription > =A0after 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: > =A0panic: [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 > =A0it 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. > > -- > Peter Jeremy 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.