git: 5acb4c862b5b - main - hwpmc: Remove always zero pc_resync field.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 01 Jun 2022 15:08:00 UTC
The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=5acb4c862b5b22c0556545a0e3a8dc2300238aca commit 5acb4c862b5b22c0556545a0e3a8dc2300238aca Author: Alexander Motin <mav@FreeBSD.org> AuthorDate: 2022-06-01 15:05:50 +0000 Commit: Alexander Motin <mav@FreeBSD.org> CommitDate: 2022-06-01 15:07:39 +0000 hwpmc: Remove always zero pc_resync field. MFC after: 1 month --- sys/dev/hwpmc/hwpmc_uncore.c | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_uncore.c b/sys/dev/hwpmc/hwpmc_uncore.c index 7ccb93cb8a58..93e41e8d91f1 100644 --- a/sys/dev/hwpmc/hwpmc_uncore.c +++ b/sys/dev/hwpmc/hwpmc_uncore.c @@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$"); static enum pmc_cputype uncore_cputype; struct uncore_cpu { - volatile uint32_t pc_resync; volatile uint32_t pc_ucfctrl; /* Fixed function control. */ volatile uint64_t pc_globalctrl; /* Global control register. */ struct pmc_hw pc_uncorepmcs[]; @@ -335,11 +334,8 @@ ucf_start_pmc(int cpu, int ri) wrmsr(UCF_CTRL, ucfc->pc_ucfctrl); - do { - ucfc->pc_resync = 0; - ucfc->pc_globalctrl |= (1ULL << (ri + SELECTOFF(uncore_cputype))); - wrmsr(UC_GLOBAL_CTRL, ucfc->pc_globalctrl); - } while (ucfc->pc_resync != 0); + ucfc->pc_globalctrl |= (1ULL << (ri + SELECTOFF(uncore_cputype))); + wrmsr(UC_GLOBAL_CTRL, ucfc->pc_globalctrl); PMCDBG4(MDP,STA,1,"ucfctrl=%x(%x) globalctrl=%jx(%jx)", ucfc->pc_ucfctrl, (uint32_t) rdmsr(UCF_CTRL), @@ -370,11 +366,8 @@ ucf_stop_pmc(int cpu, int ri) PMCDBG1(MDP,STO,1,"ucf-stop ucfctrl=%x", ucfc->pc_ucfctrl); wrmsr(UCF_CTRL, ucfc->pc_ucfctrl); - do { - ucfc->pc_resync = 0; - ucfc->pc_globalctrl &= ~(1ULL << (ri + SELECTOFF(uncore_cputype))); - wrmsr(UC_GLOBAL_CTRL, ucfc->pc_globalctrl); - } while (ucfc->pc_resync != 0); + ucfc->pc_globalctrl &= ~(1ULL << (ri + SELECTOFF(uncore_cputype))); + wrmsr(UC_GLOBAL_CTRL, ucfc->pc_globalctrl); PMCDBG4(MDP,STO,1,"ucfctrl=%x(%x) globalctrl=%jx(%jx)", ucfc->pc_ucfctrl, (uint32_t) rdmsr(UCF_CTRL), @@ -702,11 +695,8 @@ ucp_start_pmc(int cpu, int ri) } wrmsr(SELECTSEL(uncore_cputype) + ri, evsel); - do { - cc->pc_resync = 0; - cc->pc_globalctrl |= (1ULL << ri); - wrmsr(UC_GLOBAL_CTRL, cc->pc_globalctrl); - } while (cc->pc_resync != 0); + cc->pc_globalctrl |= (1ULL << ri); + wrmsr(UC_GLOBAL_CTRL, cc->pc_globalctrl); return (0); } @@ -734,11 +724,8 @@ ucp_stop_pmc(int cpu, int ri) /* stop hw. */ wrmsr(SELECTSEL(uncore_cputype) + ri, 0); - do { - cc->pc_resync = 0; - cc->pc_globalctrl &= ~(1ULL << ri); - wrmsr(UC_GLOBAL_CTRL, cc->pc_globalctrl); - } while (cc->pc_resync != 0); + cc->pc_globalctrl &= ~(1ULL << ri); + wrmsr(UC_GLOBAL_CTRL, cc->pc_globalctrl); return (0); }