svn commit: r334845 - head/sys/dev/hwpmc

Matt Macy mmacy at FreeBSD.org
Fri Jun 8 17:41:50 UTC 2018


Author: mmacy
Date: Fri Jun  8 17:41:49 2018
New Revision: 334845
URL: https://svnweb.freebsd.org/changeset/base/334845

Log:
  hwpmc: update files missed by r334827

Modified:
  head/sys/dev/hwpmc/hwpmc_e500.c
  head/sys/dev/hwpmc/hwpmc_mips.c
  head/sys/dev/hwpmc/hwpmc_mpc7xxx.c
  head/sys/dev/hwpmc/hwpmc_ppc970.c

Modified: head/sys/dev/hwpmc/hwpmc_e500.c
==============================================================================
--- head/sys/dev/hwpmc/hwpmc_e500.c	Fri Jun  8 17:38:28 2018	(r334844)
+++ head/sys/dev/hwpmc/hwpmc_e500.c	Fri Jun  8 17:41:49 2018	(r334845)
@@ -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);
 

Modified: head/sys/dev/hwpmc/hwpmc_mips.c
==============================================================================
--- head/sys/dev/hwpmc/hwpmc_mips.c	Fri Jun  8 17:38:28 2018	(r334844)
+++ head/sys/dev/hwpmc/hwpmc_mips.c	Fri Jun  8 17:41:49 2018	(r334845)
@@ -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));
 

Modified: head/sys/dev/hwpmc/hwpmc_mpc7xxx.c
==============================================================================
--- head/sys/dev/hwpmc/hwpmc_mpc7xxx.c	Fri Jun  8 17:38:28 2018	(r334844)
+++ head/sys/dev/hwpmc/hwpmc_mpc7xxx.c	Fri Jun  8 17:41:49 2018	(r334845)
@@ -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));
 

Modified: head/sys/dev/hwpmc/hwpmc_ppc970.c
==============================================================================
--- head/sys/dev/hwpmc/hwpmc_ppc970.c	Fri Jun  8 17:38:28 2018	(r334844)
+++ head/sys/dev/hwpmc/hwpmc_ppc970.c	Fri Jun  8 17:41:49 2018	(r334845)
@@ -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));
 


More information about the svn-src-head mailing list