aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
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
parent69724399c405522d0f20a4aa77ca21a13ae0555a (diff)
downloadsrc-d73912e57ad5c8d7c3c6b6ee0cae17a8f12656ab.tar.gz
src-d73912e57ad5c8d7c3c6b6ee0cae17a8f12656ab.zip
hwpmc: update files missed by r334827
Notes
Notes: svn path=/head/; revision=334845
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/hwpmc/hwpmc_e500.c8
-rw-r--r--sys/dev/hwpmc/hwpmc_mips.c5
-rw-r--r--sys/dev/hwpmc/hwpmc_mpc7xxx.c5
-rw-r--r--sys/dev/hwpmc/hwpmc_ppc970.c5
4 files changed, 13 insertions, 10 deletions
diff --git a/sys/dev/hwpmc/hwpmc_e500.c b/sys/dev/hwpmc/hwpmc_e500.c
index 2d4065b89eaa..3ab21d4779cc 100644
--- a/sys/dev/hwpmc/hwpmc_e500.c
+++ b/sys/dev/hwpmc/hwpmc_e500.c
@@ -565,13 +565,14 @@ e500_release_pmc(int cpu, int ri, struct pmc *pmc)
}
static int
-e500_intr(int cpu, struct trapframe *tf)
+e500_intr(struct trapframe *tf)
{
- int i, error, retval;
+ int i, error, retval, cpu;
uint32_t config;
struct pmc *pm;
struct powerpc_cpu *pac;
+ cpu = curcpu;
KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
("[powerpc,%d] out of range CPU %d", __LINE__, cpu));
@@ -607,8 +608,7 @@ e500_intr(int cpu, struct trapframe *tf)
continue;
/* Stop the counter if logging fails. */
- error = pmc_process_interrupt(cpu, PMC_HR, pm, tf,
- TRAPF_USERMODE(tf));
+ error = pmc_process_interrupt(PMC_HR, pm, tf);
if (error != 0)
e500_stop_pmc(cpu, i);
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));
diff --git a/sys/dev/hwpmc/hwpmc_mpc7xxx.c b/sys/dev/hwpmc/hwpmc_mpc7xxx.c
index 457d55c343d1..b9ee7ebb867b 100644
--- a/sys/dev/hwpmc/hwpmc_mpc7xxx.c
+++ b/sys/dev/hwpmc/hwpmc_mpc7xxx.c
@@ -660,13 +660,14 @@ mpc7xxx_release_pmc(int cpu, int ri, struct pmc *pmc)
}
static int
-mpc7xxx_intr(int cpu, struct trapframe *tf)
+mpc7xxx_intr(struct trapframe *tf)
{
- int i, error, retval;
+ int i, error, retval, cpu;
uint32_t config;
struct pmc *pm;
struct powerpc_cpu *pac;
+ cpu = curcpu;
KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
("[powerpc,%d] out of range CPU %d", __LINE__, cpu));
diff --git a/sys/dev/hwpmc/hwpmc_ppc970.c b/sys/dev/hwpmc/hwpmc_ppc970.c
index 3c7213f8b4b4..111a1cfb8106 100644
--- a/sys/dev/hwpmc/hwpmc_ppc970.c
+++ b/sys/dev/hwpmc/hwpmc_ppc970.c
@@ -479,13 +479,14 @@ ppc970_write_pmc(int cpu, int ri, pmc_value_t v)
}
static int
-ppc970_intr(int cpu, struct trapframe *tf)
+ppc970_intr(struct trapframe *tf)
{
struct pmc *pm;
struct powerpc_cpu *pac;
uint32_t config;
- int i, error, retval;
+ int i, error, retval, cpu;
+ cpu = curcpu;
KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
("[powerpc,%d] out of range CPU %d", __LINE__, cpu));