/Linux-v4.19/tools/perf/util/ |
D | cpumap.c | 22 struct cpu_map *cpus; in cpu_map__default_new() local 29 cpus = malloc(sizeof(*cpus) + nr_cpus * sizeof(int)); in cpu_map__default_new() 30 if (cpus != NULL) { in cpu_map__default_new() 33 cpus->map[i] = i; in cpu_map__default_new() 35 cpus->nr = nr_cpus; in cpu_map__default_new() 36 refcount_set(&cpus->refcnt, 1); in cpu_map__default_new() 39 return cpus; in cpu_map__default_new() 45 struct cpu_map *cpus = malloc(sizeof(*cpus) + payload_size); in cpu_map__trim_new() local 47 if (cpus != NULL) { in cpu_map__trim_new() 48 cpus->nr = nr_cpus; in cpu_map__trim_new() [all …]
|
D | record.c | 63 struct cpu_map *cpus; in perf_probe_api() local 66 cpus = cpu_map__new(NULL); in perf_probe_api() 67 if (!cpus) in perf_probe_api() 69 cpu = cpus->map[0]; in perf_probe_api() 70 cpu_map__put(cpus); in perf_probe_api() 118 struct cpu_map *cpus; in perf_can_record_cpu_wide() local 121 cpus = cpu_map__new(NULL); in perf_can_record_cpu_wide() 122 if (!cpus) in perf_can_record_cpu_wide() 124 cpu = cpus->map[0]; in perf_can_record_cpu_wide() 125 cpu_map__put(cpus); in perf_can_record_cpu_wide() [all …]
|
D | cpumap.h | 30 int cpu_map__build_socket_map(struct cpu_map *cpus, struct cpu_map **sockp); 31 int cpu_map__build_core_map(struct cpu_map *cpus, struct cpu_map **corep); 70 int cpu_map__build_map(struct cpu_map *cpus, struct cpu_map **res, 74 int cpu_map__cpu(struct cpu_map *cpus, int idx); 75 bool cpu_map__has(struct cpu_map *cpus, int cpu); 76 int cpu_map__idx(struct cpu_map *cpus, int cpu);
|
D | evlist.c | 40 void perf_evlist__init(struct perf_evlist *evlist, struct cpu_map *cpus, in perf_evlist__init() argument 48 perf_evlist__set_maps(evlist, cpus, threads); in perf_evlist__init() 140 cpu_map__put(evlist->cpus); in perf_evlist__delete() 142 evlist->cpus = NULL; in perf_evlist__delete() 157 cpu_map__put(evsel->cpus); in __perf_evlist__propagate_maps() 158 evsel->cpus = cpu_map__get(evlist->cpus); in __perf_evlist__propagate_maps() 159 } else if (evsel->cpus != evsel->own_cpus) { in __perf_evlist__propagate_maps() 160 cpu_map__put(evsel->cpus); in __perf_evlist__propagate_maps() 161 evsel->cpus = cpu_map__get(evsel->own_cpus); in __perf_evlist__propagate_maps() 409 int nr_cpus = cpu_map__nr(evlist->cpus); in perf_evlist__enable_event_thread() [all …]
|
/Linux-v4.19/tools/perf/tests/ |
D | openat-syscall-all-cpus.c | 23 struct cpu_map *cpus; in test__openat_syscall_event_on_all_cpus() local 36 cpus = cpu_map__new(NULL); in test__openat_syscall_event_on_all_cpus() 37 if (cpus == NULL) { in test__openat_syscall_event_on_all_cpus() 51 if (perf_evsel__open(evsel, cpus, threads) < 0) { in test__openat_syscall_event_on_all_cpus() 58 for (cpu = 0; cpu < cpus->nr; ++cpu) { in test__openat_syscall_event_on_all_cpus() 66 if (cpus->map[cpu] >= CPU_SETSIZE) { in test__openat_syscall_event_on_all_cpus() 67 pr_debug("Ignoring CPU %d\n", cpus->map[cpu]); in test__openat_syscall_event_on_all_cpus() 71 CPU_SET(cpus->map[cpu], &cpu_set); in test__openat_syscall_event_on_all_cpus() 74 cpus->map[cpu], in test__openat_syscall_event_on_all_cpus() 82 CPU_CLR(cpus->map[cpu], &cpu_set); in test__openat_syscall_event_on_all_cpus() [all …]
|
D | cpumap.c | 52 struct cpu_map_entries *cpus; in process_event_cpus() local 60 cpus = (struct cpu_map_entries *)data->data; in process_event_cpus() 62 TEST_ASSERT_VAL("wrong nr", cpus->nr == 2); in process_event_cpus() 63 TEST_ASSERT_VAL("wrong cpu", cpus->cpu[0] == 1); in process_event_cpus() 64 TEST_ASSERT_VAL("wrong cpu", cpus->cpu[1] == 256); in process_event_cpus() 78 struct cpu_map *cpus; in test__cpu_map_synthesize() local 81 cpus = cpu_map__new("0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19"); in test__cpu_map_synthesize() 84 !perf_event__synthesize_cpu_map(NULL, cpus, process_event_mask, NULL)); in test__cpu_map_synthesize() 86 cpu_map__put(cpus); in test__cpu_map_synthesize() 89 cpus = cpu_map__new("1,256"); in test__cpu_map_synthesize() [all …]
|
D | event-times.c | 113 struct cpu_map *cpus; in attach__cpu_disabled() local 118 cpus = cpu_map__new("0"); in attach__cpu_disabled() 119 if (cpus == NULL) { in attach__cpu_disabled() 126 err = perf_evsel__open_per_cpu(evsel, cpus); in attach__cpu_disabled() 135 cpu_map__put(cpus); in attach__cpu_disabled() 142 struct cpu_map *cpus; in attach__cpu_enabled() local 147 cpus = cpu_map__new("0"); in attach__cpu_enabled() 148 if (cpus == NULL) { in attach__cpu_enabled() 153 err = perf_evsel__open_per_cpu(evsel, cpus); in attach__cpu_enabled() 157 cpu_map__put(cpus); in attach__cpu_enabled()
|
D | mmap-basic.c | 31 struct cpu_map *cpus; in test__basic_mmap() local 49 cpus = cpu_map__new(NULL); in test__basic_mmap() 50 if (cpus == NULL) { in test__basic_mmap() 56 CPU_SET(cpus->map[0], &cpu_set); in test__basic_mmap() 60 cpus->map[0], str_error_r(errno, sbuf, sizeof(sbuf))); in test__basic_mmap() 70 perf_evlist__set_maps(evlist, cpus, threads); in test__basic_mmap() 87 if (perf_evsel__open(evsels[i], cpus, threads) < 0) { in test__basic_mmap() 155 cpus = NULL; in test__basic_mmap() 158 cpu_map__put(cpus); in test__basic_mmap()
|
D | task-exit.c | 48 struct cpu_map *cpus; in test__task_exit() local 66 cpus = cpu_map__dummy_new(); in test__task_exit() 68 if (!cpus || !threads) { in test__task_exit() 74 perf_evlist__set_maps(evlist, cpus, threads); in test__task_exit() 76 cpus = NULL; in test__task_exit() 138 cpu_map__put(cpus); in test__task_exit()
|
D | sw-clock.c | 40 struct cpu_map *cpus; in __test__sw_clock_freq() local 59 cpus = cpu_map__dummy_new(); in __test__sw_clock_freq() 61 if (!cpus || !threads) { in __test__sw_clock_freq() 67 perf_evlist__set_maps(evlist, cpus, threads); in __test__sw_clock_freq() 69 cpus = NULL; in __test__sw_clock_freq() 128 cpu_map__put(cpus); in __test__sw_clock_freq()
|
/Linux-v4.19/drivers/clk/sunxi/ |
D | clk-sun9i-cpus.c | 54 struct sun9i_a80_cpus_clk *cpus = to_sun9i_a80_cpus_clk(hw); in sun9i_a80_cpus_clk_recalc_rate() local 59 reg = readl(cpus->reg); in sun9i_a80_cpus_clk_recalc_rate() 154 struct sun9i_a80_cpus_clk *cpus = to_sun9i_a80_cpus_clk(hw); in sun9i_a80_cpus_clk_set_rate() local 161 reg = readl(cpus->reg); in sun9i_a80_cpus_clk_set_rate() 169 writel(reg, cpus->reg); in sun9i_a80_cpus_clk_set_rate() 187 struct sun9i_a80_cpus_clk *cpus; in sun9i_a80_cpus_setup() local 192 cpus = kzalloc(sizeof(*cpus), GFP_KERNEL); in sun9i_a80_cpus_setup() 193 if (!cpus) in sun9i_a80_cpus_setup() 196 cpus->reg = of_io_request_and_map(node, 0, of_node_full_name(node)); in sun9i_a80_cpus_setup() 197 if (IS_ERR(cpus->reg)) in sun9i_a80_cpus_setup() [all …]
|
/Linux-v4.19/tools/perf/arch/arm64/util/ |
D | header.c | 19 struct cpu_map *cpus; in get_cpuid_str() local 22 if (!sysfs || !pmu || !pmu->cpus) in get_cpuid_str() 30 cpus = cpu_map__get(pmu->cpus); in get_cpuid_str() 31 for (cpu = 0; cpu < cpus->nr; cpu++) { in get_cpuid_str() 33 sysfs, cpus->map[cpu]); in get_cpuid_str() 63 cpu_map__put(cpus); in get_cpuid_str()
|
/Linux-v4.19/arch/x86/hyperv/ |
D | mmu.c | 20 static u64 hyperv_flush_tlb_others_ex(const struct cpumask *cpus, 53 static void hyperv_flush_tlb_others(const struct cpumask *cpus, in hyperv_flush_tlb_others() argument 62 trace_hyperv_mmu_flush_tlb_others(cpus, info); in hyperv_flush_tlb_others() 67 if (cpumask_empty(cpus)) in hyperv_flush_tlb_others() 96 if (cpumask_equal(cpus, cpu_present_mask)) { in hyperv_flush_tlb_others() 110 if (hv_cpu_number_to_vp_number(cpumask_last(cpus)) >= 64) in hyperv_flush_tlb_others() 113 for_each_cpu(cpu, cpus) { in hyperv_flush_tlb_others() 151 status = hyperv_flush_tlb_others_ex(cpus, info); in hyperv_flush_tlb_others() 159 native_flush_tlb_others(cpus, info); in hyperv_flush_tlb_others() 162 static u64 hyperv_flush_tlb_others_ex(const struct cpumask *cpus, in hyperv_flush_tlb_others_ex() argument [all …]
|
/Linux-v4.19/arch/arm/mach-shmobile/ |
D | timer.c | 25 struct device_node *np, *cpus; in shmobile_init_delay() local 28 cpus = of_find_node_by_path("/cpus"); in shmobile_init_delay() 29 if (!cpus) in shmobile_init_delay() 32 for_each_child_of_node(cpus, np) { in shmobile_init_delay() 39 of_node_put(cpus); in shmobile_init_delay()
|
/Linux-v4.19/include/linux/ |
D | stop_machine.h | 124 int stop_machine(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus); 135 int stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus); 138 const struct cpumask *cpus); 142 const struct cpumask *cpus) in stop_machine_cpuslocked() argument 153 const struct cpumask *cpus) in stop_machine() argument 155 return stop_machine_cpuslocked(fn, data, cpus); in stop_machine() 159 const struct cpumask *cpus) in stop_machine_from_inactive_cpu() argument 161 return stop_machine(fn, data, cpus); in stop_machine_from_inactive_cpu()
|
/Linux-v4.19/arch/x86/include/asm/trace/ |
D | hyperv.h | 12 TP_PROTO(const struct cpumask *cpus, 14 TP_ARGS(cpus, info), 21 TP_fast_assign(__entry->ncpus = cpumask_weight(cpus); 46 TP_PROTO(const struct cpumask *cpus, 48 TP_ARGS(cpus, vector), 53 TP_fast_assign(__entry->ncpus = cpumask_weight(cpus);
|
/Linux-v4.19/tools/power/cpupower/utils/ |
D | cpufreq-info.c | 370 struct cpufreq_affected_cpus *cpus = cpufreq_get_affected_cpus(cpu); in get_affected_cpus() local 373 if (!cpus) { in get_affected_cpus() 378 while (cpus->next) { in get_affected_cpus() 379 printf("%d ", cpus->cpu); in get_affected_cpus() 380 cpus = cpus->next; in get_affected_cpus() 382 printf("%d\n", cpus->cpu); in get_affected_cpus() 383 cpufreq_put_affected_cpus(cpus); in get_affected_cpus() 391 struct cpufreq_affected_cpus *cpus = cpufreq_get_related_cpus(cpu); in get_related_cpus() local 394 if (!cpus) { in get_related_cpus() 399 while (cpus->next) { in get_related_cpus() [all …]
|
D | cpufreq-set.c | 296 struct cpufreq_affected_cpus *cpus; in cmd_freq_set() local 302 cpus = cpufreq_get_related_cpus(cpu); in cmd_freq_set() 303 if (!cpus) in cmd_freq_set() 305 while (cpus->next) { in cmd_freq_set() 306 bitmask_setbit(cpus_chosen, cpus->cpu); in cmd_freq_set() 307 cpus = cpus->next; in cmd_freq_set() 309 cpufreq_put_related_cpus(cpus); in cmd_freq_set()
|
/Linux-v4.19/tools/perf/python/ |
D | twatch.py | 19 cpus = perf.cpu_map() 35 evsel.open(cpus = cpus, threads = threads); 36 evlist = perf.evlist(cpus, threads) 41 for cpu in cpus:
|
/Linux-v4.19/drivers/irqchip/ |
D | irq-bcm6345-l1.c | 84 struct bcm6345_l1_cpu *cpus[NR_CPUS]; member 127 cpu = intc->cpus[cpu_logical_map(smp_processor_id())]; in bcm6345_l1_irq_handle() 129 cpu = intc->cpus[0]; in bcm6345_l1_irq_handle() 162 intc->cpus[cpu_idx]->enable_cache[word] |= mask; in __bcm6345_l1_unmask() 163 __raw_writel(intc->cpus[cpu_idx]->enable_cache[word], in __bcm6345_l1_unmask() 164 intc->cpus[cpu_idx]->map_base + reg_enable(intc, word)); in __bcm6345_l1_unmask() 174 intc->cpus[cpu_idx]->enable_cache[word] &= ~mask; in __bcm6345_l1_mask() 175 __raw_writel(intc->cpus[cpu_idx]->enable_cache[word], in __bcm6345_l1_mask() 176 intc->cpus[cpu_idx]->map_base + reg_enable(intc, word)); in __bcm6345_l1_mask() 223 enabled = intc->cpus[old_cpu]->enable_cache[word] & mask; in bcm6345_l1_set_affinity() [all …]
|
D | irq-bcm7038-l1.c | 44 struct bcm7038_l1_cpu *cpus[NR_CPUS]; member 125 cpu = intc->cpus[cpu_logical_map(smp_processor_id())]; in bcm7038_l1_irq_handle() 127 cpu = intc->cpus[0]; in bcm7038_l1_irq_handle() 157 intc->cpus[cpu_idx]->mask_cache[word] &= ~mask; in __bcm7038_l1_unmask() 158 l1_writel(mask, intc->cpus[cpu_idx]->map_base + in __bcm7038_l1_unmask() 168 intc->cpus[cpu_idx]->mask_cache[word] |= mask; in __bcm7038_l1_mask() 169 l1_writel(mask, intc->cpus[cpu_idx]->map_base + in __bcm7038_l1_mask() 207 was_disabled = !!(intc->cpus[intc->affinity[hw]]->mask_cache[word] & in bcm7038_l1_set_affinity() 268 cpu = intc->cpus[idx] = kzalloc(sizeof(*cpu) + n_words * sizeof(u32), in bcm7038_l1_init_one() 350 struct bcm7038_l1_cpu *cpu = intc->cpus[idx]; in bcm7038_l1_of_init()
|
/Linux-v4.19/arch/mips/cavium-octeon/ |
D | smp.c | 141 int cpus; in octeon_smp_setup() local 160 cpus = 1; in octeon_smp_setup() 163 set_cpu_possible(cpus, true); in octeon_smp_setup() 164 set_cpu_present(cpus, true); in octeon_smp_setup() 165 __cpu_number_map[id] = cpus; in octeon_smp_setup() 166 __cpu_logical_map[cpus] = id; in octeon_smp_setup() 167 cpus++; in octeon_smp_setup() 180 set_cpu_possible(cpus, true); in octeon_smp_setup() 181 __cpu_number_map[id] = cpus; in octeon_smp_setup() 182 __cpu_logical_map[cpus] = id; in octeon_smp_setup() [all …]
|
/Linux-v4.19/tools/testing/selftests/cpufreq/ |
D | cpu.sh | 17 cpus=$(ls $CPUROOT | grep "cpu[0-9].*") 18 for cpu in $cpus; do 25 cpus=$(ls $CPUROOT | grep "cpu[1-9].*") 26 for cpu in $cpus; do
|
/Linux-v4.19/arch/s390/kernel/ |
D | sthyi.c | 232 for (i = 0; i < block->hdr.cpus; i++) { in fill_diag_mac() 233 switch (cpu_id(block->cpus[i].ctidx, diag224_buf)) { in fill_diag_mac() 235 if (block->cpus[i].weight == DED_WEIGHT) in fill_diag_mac() 241 if (block->cpus[i].weight == DED_WEIGHT) in fill_diag_mac() 261 if (!(block->cpus[i].cflag & DIAG204_CPU_ONLINE)) in lpar_cpu_inf() 264 switch (cpu_id(block->cpus[i].ctidx, diag224_buf)) { in lpar_cpu_inf() 267 if (block->cpus[i].cur_weight < DED_WEIGHT) in lpar_cpu_inf() 268 weight_cp |= block->cpus[i].cur_weight; in lpar_cpu_inf() 272 if (block->cpus[i].cur_weight < DED_WEIGHT) in lpar_cpu_inf() 273 weight_ifl |= block->cpus[i].cur_weight; in lpar_cpu_inf() [all …]
|
/Linux-v4.19/tools/power/cpupower/lib/ |
D | cpupower.c | 134 int cpu, last_pkg, cpus = sysconf(_SC_NPROCESSORS_CONF); in get_cpu_topology() local 136 cpu_top->core_info = malloc(sizeof(struct cpuid_core_info) * cpus); in get_cpu_topology() 140 for (cpu = 0; cpu < cpus; cpu++) { in get_cpu_topology() 161 qsort(cpu_top->core_info, cpus, sizeof(struct cpuid_core_info), in get_cpu_topology() 168 for(cpu = 1; cpu < cpus; cpu++) { in get_cpu_topology() 186 return cpus; in get_cpu_topology()
|