On Thu, Feb 01, 2024 at 09:56:51PM -0500, Shaoqin Huang wrote: > -static uint64_t get_pmcr_n(uint64_t pmcr) > -{ > - return FIELD_GET(ARMV8_PMU_PMCR_N, pmcr); > -} > - > -static void set_pmcr_n(uint64_t *pmcr, uint64_t pmcr_n) > -{ > - u64p_replace_bits((__u64 *) pmcr, pmcr_n, ARMV8_PMU_PMCR_N); > -} > - > -static uint64_t get_counters_mask(uint64_t n) > -{ > - uint64_t mask = BIT(ARMV8_PMU_CYCLE_IDX); > - > - if (n) > - mask |= GENMASK(n - 1, 0); > - return mask; > -} I don't see these helpers being used by your test, and they seem rather specific to what the original test was trying to accomplish. Let's not move this unnecessarily. -- Thanks, Oliver