aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/hwpmc/hwpmc_mips.c
diff options
context:
space:
mode:
authorMatt Macy <mmacy@FreeBSD.org>2018-06-08 17:41:49 +0000
committerMatt Macy <mmacy@FreeBSD.org>2018-06-08 17:41:49 +0000
commitd73912e57ad5c8d7c3c6b6ee0cae17a8f12656ab (patch)
treedc843d4cc0cf814fad5b4600527a7fcac160b302 /sys/dev/hwpmc/hwpmc_mips.c
parent69724399c405522d0f20a4aa77ca21a13ae0555a (diff)
Notes
Diffstat (limited to 'sys/dev/hwpmc/hwpmc_mips.c')
-rw-r--r--sys/dev/hwpmc/hwpmc_mips.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/hwpmc/hwpmc_mips.c b/sys/dev/hwpmc/hwpmc_mips.c
index 99b8defff981..edf83154dc57 100644
--- a/sys/dev/hwpmc/hwpmc_mips.c
+++ b/sys/dev/hwpmc/hwpmc_mips.c
@@ -252,15 +252,16 @@ mips_release_pmc(int cpu, int ri, struct pmc *pmc)
}
static int
-mips_pmc_intr(int cpu, struct trapframe *tf)
+mips_pmc_intr(struct trapframe *tf)
{
int error;
- int retval, ri;
+ int retval, ri, cpu;
struct pmc *pm;
struct mips_cpu *pc;
uint32_t r0, r2;
pmc_value_t r;
+ cpu = curcpu;
KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
("[mips,%d] CPU %d out of range", __LINE__, cpu));