svn commit: r365033 - head/sys/powerpc/include
Leandro Lupori
luporl at FreeBSD.org
Tue Sep 1 11:34:06 UTC 2020
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))
More information about the svn-src-head
mailing list