Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Aug 2016 16:52:00 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r303720 - head/sys/dev/hwpmc
Message-ID:  <201608031652.u73Gq0UJ074875@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Wed Aug  3 16:52:00 2016
New Revision: 303720
URL: https://svnweb.freebsd.org/changeset/base/303720

Log:
  Apply the fix from r232612 to fixed function counters.
  
  Reviewed by:	emaste
  MFC after:	1 month
  Differential Revision:	https://reviews.freebsd.org/D7397

Modified:
  head/sys/dev/hwpmc/hwpmc_core.c

Modified: head/sys/dev/hwpmc/hwpmc_core.c
==============================================================================
--- head/sys/dev/hwpmc/hwpmc_core.c	Wed Aug  3 16:34:20 2016	(r303719)
+++ head/sys/dev/hwpmc/hwpmc_core.c	Wed Aug  3 16:52:00 2016	(r303720)
@@ -365,7 +365,7 @@ iaf_read_pmc(int cpu, int ri, pmc_value_
 	if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm)))
 		*v = iaf_perfctr_value_to_reload_count(tmp);
 	else
-		*v = tmp;
+		*v = tmp & ((1ULL << core_iaf_width) - 1);
 
 	PMCDBG4(MDP,REA,1, "iaf-read cpu=%d ri=%d msr=0x%x -> v=%jx", cpu, ri,
 	    IAF_RI_TO_MSR(ri), *v);



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