/Linux-v5.4/tools/perf/lib/ |
D | cpumap.c | 15 struct perf_cpu_map *cpus = malloc(sizeof(*cpus) + sizeof(int)); in perf_cpu_map__dummy_new() local 17 if (cpus != NULL) { in perf_cpu_map__dummy_new() 18 cpus->nr = 1; in perf_cpu_map__dummy_new() 19 cpus->map[0] = -1; in perf_cpu_map__dummy_new() 20 refcount_set(&cpus->refcnt, 1); in perf_cpu_map__dummy_new() 23 return cpus; in perf_cpu_map__dummy_new() 50 struct perf_cpu_map *cpus; in cpu_map__default_new() local 57 cpus = malloc(sizeof(*cpus) + nr_cpus * sizeof(int)); in cpu_map__default_new() 58 if (cpus != NULL) { in cpu_map__default_new() 62 cpus->map[i] = i; in cpu_map__default_new() [all …]
|
D | evlist.c | 40 perf_cpu_map__put(evsel->cpus); in __perf_evlist__propagate_maps() 41 evsel->cpus = perf_cpu_map__get(evlist->cpus); in __perf_evlist__propagate_maps() 42 } else if (evsel->cpus != evsel->own_cpus) { in __perf_evlist__propagate_maps() 43 perf_cpu_map__put(evsel->cpus); in __perf_evlist__propagate_maps() 44 evsel->cpus = perf_cpu_map__get(evsel->own_cpus); in __perf_evlist__propagate_maps() 110 struct perf_cpu_map *cpus, in perf_evlist__set_maps() argument 120 if (cpus != evlist->cpus) { in perf_evlist__set_maps() 121 perf_cpu_map__put(evlist->cpus); in perf_evlist__set_maps() 122 evlist->cpus = perf_cpu_map__get(cpus); in perf_evlist__set_maps() 139 err = perf_evsel__open(evsel, evsel->cpus, evsel->threads); in perf_evlist__open() [all …]
|
/Linux-v5.4/tools/perf/tests/ |
D | openat-syscall-all-cpus.c | 26 struct perf_cpu_map *cpus; in test__openat_syscall_event_on_all_cpus() local 39 cpus = perf_cpu_map__new(NULL); in test__openat_syscall_event_on_all_cpus() 40 if (cpus == NULL) { in test__openat_syscall_event_on_all_cpus() 54 if (evsel__open(evsel, cpus, threads) < 0) { in test__openat_syscall_event_on_all_cpus() 61 for (cpu = 0; cpu < cpus->nr; ++cpu) { in test__openat_syscall_event_on_all_cpus() 69 if (cpus->map[cpu] >= CPU_SETSIZE) { in test__openat_syscall_event_on_all_cpus() 70 pr_debug("Ignoring CPU %d\n", cpus->map[cpu]); in test__openat_syscall_event_on_all_cpus() 74 CPU_SET(cpus->map[cpu], &cpu_set); in test__openat_syscall_event_on_all_cpus() 77 cpus->map[cpu], in test__openat_syscall_event_on_all_cpus() 85 CPU_CLR(cpus->map[cpu], &cpu_set); in test__openat_syscall_event_on_all_cpus() [all …]
|
D | cpumap.c | 54 struct cpu_map_entries *cpus; in process_event_cpus() local 62 cpus = (struct cpu_map_entries *)data->data; in process_event_cpus() 64 TEST_ASSERT_VAL("wrong nr", cpus->nr == 2); in process_event_cpus() 65 TEST_ASSERT_VAL("wrong cpu", cpus->cpu[0] == 1); in process_event_cpus() 66 TEST_ASSERT_VAL("wrong cpu", cpus->cpu[1] == 256); in process_event_cpus() 80 struct perf_cpu_map *cpus; in test__cpu_map_synthesize() local 83 cpus = perf_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() 86 !perf_event__synthesize_cpu_map(NULL, cpus, process_event_mask, NULL)); in test__cpu_map_synthesize() 88 perf_cpu_map__put(cpus); in test__cpu_map_synthesize() 91 cpus = perf_cpu_map__new("1,256"); in test__cpu_map_synthesize() [all …]
|
D | event-times.c | 115 struct perf_cpu_map *cpus; in attach__cpu_disabled() local 120 cpus = perf_cpu_map__new("0"); in attach__cpu_disabled() 121 if (cpus == NULL) { in attach__cpu_disabled() 128 err = perf_evsel__open_per_cpu(evsel, cpus); in attach__cpu_disabled() 137 perf_cpu_map__put(cpus); in attach__cpu_disabled() 144 struct perf_cpu_map *cpus; in attach__cpu_enabled() local 149 cpus = perf_cpu_map__new("0"); in attach__cpu_enabled() 150 if (cpus == NULL) { in attach__cpu_enabled() 155 err = perf_evsel__open_per_cpu(evsel, cpus); in attach__cpu_enabled() 159 perf_cpu_map__put(cpus); in attach__cpu_enabled()
|
D | mmap-basic.c | 36 struct perf_cpu_map *cpus; in test__basic_mmap() local 54 cpus = perf_cpu_map__new(NULL); in test__basic_mmap() 55 if (cpus == NULL) { in test__basic_mmap() 61 CPU_SET(cpus->map[0], &cpu_set); in test__basic_mmap() 65 cpus->map[0], str_error_r(errno, sbuf, sizeof(sbuf))); in test__basic_mmap() 75 perf_evlist__set_maps(&evlist->core, cpus, threads); in test__basic_mmap() 92 if (evsel__open(evsels[i], cpus, threads) < 0) { in test__basic_mmap() 160 cpus = NULL; in test__basic_mmap() 163 perf_cpu_map__put(cpus); in test__basic_mmap()
|
/Linux-v5.4/tools/perf/util/ |
D | record.c | 67 struct perf_cpu_map *cpus; in perf_probe_api() local 70 cpus = perf_cpu_map__new(NULL); in perf_probe_api() 71 if (!cpus) in perf_probe_api() 73 cpu = cpus->map[0]; in perf_probe_api() 74 perf_cpu_map__put(cpus); in perf_probe_api() 122 struct perf_cpu_map *cpus; in perf_can_record_cpu_wide() local 125 cpus = perf_cpu_map__new(NULL); in perf_can_record_cpu_wide() 126 if (!cpus) in perf_can_record_cpu_wide() 128 cpu = cpus->map[0]; in perf_can_record_cpu_wide() 129 perf_cpu_map__put(cpus); in perf_can_record_cpu_wide() [all …]
|
D | cpumap.c | 21 static struct perf_cpu_map *cpu_map__from_entries(struct cpu_map_entries *cpus) in cpu_map__from_entries() argument 25 map = perf_cpu_map__empty_new(cpus->nr); in cpu_map__from_entries() 29 for (i = 0; i < cpus->nr; i++) { in cpu_map__from_entries() 35 if (cpus->cpu[i] == (u16) -1) in cpu_map__from_entries() 38 map->map[i] = (int) cpus->cpu[i]; in cpu_map__from_entries() 83 struct perf_cpu_map *cpus = malloc(sizeof(*cpus) + sizeof(int) * nr); in perf_cpu_map__empty_new() local 85 if (cpus != NULL) { in perf_cpu_map__empty_new() 88 cpus->nr = nr; in perf_cpu_map__empty_new() 90 cpus->map[i] = -1; in perf_cpu_map__empty_new() 92 refcount_set(&cpus->refcnt, 1); in perf_cpu_map__empty_new() [all …]
|
D | cpumap.h | 23 int cpu_map__build_socket_map(struct perf_cpu_map *cpus, struct perf_cpu_map **sockp); 24 int cpu_map__build_die_map(struct perf_cpu_map *cpus, struct perf_cpu_map **diep); 25 int cpu_map__build_core_map(struct perf_cpu_map *cpus, struct perf_cpu_map **corep); 57 int cpu_map__build_map(struct perf_cpu_map *cpus, struct perf_cpu_map **res, 61 int cpu_map__cpu(struct perf_cpu_map *cpus, int idx); 62 bool cpu_map__has(struct perf_cpu_map *cpus, int cpu);
|
/Linux-v5.4/drivers/clk/sunxi/ |
D | clk-sun9i-cpus.c | 55 struct sun9i_a80_cpus_clk *cpus = to_sun9i_a80_cpus_clk(hw); in sun9i_a80_cpus_clk_recalc_rate() local 60 reg = readl(cpus->reg); in sun9i_a80_cpus_clk_recalc_rate() 155 struct sun9i_a80_cpus_clk *cpus = to_sun9i_a80_cpus_clk(hw); in sun9i_a80_cpus_clk_set_rate() local 162 reg = readl(cpus->reg); in sun9i_a80_cpus_clk_set_rate() 170 writel(reg, cpus->reg); in sun9i_a80_cpus_clk_set_rate() 188 struct sun9i_a80_cpus_clk *cpus; in sun9i_a80_cpus_setup() local 193 cpus = kzalloc(sizeof(*cpus), GFP_KERNEL); in sun9i_a80_cpus_setup() 194 if (!cpus) in sun9i_a80_cpus_setup() 197 cpus->reg = of_io_request_and_map(node, 0, of_node_full_name(node)); in sun9i_a80_cpus_setup() 198 if (IS_ERR(cpus->reg)) in sun9i_a80_cpus_setup() [all …]
|
/Linux-v5.4/tools/perf/lib/tests/ |
D | test-cpumap.c | 15 struct perf_cpu_map *cpus; in main() local 21 cpus = perf_cpu_map__dummy_new(); in main() 22 if (!cpus) in main() 25 perf_cpu_map__get(cpus); in main() 26 perf_cpu_map__put(cpus); in main() 27 perf_cpu_map__put(cpus); in main()
|
/Linux-v5.4/tools/perf/arch/nds32/util/ |
D | header.c | 15 struct cpu_map *cpus; in get_cpuid_str() local 18 if (!sysfs || !pmu || !pmu->cpus) in get_cpuid_str() 25 cpus = cpu_map__get(pmu->cpus); in get_cpuid_str() 26 sprintf(buf, "0x%x", cpus->nr - 1); in get_cpuid_str() 27 cpu_map__put(cpus); in get_cpuid_str()
|
/Linux-v5.4/tools/perf/arch/arm64/util/ |
D | header.c | 22 struct perf_cpu_map *cpus; in get_cpuid_str() local 25 if (!sysfs || !pmu || !pmu->cpus) in get_cpuid_str() 33 cpus = perf_cpu_map__get(pmu->cpus); in get_cpuid_str() 34 for (cpu = 0; cpu < perf_cpu_map__nr(cpus); cpu++) { in get_cpuid_str() 36 sysfs, cpus->map[cpu]); in get_cpuid_str() 66 perf_cpu_map__put(cpus); in get_cpuid_str()
|
/Linux-v5.4/tools/perf/lib/include/perf/ |
D | cpumap.h | 16 LIBPERF_API int perf_cpu_map__cpu(const struct perf_cpu_map *cpus, int idx); 17 LIBPERF_API int perf_cpu_map__nr(const struct perf_cpu_map *cpus); 21 #define perf_cpu_map__for_each_cpu(cpu, idx, cpus) \ argument 22 for ((idx) = 0, (cpu) = perf_cpu_map__cpu(cpus, idx); \ 23 (idx) < perf_cpu_map__nr(cpus); \ 24 (idx)++, (cpu) = perf_cpu_map__cpu(cpus, idx))
|
/Linux-v5.4/Documentation/devicetree/bindings/csky/ |
D | cpus.txt | 6 the "cpus" node, which in turn contains a number of subnodes (ie "cpu") 9 Only SMP system need to care about the cpus node and single processor 10 needn't define cpus node at all. 13 cpus and cpu node bindings definition 16 - cpus node 20 The node name must be "cpus". 22 A cpus node must define the following properties: 59 cpus {
|
/Linux-v5.4/arch/x86/hyperv/ |
D | mmu.c | 20 static u64 hyperv_flush_tlb_others_ex(const struct cpumask *cpus, 55 static void hyperv_flush_tlb_others(const struct cpumask *cpus, in hyperv_flush_tlb_others() argument 64 trace_hyperv_mmu_flush_tlb_others(cpus, info); in hyperv_flush_tlb_others() 69 if (cpumask_empty(cpus)) in hyperv_flush_tlb_others() 98 if (cpumask_equal(cpus, cpu_present_mask)) { in hyperv_flush_tlb_others() 112 if (hv_cpu_number_to_vp_number(cpumask_last(cpus)) >= 64) in hyperv_flush_tlb_others() 115 for_each_cpu(cpu, cpus) { in hyperv_flush_tlb_others() 153 status = hyperv_flush_tlb_others_ex(cpus, info); in hyperv_flush_tlb_others() 161 native_flush_tlb_others(cpus, info); in hyperv_flush_tlb_others() 164 static u64 hyperv_flush_tlb_others_ex(const struct cpumask *cpus, in hyperv_flush_tlb_others_ex() argument [all …]
|
/Linux-v5.4/sound/soc/intel/boards/ |
D | sof_rt5682.c | 413 struct snd_soc_dai_link_component *cpus; in sof_card_dai_links_create() local 419 cpus = devm_kzalloc(dev, sizeof(struct snd_soc_dai_link_component) * in sof_card_dai_links_create() 421 if (!links || !cpus) in sof_card_dai_links_create() 441 links[id].cpus = &cpus[id]; in sof_card_dai_links_create() 444 links[id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, in sof_card_dai_links_create() 447 if (!links[id].cpus->dai_name) in sof_card_dai_links_create() 460 links[id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, in sof_card_dai_links_create() 463 if (!links[id].cpus->dai_name) in sof_card_dai_links_create() 472 links[id].cpus = &cpus[id]; in sof_card_dai_links_create() 473 links[id].cpus->dai_name = "DMIC01 Pin"; in sof_card_dai_links_create() [all …]
|
/Linux-v5.4/include/linux/ |
D | stop_machine.h | 125 int stop_machine(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus); 136 int stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus); 139 const struct cpumask *cpus); 143 const struct cpumask *cpus) in stop_machine_cpuslocked() argument 154 const struct cpumask *cpus) in stop_machine() argument 156 return stop_machine_cpuslocked(fn, data, cpus); in stop_machine() 160 const struct cpumask *cpus) in stop_machine_from_inactive_cpu() argument 162 return stop_machine(fn, data, cpus); in stop_machine_from_inactive_cpu()
|
/Linux-v5.4/sound/soc/samsung/ |
D | snow.c | 149 link->cpus = links_cpus; in snow_probe() 166 link->cpus->of_node = of_parse_phandle(cpu, "sound-dai", 0); in snow_probe() 169 if (!link->cpus->of_node) { in snow_probe() 179 of_node_put(link->cpus->of_node); in snow_probe() 184 priv->clk_i2s_bus = of_clk_get_by_name(link->cpus->of_node, in snow_probe() 188 of_node_put(link->cpus->of_node); in snow_probe() 194 link->cpus->of_node = of_parse_phandle(dev->of_node, in snow_probe() 196 if (!link->cpus->of_node) { in snow_probe() 204 of_node_put(link->cpus->of_node); in snow_probe() 210 link->platforms->of_node = link->cpus->of_node; in snow_probe() [all …]
|
/Linux-v5.4/sound/soc/kirkwood/ |
D | armada-370-db.c | 111 a370db_dai[0].cpus->of_node = in a370db_probe() 114 a370db_dai[0].platforms->of_node = a370db_dai[0].cpus->of_node; in a370db_probe() 120 a370db_dai[1].cpus->of_node = a370db_dai[0].cpus->of_node; in a370db_probe() 121 a370db_dai[1].platforms->of_node = a370db_dai[0].cpus->of_node; in a370db_probe() 127 a370db_dai[2].cpus->of_node = a370db_dai[0].cpus->of_node; in a370db_probe() 128 a370db_dai[2].platforms->of_node = a370db_dai[0].cpus->of_node; in a370db_probe()
|
/Linux-v5.4/tools/perf/python/ |
D | twatch.py | 12 cpus = perf.cpu_map() 28 evsel.open(cpus = cpus, threads = threads); 29 evlist = perf.evlist(cpus, threads) 34 for cpu in cpus:
|
/Linux-v5.4/tools/testing/selftests/rcutorture/bin/ |
D | jitter.sh | 38 cpus=`grep 1 /sys/devices/system/cpu/*/online | 43 cpus="0 $cpus" 46 cpumask=`awk -v cpus="$cpus" -v me=$me -v n=$n 'BEGIN {
|
/Linux-v5.4/drivers/irqchip/ |
D | irq-bcm6345-l1.c | 81 struct bcm6345_l1_cpu *cpus[NR_CPUS]; member 124 cpu = intc->cpus[cpu_logical_map(smp_processor_id())]; in bcm6345_l1_irq_handle() 126 cpu = intc->cpus[0]; in bcm6345_l1_irq_handle() 159 intc->cpus[cpu_idx]->enable_cache[word] |= mask; in __bcm6345_l1_unmask() 160 __raw_writel(intc->cpus[cpu_idx]->enable_cache[word], in __bcm6345_l1_unmask() 161 intc->cpus[cpu_idx]->map_base + reg_enable(intc, word)); in __bcm6345_l1_unmask() 171 intc->cpus[cpu_idx]->enable_cache[word] &= ~mask; in __bcm6345_l1_mask() 172 __raw_writel(intc->cpus[cpu_idx]->enable_cache[word], in __bcm6345_l1_mask() 173 intc->cpus[cpu_idx]->map_base + reg_enable(intc, word)); in __bcm6345_l1_mask() 220 enabled = intc->cpus[old_cpu]->enable_cache[word] & mask; in bcm6345_l1_set_affinity() [all …]
|
/Linux-v5.4/tools/power/cpupower/utils/ |
D | cpufreq-info.c | 393 struct cpufreq_affected_cpus *cpus = cpufreq_get_affected_cpus(cpu); in get_affected_cpus() local 396 if (!cpus) { in get_affected_cpus() 401 while (cpus->next) { in get_affected_cpus() 402 printf("%d ", cpus->cpu); in get_affected_cpus() 403 cpus = cpus->next; in get_affected_cpus() 405 printf("%d\n", cpus->cpu); in get_affected_cpus() 406 cpufreq_put_affected_cpus(cpus); in get_affected_cpus() 414 struct cpufreq_affected_cpus *cpus = cpufreq_get_related_cpus(cpu); in get_related_cpus() local 417 if (!cpus) { in get_related_cpus() 422 while (cpus->next) { in get_related_cpus() [all …]
|
/Linux-v5.4/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); 60 TP_PROTO(const struct cpumask *cpus, 62 TP_ARGS(cpus, vector), 67 TP_fast_assign(__entry->ncpus = cpumask_weight(cpus);
|