Fix hwpmc(4) for 32-bit PowerPC.

This commit is contained in:
Justin Hibbits 2013-09-04 04:11:38 +00:00
parent 4f641559c7
commit 177f0102f4
2 changed files with 2 additions and 8 deletions

View File

@ -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 pmc_info *pi, struct pmc **ppmc)
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);

View File

@ -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);