aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/hwpmc/hwpmc_powerpc.h
diff options
context:
space:
mode:
authorMitchell Horne <mhorne@FreeBSD.org>2023-05-05 22:00:02 +0000
committerMitchell Horne <mhorne@FreeBSD.org>2023-06-09 19:47:33 +0000
commit1b7d148ed773259d1e247c326ff8d500f92f289a (patch)
tree1bd9a6946c78ddf3b40305f116bd1632c3ac6c09 /sys/dev/hwpmc/hwpmc_powerpc.h
parente6b3aaa3e68db10ef4ef7ae25cefb04b3d61b5d2 (diff)
hwpmc: pass pmc pointer to more class methods
In many cases this avoids an extra lookup, since the callers always have pm at hand. We can also eliminate several assertions, mostly for pm != NULL. The class methods are an internal interface, and the callers already handle such a scenario. No functional change intended. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39915 (cherry picked from commit 39f92a76a99a2ceb747250da4f2d627b9c317f8c)
Diffstat (limited to 'sys/dev/hwpmc/hwpmc_powerpc.h')
-rw-r--r--sys/dev/hwpmc/hwpmc_powerpc.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/hwpmc/hwpmc_powerpc.h b/sys/dev/hwpmc/hwpmc_powerpc.h
index 25b041327b84..efd7aca1b9ef 100644
--- a/sys/dev/hwpmc/hwpmc_powerpc.h
+++ b/sys/dev/hwpmc/hwpmc_powerpc.h
@@ -101,13 +101,13 @@ int powerpc_pcpu_fini(struct pmc_mdep *md, int cpu);
int powerpc_allocate_pmc(int cpu, int ri, struct pmc *pm,
const struct pmc_op_pmcallocate *a);
int powerpc_release_pmc(int cpu, int ri, struct pmc *pmc);
-int powerpc_start_pmc(int cpu, int ri);
-int powerpc_stop_pmc(int cpu, int ri);
+int powerpc_start_pmc(int cpu, int ri, struct pmc *pm);
+int powerpc_stop_pmc(int cpu, int ri, struct pmc *pm);
int powerpc_config_pmc(int cpu, int ri, struct pmc *pm);
pmc_value_t powerpc_pmcn_read_default(unsigned int pmc);
void powerpc_pmcn_write_default(unsigned int pmc, uint32_t val);
-int powerpc_read_pmc(int cpu, int ri, pmc_value_t *v);
-int powerpc_write_pmc(int cpu, int ri, pmc_value_t v);
+int powerpc_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v);
+int powerpc_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v);
int powerpc_pmc_intr(struct trapframe *tf);
#endif /* _KERNEL */