Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Sep 2020 11:34:05 +0000 (UTC)
From:      Leandro Lupori <luporl@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r365033 - head/sys/powerpc/include
Message-ID:  <202009011134.081BY5ob058282@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: luporl
Date: Tue Sep  1 11:34:05 2020
New Revision: 365033
URL: https://svnweb.freebsd.org/changeset/base/365033

Log:
  [PowerPC] Fix PMCLOG address width
  
  PMCLOG macros were always using 32-bit addresses, even on PPC64.
  This resulted in truncated addresses in logs, when running on 64-bit PPC
  machines.
  
  Sponsored by:	Eldorado Research Institute (eldorado.org.br)
  Differential Revision:	https://reviews.freebsd.org/D26112

Modified:
  head/sys/powerpc/include/pmc_mdep.h

Modified: head/sys/powerpc/include/pmc_mdep.h
==============================================================================
--- head/sys/powerpc/include/pmc_mdep.h	Tue Sep  1 11:30:39 2020	(r365032)
+++ head/sys/powerpc/include/pmc_mdep.h	Tue Sep  1 11:34:05 2020	(r365033)
@@ -14,8 +14,13 @@ union pmc_md_op_pmcallocate {
 };
 
 /* Logging */
+#ifdef __powerpc64__
+#define	PMCLOG_READADDR		PMCLOG_READ64
+#define	PMCLOG_EMITADDR		PMCLOG_EMIT64
+#else
 #define	PMCLOG_READADDR		PMCLOG_READ32
 #define	PMCLOG_EMITADDR		PMCLOG_EMIT32
+#endif
 
 #define	mtpmr(reg, val)							\
 	__asm __volatile("mtpmr %0,%1" : : "K"(reg), "r"(val))



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