Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hwpmc/hwpmc_arm64.c
| Show First 20 Lines • Show All 442 Lines • ▼ Show 20 Lines | |||||
| arm64_get_config(int cpu, int ri, struct pmc **ppm) | arm64_get_config(int cpu, int ri, struct pmc **ppm) | ||||
| { | { | ||||
| *ppm = arm64_pcpu[cpu]->pc_arm64pmcs[ri].phw_pmc; | *ppm = arm64_pcpu[cpu]->pc_arm64pmcs[ri].phw_pmc; | ||||
| return (0); | return (0); | ||||
| } | } | ||||
| /* | |||||
| * XXX don't know what we should do here. | |||||
| */ | |||||
| static int | static int | ||||
| arm64_switch_in(struct pmc_cpu *pc, struct pmc_process *pp) | |||||
| { | |||||
| return (0); | |||||
| } | |||||
| static int | |||||
| arm64_switch_out(struct pmc_cpu *pc, struct pmc_process *pp) | |||||
| { | |||||
| return (0); | |||||
| } | |||||
| static int | |||||
| arm64_pcpu_init(struct pmc_mdep *md, int cpu) | arm64_pcpu_init(struct pmc_mdep *md, int cpu) | ||||
| { | { | ||||
| struct arm64_cpu *pac; | struct arm64_cpu *pac; | ||||
| struct pmc_hw *phw; | struct pmc_hw *phw; | ||||
| struct pmc_cpu *pc; | struct pmc_cpu *pc; | ||||
| uint64_t pmcr; | uint64_t pmcr; | ||||
| int first_ri; | int first_ri; | ||||
| int i; | int i; | ||||
| ▲ Show 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | #endif | ||||
| pcd->pcd_describe = arm64_describe; | pcd->pcd_describe = arm64_describe; | ||||
| pcd->pcd_get_config = arm64_get_config; | pcd->pcd_get_config = arm64_get_config; | ||||
| pcd->pcd_read_pmc = arm64_read_pmc; | pcd->pcd_read_pmc = arm64_read_pmc; | ||||
| pcd->pcd_release_pmc = arm64_release_pmc; | pcd->pcd_release_pmc = arm64_release_pmc; | ||||
| pcd->pcd_start_pmc = arm64_start_pmc; | pcd->pcd_start_pmc = arm64_start_pmc; | ||||
| pcd->pcd_stop_pmc = arm64_stop_pmc; | pcd->pcd_stop_pmc = arm64_stop_pmc; | ||||
| pcd->pcd_write_pmc = arm64_write_pmc; | pcd->pcd_write_pmc = arm64_write_pmc; | ||||
| pmc_mdep->pmd_intr = arm64_intr; | pmc_mdep->pmd_intr = arm64_intr; | ||||
| pmc_mdep->pmd_switch_in = arm64_switch_in; | |||||
| pmc_mdep->pmd_switch_out = arm64_switch_out; | |||||
| pmc_mdep->pmd_npmc += arm64_npmcs; | pmc_mdep->pmd_npmc += arm64_npmcs; | ||||
| #ifdef DEV_ACPI | #ifdef DEV_ACPI | ||||
| if (pmc_cmn600_nclasses() > 0) | if (pmc_cmn600_nclasses() > 0) | ||||
| pmc_cmn600_initialize(pmc_mdep); | pmc_cmn600_initialize(pmc_mdep); | ||||
| if (pmc_dmc620_nclasses() > 0) { | if (pmc_dmc620_nclasses() > 0) { | ||||
| pmc_dmc620_initialize_cd2(pmc_mdep); | pmc_dmc620_initialize_cd2(pmc_mdep); | ||||
| pmc_dmc620_initialize_c(pmc_mdep); | pmc_dmc620_initialize_c(pmc_mdep); | ||||
| } | } | ||||
| Show All 10 Lines | |||||