Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Sep 2013 04:11:39 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r255199 - head/sys/dev/hwpmc
Message-ID:  <201309040411.r844BdG5065348@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Wed Sep  4 04:11:38 2013
New Revision: 255199
URL: http://svnweb.freebsd.org/changeset/base/255199

Log:
  Fix hwpmc(4) for 32-bit PowerPC.

Modified:
  head/sys/dev/hwpmc/hwpmc_powerpc.c
  head/sys/dev/hwpmc/hwpmc_powerpc.h

Modified: head/sys/dev/hwpmc/hwpmc_powerpc.c
==============================================================================
--- head/sys/dev/hwpmc/hwpmc_powerpc.c	Tue Sep  3 23:34:04 2013	(r255198)
+++ head/sys/dev/hwpmc/hwpmc_powerpc.c	Wed Sep  4 04:11:38 2013	(r255199)
@@ -36,6 +36,8 @@ __FBSDID("$FreeBSD$");
 
 #include <machine/pmc_mdep.h>
 #include <machine/spr.h>
+#include <machine/pte.h>
+#include <machine/sr.h>
 #include <machine/cpu.h>
 #include <machine/vmparam.h> /* For VM_MIN_KERNEL_ADDRESS/VM_MAX_KERNEL_ADDRESS */
 
@@ -44,11 +46,6 @@ __FBSDID("$FreeBSD$");
 #define INKERNEL(x)	(((vm_offset_t)(x)) <= VM_MAX_KERNEL_ADDRESS && \
 		((vm_offset_t)(x)) >= VM_MIN_KERNEL_ADDRESS)
 
-/*
- * Per-processor information.
- */
-static unsigned int ppc_npmcs;
-
 int
 pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples,
     struct trapframe *tf)
@@ -89,8 +86,6 @@ powerpc_describe(int cpu, int ri, struct
 
 	KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
 	    ("[powerpc,%d], illegal CPU %d", __LINE__, cpu));
-	KASSERT(ri >= 0 && ri < ppc_npmcs,
-	    ("[powerpc,%d] row-index %d out of range", __LINE__, ri));
 
 	phw = &powerpc_pcpu[cpu]->pc_ppcpmcs[ri];
 	snprintf(powerpc_name, sizeof(powerpc_name), "POWERPC-%d", ri);

Modified: head/sys/dev/hwpmc/hwpmc_powerpc.h
==============================================================================
--- head/sys/dev/hwpmc/hwpmc_powerpc.h	Tue Sep  3 23:34:04 2013	(r255198)
+++ head/sys/dev/hwpmc/hwpmc_powerpc.h	Wed Sep  4 04:11:38 2013	(r255199)
@@ -51,7 +51,6 @@ struct powerpc_cpu {
 extern struct powerpc_cpu **powerpc_pcpu;
 
 extern int pmc_mpc7xxx_initialize(struct pmc_mdep *pmc_mdep);
-extern int pmc_ppc970_initialize(struct pmc_mdep *pmc_mdep);
 
 extern int powerpc_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc);
 extern int powerpc_get_config(int cpu, int ri, struct pmc **ppm);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309040411.r844BdG5065348>