summaryrefslogtreecommitdiffstats
path: root/sys/dev/hwpmc/hwpmc_arm.c
diff options
context:
space:
mode:
authorbr <br@FreeBSD.org>2015-01-28 16:08:07 +0000
committerbr <br@FreeBSD.org>2015-01-28 16:08:07 +0000
commit236c1b153d8f9cb45e001cab10a5f7cde815ca08 (patch)
treefffab9a0d051c34807598c60199e574f6c344eec /sys/dev/hwpmc/hwpmc_arm.c
parentb7bb1dabe49776494d20ef55f89858d44829945d (diff)
downloadFreeBSD-src-236c1b153d8f9cb45e001cab10a5f7cde815ca08.zip
FreeBSD-src-236c1b153d8f9cb45e001cab10a5f7cde815ca08.tar.gz
Add ARMv7 performance monitoring counters.
Differential Revision: https://reviews.freebsd.org/D1687 Reviewed by: rpaulo Sponsored by: DARPA, AFRL
Diffstat (limited to 'sys/dev/hwpmc/hwpmc_arm.c')
-rw-r--r--sys/dev/hwpmc/hwpmc_arm.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/hwpmc/hwpmc_arm.c b/sys/dev/hwpmc/hwpmc_arm.c
index 654b949..492695a 100644
--- a/sys/dev/hwpmc/hwpmc_arm.c
+++ b/sys/dev/hwpmc/hwpmc_arm.c
@@ -47,9 +47,12 @@ pmc_md_initialize()
#ifdef CPU_XSCALE_IXP425
if (cpu_class == CPU_CLASS_XSCALE)
return pmc_xscale_initialize();
- else
#endif
- return NULL;
+#ifdef CPU_CORTEXA
+ if (cpu_class == CPU_CLASS_CORTEXA)
+ return pmc_armv7_initialize();
+#endif
+ return NULL;
}
void
@@ -62,6 +65,10 @@ pmc_md_finalize(struct pmc_mdep *md)
KASSERT(0, ("[arm,%d] Unknown CPU Class 0x%x", __LINE__,
cpu_class));
#endif
+#ifdef CPU_CORTEXA
+ if (cpu_class == CPU_CLASS_CORTEXA)
+ pmc_armv7_finalize(md);
+#endif
}
int
OpenPOWER on IntegriCloud