Lines Matching refs:cpuc
311 static int mipsxx_pmu_alloc_counter(struct cpu_hw_events *cpuc, in mipsxx_pmu_alloc_counter() argument
334 !test_and_set_bit(i, cpuc->used_mask)) in mipsxx_pmu_alloc_counter()
343 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in mipsxx_pmu_enable_event() local
347 cpuc->saved_ctrl[idx] = M_PERFCTL_EVENT(evt->event_base & 0xff) | in mipsxx_pmu_enable_event()
353 cpuc->saved_ctrl[idx] |= in mipsxx_pmu_enable_event()
363 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in mipsxx_pmu_disable_event() local
369 cpuc->saved_ctrl[idx] = mipsxx_pmu_read_control(idx) & in mipsxx_pmu_disable_event()
371 mipsxx_pmu_write_control(idx, cpuc->saved_ctrl[idx]); in mipsxx_pmu_disable_event()
463 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in mipspmu_add() local
471 idx = mipsxx_pmu_alloc_counter(cpuc, hwc); in mipspmu_add()
483 cpuc->events[idx] = event; in mipspmu_add()
499 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in mipspmu_del() local
506 cpuc->events[idx] = NULL; in mipspmu_del()
507 clear_bit(idx, cpuc->used_mask); in mipspmu_del()
738 static void handle_associated_event(struct cpu_hw_events *cpuc, in handle_associated_event() argument
742 struct perf_event *event = cpuc->events[idx]; in handle_associated_event()
1342 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in pause_local_counters() local
1349 cpuc->saved_ctrl[ctr] = mipsxx_pmu_read_control(ctr); in pause_local_counters()
1350 mipsxx_pmu_write_control(ctr, cpuc->saved_ctrl[ctr] & in pause_local_counters()
1358 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in resume_local_counters() local
1363 mipsxx_pmu_write_control(ctr, cpuc->saved_ctrl[ctr]); in resume_local_counters()
1369 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in mipsxx_pmu_handle_shared_irq() local
1397 if (test_bit(n, cpuc->used_mask)) { \ in mipsxx_pmu_handle_shared_irq()
1400 handle_associated_event(cpuc, n, &data, regs); \ in mipsxx_pmu_handle_shared_irq()