Lines Matching refs:cpu
64 static struct bp_cpuinfo *get_bp_info(int cpu, enum bp_type_idx type) in get_bp_info() argument
66 return per_cpu_ptr(bp_cpuinfo + type, cpu); in get_bp_info()
100 static unsigned int max_task_bp_pinned(int cpu, enum bp_type_idx type) in max_task_bp_pinned() argument
102 unsigned int *tsk_pinned = get_bp_info(cpu, type)->tsk_pinned; in max_task_bp_pinned()
117 static int task_bp_pinned(int cpu, struct perf_event *bp, enum bp_type_idx type) in task_bp_pinned() argument
126 (iter->cpu < 0 || cpu == iter->cpu)) in task_bp_pinned()
135 if (bp->cpu >= 0) in cpumask_of_bp()
136 return cpumask_of(bp->cpu); in cpumask_of_bp()
149 int cpu; in fetch_bp_busy_slots() local
151 for_each_cpu(cpu, cpumask) { in fetch_bp_busy_slots()
152 struct bp_cpuinfo *info = get_bp_info(cpu, type); in fetch_bp_busy_slots()
157 nr += max_task_bp_pinned(cpu, type); in fetch_bp_busy_slots()
159 nr += task_bp_pinned(cpu, bp, type); in fetch_bp_busy_slots()
184 static void toggle_bp_task_slot(struct perf_event *bp, int cpu, in toggle_bp_task_slot() argument
187 unsigned int *tsk_pinned = get_bp_info(cpu, type)->tsk_pinned; in toggle_bp_task_slot()
190 old_idx = task_bp_pinned(cpu, bp, type) - 1; in toggle_bp_task_slot()
207 int cpu; in toggle_bp_slot() local
214 get_bp_info(bp->cpu, type)->cpu_pinned += weight; in toggle_bp_slot()
219 for_each_cpu(cpu, cpumask) in toggle_bp_slot()
220 toggle_bp_task_slot(bp, cpu, type, weight); in toggle_bp_slot()
505 int cpu; in register_wide_hw_breakpoint() local
512 for_each_online_cpu(cpu) { in register_wide_hw_breakpoint()
513 bp = perf_event_create_kernel_counter(attr, cpu, NULL, in register_wide_hw_breakpoint()
520 per_cpu(*cpu_events, cpu) = bp; in register_wide_hw_breakpoint()
538 int cpu; in unregister_wide_hw_breakpoint() local
540 for_each_possible_cpu(cpu) in unregister_wide_hw_breakpoint()
541 unregister_hw_breakpoint(per_cpu(*cpu_events, cpu)); in unregister_wide_hw_breakpoint()
621 int cpu, err_cpu; in init_hw_breakpoint() local
627 for_each_possible_cpu(cpu) { in init_hw_breakpoint()
629 struct bp_cpuinfo *info = get_bp_info(cpu, i); in init_hw_breakpoint()
648 if (err_cpu == cpu) in init_hw_breakpoint()