RISCV_MAX_COUNTERS
for_each_set_bit(i, &ctr_mask, RISCV_MAX_COUNTERS) {
for_each_set_bit(i, &ctr_mask, RISCV_MAX_COUNTERS) {
for (i = 0; i < RISCV_MAX_COUNTERS; i++)
for_each_set_bit(idx, cpu_hw_evt->used_hw_ctrs, RISCV_MAX_COUNTERS) {
for (i = 0; i < BITS_TO_LONGS(RISCV_MAX_COUNTERS); i++) {
fidx = find_first_bit(cpu_hw_evt->used_hw_ctrs, RISCV_MAX_COUNTERS);
if (fidx == RISCV_MAX_COUNTERS) {
for_each_set_bit(lidx, cpu_hw_evt->used_hw_ctrs, RISCV_MAX_COUNTERS) {
bool enabled = !bitmap_empty(cpuc->used_hw_ctrs, RISCV_MAX_COUNTERS);
for (idx = 0; idx < RISCV_MAX_COUNTERS; idx++) {
if (num_counters > RISCV_MAX_COUNTERS) {
num_counters = RISCV_MAX_COUNTERS;
for_each_set_bit(i, &cmask, RISCV_MAX_COUNTERS) {
memset(cpu_hw_evt->snapshot_cval_shcopy, 0, sizeof(u64) * RISCV_MAX_COUNTERS);
memset(cpu_hw_evt->snapshot_cval_shcopy, 0, sizeof(u64) * RISCV_MAX_COUNTERS);
for (i = 0; i < BITS_TO_LONGS(RISCV_MAX_COUNTERS); i++) {
for_each_set_bit(idx, cpu_hw_evt->used_hw_ctrs, RISCV_MAX_COUNTERS)
for (i = 0; i < BITS_TO_LONGS(RISCV_MAX_COUNTERS); i++) {
struct perf_event *events[RISCV_MAX_COUNTERS];
DECLARE_BITMAP(used_hw_ctrs, RISCV_MAX_COUNTERS);
DECLARE_BITMAP(used_fw_ctrs, RISCV_MAX_COUNTERS);
u64 snapshot_cval_shcopy[RISCV_MAX_COUNTERS];