Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Sep 2010 15:14:05 +0000 (UTC)
From:      Fabien Thomas <fabient@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r212739 - stable/8/sys/dev/hwpmc
Message-ID:  <201009161514.o8GFE5AJ095505@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: fabient
Date: Thu Sep 16 15:14:05 2010
New Revision: 212739
URL: http://svn.freebsd.org/changeset/base/212739

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/8/sys/dev/hwpmc/hwpmc_core.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/hwpmc/hwpmc_core.c
==============================================================================
--- stable/8/sys/dev/hwpmc/hwpmc_core.c	Thu Sep 16 15:11:17 2010	(r212738)
+++ stable/8/sys/dev/hwpmc/hwpmc_core.c	Thu Sep 16 15:14:05 2010	(r212739)
@@ -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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009161514.o8GFE5AJ095505>