diff options
author | gonzo <gonzo@FreeBSD.org> | 2012-03-22 18:07:44 +0000 |
---|---|---|
committer | gonzo <gonzo@FreeBSD.org> | 2012-03-22 18:07:44 +0000 |
commit | aefc71658f052223cfbe94a5ff41f06dddce5af4 (patch) | |
tree | 995622d311e7c92102b5d1e13021d0df8d558543 /lib/libpmc | |
parent | 44ac3b71b62ab9392ef911c0f5ed3f989a1d7151 (diff) | |
download | FreeBSD-src-aefc71658f052223cfbe94a5ff41f06dddce5af4.zip FreeBSD-src-aefc71658f052223cfbe94a5ff41f06dddce5af4.tar.gz |
Make reusable part of code have mips prefix, not mips24
Diffstat (limited to 'lib/libpmc')
-rw-r--r-- | lib/libpmc/libpmc.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/libpmc/libpmc.c b/lib/libpmc/libpmc.c index a8378e9..05fbde9 100644 --- a/lib/libpmc/libpmc.c +++ b/lib/libpmc/libpmc.c @@ -79,7 +79,7 @@ static int xscale_allocate_pmc(enum pmc_event _pe, char *_ctrspec, #endif #if defined(__mips__) -static int mips24k_allocate_pmc(enum pmc_event _pe, char* ctrspec, +static int mips_allocate_pmc(enum pmc_event _pe, char* ctrspec, struct pmc_op_pmcallocate *_pmc_config); #endif /* __mips__ */ @@ -279,7 +279,7 @@ PMC_CLASS_TABLE_DESC(xscale, XSCALE, xscale, xscale); #endif #if defined(__mips__) -PMC_CLASS_TABLE_DESC(mips24k, MIPS24K, mips24k, mips24k); +PMC_CLASS_TABLE_DESC(mips24k, MIPS24K, mips24k, mips); #endif /* __mips__ */ #if defined(__powerpc__) @@ -2208,12 +2208,12 @@ static struct pmc_event_alias mips24k_aliases[] = { EV_ALIAS(NULL, NULL) }; -#define MIPS24K_KW_OS "os" -#define MIPS24K_KW_USR "usr" -#define MIPS24K_KW_ANYTHREAD "anythread" +#define MIPS_KW_OS "os" +#define MIPS_KW_USR "usr" +#define MIPS_KW_ANYTHREAD "anythread" static int -mips24k_allocate_pmc(enum pmc_event pe, char *ctrspec __unused, +mips_allocate_pmc(enum pmc_event pe, char *ctrspec __unused, struct pmc_op_pmcallocate *pmc_config __unused) { char *p; @@ -2223,11 +2223,11 @@ mips24k_allocate_pmc(enum pmc_event pe, char *ctrspec __unused, pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); while ((p = strsep(&ctrspec, ",")) != NULL) { - if (KWMATCH(p, MIPS24K_KW_OS)) + if (KWMATCH(p, MIPS_KW_OS)) pmc_config->pm_caps |= PMC_CAP_SYSTEM; - else if (KWMATCH(p, MIPS24K_KW_USR)) + else if (KWMATCH(p, MIPS_KW_USR)) pmc_config->pm_caps |= PMC_CAP_USER; - else if (KWMATCH(p, MIPS24K_KW_ANYTHREAD)) + else if (KWMATCH(p, MIPS_KW_ANYTHREAD)) pmc_config->pm_caps |= (PMC_CAP_USER | PMC_CAP_SYSTEM); else return (-1); @@ -2235,6 +2235,7 @@ mips24k_allocate_pmc(enum pmc_event pe, char *ctrspec __unused, return (0); } + #endif /* __mips__ */ #if defined(__powerpc__) |