Lines Matching refs:cpu
52 static struct bp_cpuinfo *get_bp_info(int cpu, enum bp_type_idx type) in get_bp_info() argument
54 return per_cpu_ptr(bp_cpuinfo + type, cpu); in get_bp_info()
88 static unsigned int max_task_bp_pinned(int cpu, enum bp_type_idx type) in max_task_bp_pinned() argument
90 unsigned int *tsk_pinned = get_bp_info(cpu, type)->tsk_pinned; in max_task_bp_pinned()
105 static int task_bp_pinned(int cpu, struct perf_event *bp, enum bp_type_idx type) in task_bp_pinned() argument
114 (iter->cpu < 0 || cpu == iter->cpu)) in task_bp_pinned()
123 if (bp->cpu >= 0) in cpumask_of_bp()
124 return cpumask_of(bp->cpu); in cpumask_of_bp()
137 int cpu; in fetch_bp_busy_slots() local
139 for_each_cpu(cpu, cpumask) { in fetch_bp_busy_slots()
140 struct bp_cpuinfo *info = get_bp_info(cpu, type); in fetch_bp_busy_slots()
145 nr += max_task_bp_pinned(cpu, type); in fetch_bp_busy_slots()
147 nr += task_bp_pinned(cpu, bp, type); in fetch_bp_busy_slots()
172 static void toggle_bp_task_slot(struct perf_event *bp, int cpu, in toggle_bp_task_slot() argument
175 unsigned int *tsk_pinned = get_bp_info(cpu, type)->tsk_pinned; in toggle_bp_task_slot()
178 old_idx = task_bp_pinned(cpu, bp, type) - 1; in toggle_bp_task_slot()
195 int cpu; in toggle_bp_slot() local
202 get_bp_info(bp->cpu, type)->cpu_pinned += weight; in toggle_bp_slot()
207 for_each_cpu(cpu, cpumask) in toggle_bp_slot()
208 toggle_bp_task_slot(bp, cpu, type, weight); in toggle_bp_slot()
563 int cpu; in register_wide_hw_breakpoint() local
570 for_each_online_cpu(cpu) { in register_wide_hw_breakpoint()
571 bp = perf_event_create_kernel_counter(attr, cpu, NULL, in register_wide_hw_breakpoint()
578 per_cpu(*cpu_events, cpu) = bp; in register_wide_hw_breakpoint()
596 int cpu; in unregister_wide_hw_breakpoint() local
598 for_each_possible_cpu(cpu) in unregister_wide_hw_breakpoint()
599 unregister_hw_breakpoint(per_cpu(*cpu_events, cpu)); in unregister_wide_hw_breakpoint()
679 int cpu, err_cpu; in init_hw_breakpoint() local
685 for_each_possible_cpu(cpu) { in init_hw_breakpoint()
687 struct bp_cpuinfo *info = get_bp_info(cpu, i); in init_hw_breakpoint()
706 if (err_cpu == cpu) in init_hw_breakpoint()