git: 772b2dc3abc5 - main - hwpmc: remove pmd_pcpu_{init,fini} callbacks
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 06 May 2023 17:49:50 UTC
The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=772b2dc3abc5072743e7598d35e0a8ad621e7b0d commit 772b2dc3abc5072743e7598d35e0a8ad621e7b0d Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2023-05-05 21:59:33 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2023-05-06 17:49:19 +0000 hwpmc: remove pmd_pcpu_{init,fini} callbacks These are unused on all platforms. Reviewed by: jkoshy, emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39912 --- sys/dev/hwpmc/hwpmc_amd.c | 2 -- sys/dev/hwpmc/hwpmc_core.c | 3 --- sys/dev/hwpmc/hwpmc_mod.c | 6 ------ sys/sys/pmc.h | 4 ---- 4 files changed, 15 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c index c35f5fd4f095..43812951a8e5 100644 --- a/sys/dev/hwpmc/hwpmc_amd.c +++ b/sys/dev/hwpmc/hwpmc_amd.c @@ -1175,8 +1175,6 @@ pmc_amd_initialize(void) pcd->pcd_stop_pmc = amd_stop_pmc; pcd->pcd_write_pmc = amd_write_pmc; - pmc_mdep->pmd_pcpu_init = NULL; - pmc_mdep->pmd_pcpu_fini = NULL; pmc_mdep->pmd_intr = amd_intr; pmc_mdep->pmd_switch_in = amd_switch_in; pmc_mdep->pmd_switch_out = amd_switch_out; diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c index ad9d323bdb9a..76ffbdb9b0d2 100644 --- a/sys/dev/hwpmc/hwpmc_core.c +++ b/sys/dev/hwpmc/hwpmc_core.c @@ -1294,9 +1294,6 @@ pmc_core_initialize(struct pmc_mdep *md, int maxcpu, int version_override) else md->pmd_intr = core_intr; - md->pmd_pcpu_fini = NULL; - md->pmd_pcpu_init = NULL; - return (0); } diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c index e5a12b666e1b..d5de1874c59b 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -5490,8 +5490,6 @@ pmc_generic_cpu_initialize(void) md->pmd_cputype = PMC_CPU_GENERIC; - md->pmd_pcpu_init = NULL; - md->pmd_pcpu_fini = NULL; md->pmd_switch_in = generic_switch_in; md->pmd_switch_out = generic_switch_out; @@ -5634,8 +5632,6 @@ pmc_initialize(void) pmc_pcpu[cpu] = malloc(sizeof(struct pmc_cpu) + md->pmd_npmc * sizeof(struct pmc_hw *), M_PMC, M_WAITOK|M_ZERO); - if (md->pmd_pcpu_init) - error = md->pmd_pcpu_init(md, cpu); for (n = 0; error == 0 && n < md->pmd_nclass; n++) if (md->pmd_classdep[n].pcd_num > 0) error = md->pmd_classdep[n].pcd_pcpu_init(md, @@ -5879,8 +5875,6 @@ pmc_cleanup(void) if (md->pmd_classdep[c].pcd_num > 0) md->pmd_classdep[c].pcd_pcpu_fini(md, cpu); - if (md->pmd_pcpu_fini) - md->pmd_pcpu_fini(md, cpu); } if (md->pmd_cputype == PMC_CPU_GENERIC) diff --git a/sys/sys/pmc.h b/sys/sys/pmc.h index 558fe4b20d39..3a6052594fda 100644 --- a/sys/sys/pmc.h +++ b/sys/sys/pmc.h @@ -1043,10 +1043,6 @@ struct pmc_mdep { * Machine dependent methods. */ - /* per-cpu initialization and finalization */ - int (*pmd_pcpu_init)(struct pmc_mdep *_md, int _cpu); - int (*pmd_pcpu_fini)(struct pmc_mdep *_md, int _cpu); - /* thread context switch in/out */ int (*pmd_switch_in)(struct pmc_cpu *_p, struct pmc_process *_pp); int (*pmd_switch_out)(struct pmc_cpu *_p, struct pmc_process *_pp);