Lines Matching refs:cpuc

99 	struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);  in amd_pmu_lbr_filter()  local
100 int br_sel = cpuc->br_sel, offset, type, i, j; in amd_pmu_lbr_filter()
110 for (i = 0; i < cpuc->lbr_stack.nr; i++) { in amd_pmu_lbr_filter()
111 from = cpuc->lbr_entries[i].from; in amd_pmu_lbr_filter()
112 to = cpuc->lbr_entries[i].to; in amd_pmu_lbr_filter()
121 cpuc->lbr_entries[i].from += offset; in amd_pmu_lbr_filter()
128 cpuc->lbr_entries[i].from = 0; /* mark invalid */ in amd_pmu_lbr_filter()
133 cpuc->lbr_entries[i].type = common_branch_type(type); in amd_pmu_lbr_filter()
140 for (i = 0; i < cpuc->lbr_stack.nr; ) { in amd_pmu_lbr_filter()
141 if (!cpuc->lbr_entries[i].from) { in amd_pmu_lbr_filter()
143 while (++j < cpuc->lbr_stack.nr) in amd_pmu_lbr_filter()
144 cpuc->lbr_entries[j - 1] = cpuc->lbr_entries[j]; in amd_pmu_lbr_filter()
145 cpuc->lbr_stack.nr--; in amd_pmu_lbr_filter()
146 if (!cpuc->lbr_entries[i].from) in amd_pmu_lbr_filter()
162 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_pmu_lbr_read() local
163 struct perf_branch_entry *br = cpuc->lbr_entries; in amd_pmu_lbr_read()
167 if (!cpuc->lbr_users) in amd_pmu_lbr_read()
211 cpuc->lbr_stack.nr = out; in amd_pmu_lbr_read()
217 cpuc->lbr_stack.hw_idx = 0; in amd_pmu_lbr_read()
322 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_pmu_lbr_reset() local
334 cpuc->last_task_ctx = NULL; in amd_pmu_lbr_reset()
335 cpuc->last_log_id = 0; in amd_pmu_lbr_reset()
341 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_pmu_lbr_add() local
348 cpuc->lbr_select = 1; in amd_pmu_lbr_add()
349 cpuc->lbr_sel->config = reg->config; in amd_pmu_lbr_add()
350 cpuc->br_sel = reg->reg; in amd_pmu_lbr_add()
355 if (!cpuc->lbr_users++ && !event->total_time_running) in amd_pmu_lbr_add()
361 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_pmu_lbr_del() local
367 cpuc->lbr_select = 0; in amd_pmu_lbr_del()
369 cpuc->lbr_users--; in amd_pmu_lbr_del()
370 WARN_ON_ONCE(cpuc->lbr_users < 0); in amd_pmu_lbr_del()
376 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_pmu_lbr_sched_task() local
383 if (cpuc->lbr_users && sched_in) in amd_pmu_lbr_sched_task()
389 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_pmu_lbr_enable_all() local
392 if (!cpuc->lbr_users || !x86_pmu.lbr_nr) in amd_pmu_lbr_enable_all()
396 if (cpuc->lbr_select) { in amd_pmu_lbr_enable_all()
397 lbr_select = cpuc->lbr_sel->config & LBR_SELECT_MASK; in amd_pmu_lbr_enable_all()
412 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_pmu_lbr_disable_all() local
414 if (!cpuc->lbr_users || !x86_pmu.lbr_nr) in amd_pmu_lbr_disable_all()