aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/hwpmc/hwpmc_amd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/hwpmc/hwpmc_amd.c')
-rw-r--r--sys/dev/hwpmc/hwpmc_amd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c
index 5bb20d4b83c6..9b5f2a5519e8 100644
--- a/sys/dev/hwpmc/hwpmc_amd.c
+++ b/sys/dev/hwpmc/hwpmc_amd.c
@@ -627,14 +627,15 @@ amd_stop_pmc(int cpu, int ri)
*/
static int
-amd_intr(int cpu, struct trapframe *tf)
+amd_intr(struct trapframe *tf)
{
- int i, error, retval;
+ int i, error, retval, cpu;
uint32_t config, evsel, perfctr;
struct pmc *pm;
struct amd_cpu *pac;
pmc_value_t v;
+ cpu = curcpu;
KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
("[amd,%d] out of range CPU %d", __LINE__, cpu));
@@ -688,8 +689,7 @@ amd_intr(int cpu, struct trapframe *tf)
wrmsr(perfctr, AMD_RELOAD_COUNT_TO_PERFCTR_VALUE(v));
/* Restart the counter if logging succeeded. */
- error = pmc_process_interrupt(cpu, PMC_HR, pm, tf,
- TRAPF_USERMODE(tf));
+ error = pmc_process_interrupt(PMC_HR, pm, tf);
if (error == 0)
wrmsr(evsel, config);
}