Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 May 2012 10:30:17 -0400
From:      Ryan Stone <rysto32@gmail.com>
To:        Peter Jeremy <peter@rulingia.com>
Cc:        freebsd-current@freebsd.org, Fabien Thomas <fabient@freebsd.org>
Subject:   Re: panic: incorrect npmc count
Message-ID:  <CAFMmRNyNJ3d-MWOUr9t=YhK6F8wz%2BWoBHBYV7=gn_F6ACK7erQ@mail.gmail.com>
In-Reply-To: <20120509051619.GA60571@server.rulingia.com>
References:  <20120509051619.GA60571@server.rulingia.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 9, 2012 at 1:16 AM, Peter Jeremy <peter@rulingia.com> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFMmRNyNJ3d-MWOUr9t=YhK6F8wz%2BWoBHBYV7=gn_F6ACK7erQ>