Lines Matching defs:idx

282 /* Read the group 0 counter identified by the given `idx`. */
283 static uint64_t amu_group0_cnt_read(unsigned int idx)
286 assert(idx < read_amcgcr_el0_cg0nc());
288 return amu_group0_cnt_read_internal(idx);
291 /* Write the group 0 counter identified by the given `idx` with `val` */
292 static void amu_group0_cnt_write(unsigned int idx, uint64_t val)
295 assert(idx < read_amcgcr_el0_cg0nc());
297 amu_group0_cnt_write_internal(idx, val);
307 static bool amu_group0_voffset_supported(uint64_t idx)
309 switch (idx) {
320 "architected counter %" PRIu64 "!\n", idx);
332 static uint64_t amu_group0_voffset_read(unsigned int idx)
335 assert(idx < read_amcgcr_el0_cg0nc());
336 assert(idx != 1U);
338 return amu_group0_voffset_read_internal(idx);
347 static void amu_group0_voffset_write(unsigned int idx, uint64_t val)
350 assert(idx < read_amcgcr_el0_cg0nc());
351 assert(idx != 1U);
353 amu_group0_voffset_write_internal(idx, val);
358 /* Read the group 1 counter identified by the given `idx` */
359 static uint64_t amu_group1_cnt_read(unsigned int idx)
363 assert(idx < read_amcgcr_el0_cg1nc());
365 return amu_group1_cnt_read_internal(idx);
368 /* Write the group 1 counter identified by the given `idx` with `val` */
369 static void amu_group1_cnt_write(unsigned int idx, uint64_t val)
373 assert(idx < read_amcgcr_el0_cg1nc());
375 amu_group1_cnt_write_internal(idx, val);
384 static uint64_t amu_group1_voffset_read(unsigned int idx)
388 assert(idx < read_amcgcr_el0_cg1nc());
389 assert((read_amcg1idr_el0_voff() & (UINT64_C(1) << idx)) != 0U);
391 return amu_group1_voffset_read_internal(idx);
399 static void amu_group1_voffset_write(unsigned int idx, uint64_t val)
403 assert(idx < read_amcgcr_el0_cg1nc());
404 assert((read_amcg1idr_el0_voff() & (UINT64_C(1) << idx)) != 0U);
406 amu_group1_voffset_write_internal(idx, val);