From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 15:18:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 247D61065693; Thu, 16 Sep 2010 15:18:47 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12F638FC12; Thu, 16 Sep 2010 15:18:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8GFIkS4095820; Thu, 16 Sep 2010 15:18:46 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GFIkSM095818; Thu, 16 Sep 2010 15:18:46 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201009161518.o8GFIkSM095818@svn.freebsd.org> From: Fabien Thomas Date: Thu, 16 Sep 2010 15:18:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212741 - stable/7/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 15:18:47 -0000 Author: fabient Date: Thu Sep 16 15:18:46 2010 New Revision: 212741 URL: http://svn.freebsd.org/changeset/base/212741 Log: MFC r212224: Fix invalid class removal when IAF is not the last class. Keep IAF class with 0 PMC and change the alias in libpmc to IAP. Modified: stable/7/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/7/sys/dev/hwpmc/hwpmc_core.c Thu Sep 16 15:15:34 2010 (r212740) +++ stable/7/sys/dev/hwpmc/hwpmc_core.c Thu Sep 16 15:18:46 2010 (r212741) @@ -2234,21 +2234,8 @@ pmc_core_initialize(struct pmc_mdep *md, core_iaf_npmc = cpuid[CORE_CPUID_EDX] & 0x1F; core_iaf_width = (cpuid[CORE_CPUID_EDX] >> 5) & 0xFF; - if (core_iaf_npmc > 0) { - iaf_initialize(md, maxcpu, core_iaf_npmc, - core_iaf_width); - core_pmcmask |= ((1ULL << core_iaf_npmc) - 1) << - IAF_OFFSET; - } else { - /* - * Adjust the number of classes exported to - * user space. - */ - md->pmd_nclass--; - KASSERT(md->pmd_nclass == 2, - ("[core,%d] unexpected nclass %d", __LINE__, - md->pmd_nclass)); - } + iaf_initialize(md, maxcpu, core_iaf_npmc, core_iaf_width); + core_pmcmask |= ((1ULL << core_iaf_npmc) - 1) << IAF_OFFSET; } PMCDBG(MDP,INI,1,"core-init pmcmask=0x%jx iafri=%d", core_pmcmask,