Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hwpmc/hwpmc_powerpc.c
| Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | for (; frames < maxsamples; frames++) { | ||||
| cc[frames] = pc; | cc[frames] = pc; | ||||
| osp = sp; | osp = sp; | ||||
| sp = (uintptr_t *)*sp; | sp = (uintptr_t *)*sp; | ||||
| } | } | ||||
| return (frames); | return (frames); | ||||
| } | } | ||||
| static int | |||||
| powerpc_switch_in(struct pmc_cpu *pc, struct pmc_process *pp) | |||||
| { | |||||
| return (0); | |||||
| } | |||||
| static int | |||||
| powerpc_switch_out(struct pmc_cpu *pc, struct pmc_process *pp) | |||||
| { | |||||
| return (0); | |||||
| } | |||||
| int | int | ||||
| powerpc_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) | powerpc_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) | ||||
| { | { | ||||
| struct pmc_hw *phw; | struct pmc_hw *phw; | ||||
| KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), | KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), | ||||
| ("[powerpc,%d], illegal CPU %d", __LINE__, cpu)); | ("[powerpc,%d], illegal CPU %d", __LINE__, cpu)); | ||||
| ▲ Show 20 Lines • Show All 428 Lines • ▼ Show 20 Lines | pmc_md_initialize(void) | ||||
| */ | */ | ||||
| powerpc_pcpu = malloc(sizeof(struct powerpc_cpu *) * pmc_cpu_max(), M_PMC, | powerpc_pcpu = malloc(sizeof(struct powerpc_cpu *) * pmc_cpu_max(), M_PMC, | ||||
| M_WAITOK|M_ZERO); | M_WAITOK|M_ZERO); | ||||
| /* Just one class */ | /* Just one class */ | ||||
| pmc_mdep = pmc_mdep_alloc(1); | pmc_mdep = pmc_mdep_alloc(1); | ||||
| vers = mfpvr() >> 16; | vers = mfpvr() >> 16; | ||||
| pmc_mdep->pmd_switch_in = powerpc_switch_in; | |||||
| pmc_mdep->pmd_switch_out = powerpc_switch_out; | |||||
| switch (vers) { | switch (vers) { | ||||
| case MPC7447A: | case MPC7447A: | ||||
| case MPC7448: | case MPC7448: | ||||
| case MPC7450: | case MPC7450: | ||||
| case MPC7455: | case MPC7455: | ||||
| case MPC7457: | case MPC7457: | ||||
| error = pmc_mpc7xxx_initialize(pmc_mdep); | error = pmc_mpc7xxx_initialize(pmc_mdep); | ||||
| break; | break; | ||||
| ▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines | |||||