Page MenuHomeFreeBSD

D41268.diff
No OneTemporary

D41268.diff

diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c
--- a/sys/dev/hwpmc/hwpmc_arm64.c
+++ b/sys/dev/hwpmc/hwpmc_arm64.c
@@ -450,7 +450,7 @@
KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
("[arm64,%d] wrong cpu number %d", __LINE__, cpu));
- PMCDBG1(MDP, INI, 1, "arm64-init cpu=%d", cpu);
+ PMCDBG0(MDP, INI, 1, "arm64-pcpu-init");
arm64_pcpu[cpu] = pac = malloc(sizeof(struct arm64_cpu), M_PMC,
M_WAITOK | M_ZERO);
@@ -491,10 +491,16 @@
{
uint32_t pmcr;
+ PMCDBG0(MDP, INI, 1, "arm64-pcpu-fini");
+
pmcr = arm64_pmcr_read();
pmcr &= ~PMCR_E;
arm64_pmcr_write(pmcr);
+ free(arm64_pcpu[cpu]->pc_arm64pmcs, M_PMC);
+ free(arm64_pcpu[cpu], M_PMC);
+ arm64_pcpu[cpu] = NULL;
+
return (0);
}
@@ -605,5 +611,7 @@
void
pmc_arm64_finalize(struct pmc_mdep *md)
{
+ PMCDBG0(MDP, INI, 1, "arm64-finalize");
+ free(arm64_pcpu, M_PMC);
}

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 1, 12:03 AM (21 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14953357
Default Alt Text
D41268.diff (883 B)

Event Timeline