Lines Matching refs:cpuc

314 static int mipsxx_pmu_alloc_counter(struct cpu_hw_events *cpuc,  in mipsxx_pmu_alloc_counter()  argument
341 !test_and_set_bit(i, cpuc->used_mask)) in mipsxx_pmu_alloc_counter()
351 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in mipsxx_pmu_enable_event() local
357 cpuc->saved_ctrl[idx] = M_PERFCTL_EVENT(evt->event_base & 0x3ff) | in mipsxx_pmu_enable_event()
362 cpuc->saved_ctrl[idx] = M_PERFCTL_EVENT(evt->event_base & 0xff) | in mipsxx_pmu_enable_event()
369 cpuc->saved_ctrl[idx] |= in mipsxx_pmu_enable_event()
374 cpuc->saved_ctrl[idx] |= M_TC_EN_ALL; in mipsxx_pmu_enable_event()
387 cpuc->saved_ctrl[idx] |= ctrl; in mipsxx_pmu_enable_event()
397 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in mipsxx_pmu_disable_event() local
403 cpuc->saved_ctrl[idx] = mipsxx_pmu_read_control(idx) & in mipsxx_pmu_disable_event()
405 mipsxx_pmu_write_control(idx, cpuc->saved_ctrl[idx]); in mipsxx_pmu_disable_event()
501 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in mipspmu_add() local
509 idx = mipsxx_pmu_alloc_counter(cpuc, hwc); in mipspmu_add()
521 cpuc->events[idx] = event; in mipspmu_add()
537 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in mipspmu_del() local
544 cpuc->events[idx] = NULL; in mipspmu_del()
545 clear_bit(idx, cpuc->used_mask); in mipspmu_del()
782 static void handle_associated_event(struct cpu_hw_events *cpuc, in handle_associated_event() argument
786 struct perf_event *event = cpuc->events[idx]; in handle_associated_event()
1548 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in pause_local_counters() local
1555 cpuc->saved_ctrl[ctr] = mipsxx_pmu_read_control(ctr); in pause_local_counters()
1556 mipsxx_pmu_write_control(ctr, cpuc->saved_ctrl[ctr] & in pause_local_counters()
1564 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in resume_local_counters() local
1569 mipsxx_pmu_write_control(ctr, cpuc->saved_ctrl[ctr]); in resume_local_counters()
1575 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in mipsxx_pmu_handle_shared_irq() local
1601 if (!test_bit(n, cpuc->used_mask)) in mipsxx_pmu_handle_shared_irq()
1608 handle_associated_event(cpuc, n, &data, regs); in mipsxx_pmu_handle_shared_irq()