Lines Matching refs:cpuc

285 static int mipsxx_pmu_alloc_counter(struct cpu_hw_events *cpuc,  in mipsxx_pmu_alloc_counter()  argument
308 !test_and_set_bit(i, cpuc->used_mask)) in mipsxx_pmu_alloc_counter()
318 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in mipsxx_pmu_enable_event() local
323 cpuc->saved_ctrl[idx] = M_PERFCTL_EVENT(evt->event_base & 0xff) | in mipsxx_pmu_enable_event()
330 cpuc->saved_ctrl[idx] |= in mipsxx_pmu_enable_event()
335 cpuc->saved_ctrl[idx] |= M_TC_EN_ALL; in mipsxx_pmu_enable_event()
348 cpuc->saved_ctrl[idx] |= ctrl; in mipsxx_pmu_enable_event()
358 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in mipsxx_pmu_disable_event() local
364 cpuc->saved_ctrl[idx] = mipsxx_pmu_read_control(idx) & in mipsxx_pmu_disable_event()
366 mipsxx_pmu_write_control(idx, cpuc->saved_ctrl[idx]); in mipsxx_pmu_disable_event()
458 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in mipspmu_add() local
466 idx = mipsxx_pmu_alloc_counter(cpuc, hwc); in mipspmu_add()
478 cpuc->events[idx] = event; in mipspmu_add()
494 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in mipspmu_del() local
501 cpuc->events[idx] = NULL; in mipspmu_del()
502 clear_bit(idx, cpuc->used_mask); in mipspmu_del()
733 static void handle_associated_event(struct cpu_hw_events *cpuc, in handle_associated_event() argument
737 struct perf_event *event = cpuc->events[idx]; in handle_associated_event()
1356 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in pause_local_counters() local
1363 cpuc->saved_ctrl[ctr] = mipsxx_pmu_read_control(ctr); in pause_local_counters()
1364 mipsxx_pmu_write_control(ctr, cpuc->saved_ctrl[ctr] & in pause_local_counters()
1372 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in resume_local_counters() local
1377 mipsxx_pmu_write_control(ctr, cpuc->saved_ctrl[ctr]); in resume_local_counters()
1383 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in mipsxx_pmu_handle_shared_irq() local
1409 if (!test_bit(n, cpuc->used_mask)) in mipsxx_pmu_handle_shared_irq()
1416 handle_associated_event(cpuc, n, &data, regs); in mipsxx_pmu_handle_shared_irq()