summaryrefslogtreecommitdiffstats
path: root/sys/dev/hwpmc/hwpmc_arm.c
diff options
context:
space:
mode:
authorrpaulo <rpaulo@FreeBSD.org>2009-12-23 23:16:54 +0000
committerrpaulo <rpaulo@FreeBSD.org>2009-12-23 23:16:54 +0000
commitf7db53a9d138b86810b2eec364678ab67ad0ba30 (patch)
tree1507605c16579edd0e3cdad97219adbea0eb689e /sys/dev/hwpmc/hwpmc_arm.c
parentd4cee572d1358ddf0158d0bd1caeef07c0304584 (diff)
downloadFreeBSD-src-f7db53a9d138b86810b2eec364678ab67ad0ba30.zip
FreeBSD-src-f7db53a9d138b86810b2eec364678ab67ad0ba30.tar.gz
Intel XScale hwpmc(4) support.
This brings hwpmc(4) support for 2nd and 3rd generation XScale cores. Right now it's enabled by default to make sure we test this a bit. When the time comes it can be disabled by default. Tested on Gateworks boards. A man page is coming. Obtained from: //depot/user/rpaulo/xscalepmc/...
Diffstat (limited to 'sys/dev/hwpmc/hwpmc_arm.c')
-rw-r--r--sys/dev/hwpmc/hwpmc_arm.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/dev/hwpmc/hwpmc_arm.c b/sys/dev/hwpmc/hwpmc_arm.c
index ce1caf6..86cfaf3 100644
--- a/sys/dev/hwpmc/hwpmc_arm.c
+++ b/sys/dev/hwpmc/hwpmc_arm.c
@@ -30,19 +30,28 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/pmc.h>
+#include <sys/systm.h>
#include <machine/pmc_mdep.h>
+#include <machine/md_var.h>
struct pmc_mdep *
pmc_md_initialize()
{
- return NULL;
+ if (cpu_class == CPU_CLASS_XSCALE)
+ return pmc_xscale_initialize();
+ else
+ return NULL;
}
void
pmc_md_finalize(struct pmc_mdep *md)
{
- (void) md;
+ if (cpu_class == CPU_CLASS_XSCALE)
+ pmc_xscale_finalize(md);
+ else
+ KASSERT(0, ("[arm,%d] Unknown CPU Class 0x%x", __LINE__,
+ cpu_class));
}
int
OpenPOWER on IntegriCloud