git: 8535ee063118 - main - hwpmc/arm64: Make the pmcr variable descriptive
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 28 May 2025 13:35:03 UTC
The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=8535ee0631182729e431846d3d80caab1293806b commit 8535ee0631182729e431846d3d80caab1293806b Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2025-05-27 19:54:44 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2025-05-27 19:54:44 +0000 hwpmc/arm64: Make the pmcr variable descriptive Rename the generic reg to pmcr to make it easier to find places we access the register. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D50426 --- sys/dev/hwpmc/hwpmc_arm64.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index 5d221c738c2f..28745b4a3028 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -521,13 +521,13 @@ pmc_arm64_initialize(void) struct pmc_mdep *pmc_mdep; struct pmc_classdep *pcd; int classes, idcode, impcode; - int reg; + int pmcr; uint64_t midr; - reg = arm64_pmcr_read(); - arm64_npmcs = (reg & PMCR_N_MASK) >> PMCR_N_SHIFT; - impcode = (reg & PMCR_IMP_MASK) >> PMCR_IMP_SHIFT; - idcode = (reg & PMCR_IDCODE_MASK) >> PMCR_IDCODE_SHIFT; + pmcr = arm64_pmcr_read(); + arm64_npmcs = (pmcr & PMCR_N_MASK) >> PMCR_N_SHIFT; + impcode = (pmcr & PMCR_IMP_MASK) >> PMCR_IMP_SHIFT; + idcode = (pmcr & PMCR_IDCODE_MASK) >> PMCR_IDCODE_SHIFT; PMCDBG1(MDP, INI, 1, "arm64-init npmcs=%d", arm64_npmcs);