Home
last modified time | relevance | path

Searched refs:cpus (Results 1 – 25 of 1091) sorted by relevance

12345678910>>...44

/linux/tools/lib/perf/
H A Dcpumap.c21 RC_STRUCT(perf_cpu_map) *cpus; in perf_cpu_map__alloc()
27 cpus = malloc(sizeof(*cpus) + sizeof(struct perf_cpu) * nr_cpus); in perf_cpu_map__alloc()
28 if (ADD_RC_CHK(result, cpus)) { in perf_cpu_map__alloc()
29 cpus->nr = nr_cpus; in perf_cpu_map__alloc()
30 refcount_set(&cpus->refcnt, 1);
37 struct perf_cpu_map *cpus = perf_cpu_map__alloc(1); in perf_cpu_map__new_any_cpu()
39 if (cpus) in perf_cpu_map__new_any_cpu()
40 RC_CHK_ACCESS(cpus)->map[0].cpu = -1;
42 return cpus; in cpu_map__delete()
33 struct perf_cpu_map *cpus = perf_cpu_map__alloc(1); perf_cpu_map__new_any_cpu() local
72 struct perf_cpu_map *cpus; cpu_map__new_sysconf() local
98 struct perf_cpu_map *cpus = NULL; cpu_map__new_sysfs_online() local
111 struct perf_cpu_map *cpus = cpu_map__new_sysfs_online(); perf_cpu_map__new_online_cpus() local
127 __perf_cpu_map__cpu(const struct perf_cpu_map * cpus,int idx) __perf_cpu_map__cpu() argument
135 struct perf_cpu_map *cpus = perf_cpu_map__alloc(nr_cpus); cpu_map__trim_new() local
159 struct perf_cpu_map *cpus = NULL; perf_cpu_map__read() local
215 struct perf_cpu_map *cpus = NULL; perf_cpu_map__new() local
292 __perf_cpu_map__nr(const struct perf_cpu_map * cpus) __perf_cpu_map__nr() argument
297 perf_cpu_map__cpu(const struct perf_cpu_map * cpus,int idx) perf_cpu_map__cpu() argument
309 perf_cpu_map__nr(const struct perf_cpu_map * cpus) perf_cpu_map__nr() argument
319 perf_cpu_map__idx(const struct perf_cpu_map * cpus,struct perf_cpu cpu) perf_cpu_map__idx() argument
344 perf_cpu_map__has(const struct perf_cpu_map * cpus,struct perf_cpu cpu) perf_cpu_map__has() argument
[all...]
/linux/arch/riscv/kernel/
H A Dsys_hwprobe.c22 const struct cpumask *cpus) in hwprobe_arch_id() argument
28 for_each_cpu(cpu, cpus) { in hwprobe_arch_id()
62 const struct cpumask *cpus) in hwprobe_isa_ext0() argument
81 for_each_cpu(cpu, cpus) { in hwprobe_isa_ext0()
163 static bool hwprobe_ext0_has(const struct cpumask *cpus, unsigned long ext) in hwprobe_ext0_has() argument
167 hwprobe_isa_ext0(&pair, cpus); in hwprobe_ext0_has()
172 static u64 hwprobe_misaligned(const struct cpumask *cpus) in hwprobe_misaligned() argument
177 for_each_cpu(cpu, cpus) { in hwprobe_misaligned()
195 static u64 hwprobe_misaligned(const struct cpumask *cpus) in hwprobe_misaligned() argument
208 static u64 hwprobe_vec_misaligned(const struct cpumask *cpus) in hwprobe_vec_misaligned() argument
[all …]
/linux/tools/testing/selftests/riscv/hwprobe/
H A Dwhich-cpus.c29 static void print_cpulist(cpu_set_t *cpus) in print_cpulist() argument
33 if (!CPU_COUNT(cpus)) { in print_cpulist()
39 for (int i = 0, c = 0; i < CPU_COUNT(cpus); i++, c++) { in print_cpulist()
40 if (start != end && !CPU_ISSET(c, cpus)) in print_cpulist()
43 while (!CPU_ISSET(c, cpus)) in print_cpulist()
59 static void do_which_cpus(int argc, char **argv, cpu_set_t *cpus) in do_which_cpus() argument
78 …rc = riscv_hwprobe(pairs, nr_pairs, sizeof(cpu_set_t), (unsigned long *)cpus, RISCV_HWPROBE_WHICH_… in do_which_cpus()
80 print_cpulist(cpus); in do_which_cpus()
87 cpu_set_t cpus_aff, cpus; in main() local
116 CPU_ZERO(&cpus); in main()
[all …]
H A Dcbo.c89 cpu_set_t *cpus = (cpu_set_t *)arg; in test_zicboz() local
94 rc = riscv_hwprobe(&pair, 1, sizeof(cpu_set_t), (unsigned long *)cpus, 0); in test_zicboz()
132 static void check_no_zicboz_cpus(cpu_set_t *cpus) in check_no_zicboz_cpus() argument
141 while (i++ < CPU_COUNT(cpus)) { in check_no_zicboz_cpus()
142 while (!CPU_ISSET(c, cpus)) in check_no_zicboz_cpus()
183 cpu_set_t cpus; in main() local
194 rc = sched_getaffinity(0, sizeof(cpu_set_t), &cpus); in main()
200 rc = riscv_hwprobe(&pair, 1, sizeof(cpu_set_t), (unsigned long *)&cpus, 0); in main()
209 check_no_zicboz_cpus(&cpus); in main()
222 tests[i].test_fn(&cpus); in main()
/linux/sound/soc/intel/boards/
H A Dsof_board_helpers.c182 struct snd_soc_dai_link_component *cpus; in set_ssp_codec_link() local
193 cpus = devm_kzalloc(dev, sizeof(struct snd_soc_dai_link_component), in set_ssp_codec_link()
195 if (!cpus) in set_ssp_codec_link()
200 cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, "ssp%d-port", in set_ssp_codec_link()
203 cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d Pin", in set_ssp_codec_link()
206 if (!cpus->dai_name) in set_ssp_codec_link()
209 link->cpus = cpus; in set_ssp_codec_link()
227 struct snd_soc_dai_link_component *cpus; in set_dmic_link() local
230 cpus = devm_kzalloc(dev, sizeof(struct snd_soc_dai_link_component), in set_dmic_link()
232 if (!cpus) in set_dmic_link()
[all …]
H A Dsof_pcm512x.c225 struct snd_soc_dai_link_component *cpus; in sof_card_dai_links_create() local
231 cpus = devm_kcalloc(dev, sof_audio_card_pcm512x.num_links, in sof_card_dai_links_create()
233 if (!links || !cpus) in sof_card_dai_links_create()
255 links[id].cpus = &cpus[id]; in sof_card_dai_links_create()
258 links[id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, in sof_card_dai_links_create()
261 if (!links[id].cpus->dai_name) in sof_card_dai_links_create()
264 links[id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, in sof_card_dai_links_create()
267 if (!links[id].cpus->dai_name) in sof_card_dai_links_create()
276 links[id].cpus = &cpus[id]; in sof_card_dai_links_create()
277 links[id].cpus->dai_name = "DMIC01 Pin"; in sof_card_dai_links_create()
[all …]
/linux/tools/testing/selftests/cgroup/
H A Dtest_cpuset_prs.sh25 SUBPARTS_CPUS=$CGROUP2/.__DEBUG__.cpuset.cpus.subpartitions
26 CPULIST=$(cat $CGROUP2/cpuset.cpus.effective)
79 echo 0-6 > test/cpuset.cpus
80 echo root > test/cpuset.cpus.partition
81 cat test/cpuset.cpus.partition | grep -q invalid
83 echo member > test/cpuset.cpus.partition
84 echo "" > test/cpuset.cpus
94 BOOT_ISOLCPUS=$(cat $CGROUP2/cpuset.cpus.isolated)
136 echo $EXPECTED_VAL > cpuset.cpus.partition
138 ACTUAL_VAL=$(cat cpuset.cpus.partition)
[all …]
/linux/tools/lib/perf/tests/
H A Dtest-cpumap.c16 struct perf_cpu_map *cpus; in test_cpumap() local
24 cpus = perf_cpu_map__new_any_cpu(); in test_cpumap()
25 if (!cpus) in test_cpumap()
28 perf_cpu_map__get(cpus); in test_cpumap()
29 perf_cpu_map__put(cpus); in test_cpumap()
30 perf_cpu_map__put(cpus); in test_cpumap()
32 cpus = perf_cpu_map__new_online_cpus(); in test_cpumap()
33 if (!cpus) in test_cpumap()
36 perf_cpu_map__for_each_cpu(cpu, idx, cpus) in test_cpumap()
39 perf_cpu_map__put(cpus); in test_cpumap()
H A Dtest-evlist.c36 struct perf_cpu_map *cpus; in test_stat_cpu() local
49 cpus = perf_cpu_map__new_online_cpus(); in test_stat_cpu()
50 __T("failed to create cpus", cpus); in test_stat_cpu()
69 perf_evlist__set_maps(evlist, cpus, NULL); in test_stat_cpu()
75 cpus = perf_evsel__cpus(evsel); in test_stat_cpu()
77 for (idx = 0; idx < perf_cpu_map__nr(cpus); idx++) { in test_stat_cpu()
88 perf_cpu_map__put(cpus); in test_stat_cpu()
218 struct perf_cpu_map *cpus; in test_mmap_thread() local
264 cpus = perf_cpu_map__new_any_cpu(); in test_mmap_thread()
265 __T("failed to create cpus", cpus); in test_mmap_thread()
[all …]
/linux/tools/lib/perf/include/perf/
H A Dcpumap.h51 LIBPERF_API struct perf_cpu perf_cpu_map__cpu(const struct perf_cpu_map *cpus, int idx);
59 LIBPERF_API int perf_cpu_map__nr(const struct perf_cpu_map *cpus);
89 #define perf_cpu_map__for_each_cpu(cpu, idx, cpus) \
90 for ((idx) = 0, (cpu) = perf_cpu_map__cpu(cpus, idx); \
91 (idx) < perf_cpu_map__nr(cpus); \
92 (idx)++, (cpu) = perf_cpu_map__cpu(cpus, idx))
94 #define perf_cpu_map__for_each_cpu_skip_any(_cpu, idx, cpus) \
95 for ((idx) = 0, (_cpu) = perf_cpu_map__cpu(cpus, idx); \
96 (idx) < perf_cpu_map__nr(cpus); \
97 (idx)++, (_cpu) = perf_cpu_map__cpu(cpus, id
73 perf_cpu_map__for_each_cpu(cpu,idx,cpus) global() argument
78 perf_cpu_map__for_each_cpu_skip_any(_cpu,idx,cpus) global() argument
84 perf_cpu_map__for_each_idx(idx,cpus) global() argument
[all...]
/linux/tools/perf/arch/arm64/util/
H A Dheader.c46 struct perf_cpu_map *cpus; in _get_cpuid()
52 cpus = perf_cpu_map__new_online_cpus(); in _get_cpuid()
53 if (!cpus) in _get_cpuid()
56 perf_cpu_map__for_each_cpu(cpu, idx, cpus) { in _get_cpuid()
73 /* read midr from list of cpus mapped to this pmu */ in get_cpuid_str()
19 _get_cpuid(char * buf,size_t sz,struct perf_cpu_map * cpus) _get_cpuid() argument
60 struct perf_cpu_map *cpus = perf_cpu_map__new_online_cpus(); get_cpuid() local
/linux/drivers/clk/sunxi/
H A Dclk-sun9i-cpus.c52 struct sun9i_a80_cpus_clk *cpus = to_sun9i_a80_cpus_clk(hw); in sun9i_a80_cpus_clk_recalc_rate() local
57 reg = readl(cpus->reg); in sun9i_a80_cpus_clk_recalc_rate()
152 struct sun9i_a80_cpus_clk *cpus = to_sun9i_a80_cpus_clk(hw); in sun9i_a80_cpus_clk_set_rate() local
159 reg = readl(cpus->reg); in sun9i_a80_cpus_clk_set_rate()
167 writel(reg, cpus->reg); in sun9i_a80_cpus_clk_set_rate()
189 struct sun9i_a80_cpus_clk *cpus; in sun9i_a80_cpus_setup() local
194 cpus = kzalloc(sizeof(*cpus), GFP_KERNEL); in sun9i_a80_cpus_setup()
195 if (!cpus) in sun9i_a80_cpus_setup()
198 cpus->reg = of_io_request_and_map(node, 0, of_node_full_name(node)); in sun9i_a80_cpus_setup()
199 if (IS_ERR(cpus->reg)) in sun9i_a80_cpus_setup()
[all …]
/linux/drivers/cpufreq/
H A Dcpufreq-dt.c30 cpumask_var_t cpus; member
50 if (cpumask_test_cpu(cpu, priv->cpus)) in cpufreq_dt_find_data()
115 cpumask_copy(policy->cpus, priv->cpus); in cpufreq_init()
196 if (!zalloc_cpumask_var(&priv->cpus, GFP_KERNEL)) in dt_cpufreq_early_init()
199 cpumask_set_cpu(cpu, priv->cpus); in dt_cpufreq_early_init()
217 ret = dev_pm_opp_of_get_sharing_cpus(cpu_dev, priv->cpus); in dt_cpufreq_early_init()
227 if (dev_pm_opp_get_sharing_cpus(cpu_dev, priv->cpus)) in dt_cpufreq_early_init()
242 ret = dev_pm_opp_of_cpumask_add_table(priv->cpus); in dt_cpufreq_early_init()
261 cpumask_setall(priv->cpus); in dt_cpufreq_early_init()
262 ret = dev_pm_opp_set_sharing_cpus(cpu_dev, priv->cpus); in dt_cpufreq_early_init()
[all …]
/linux/tools/perf/util/
H A Dperf_api_probe.c63 struct perf_cpu_map *cpus; in perf_probe_api() local
67 cpus = perf_cpu_map__new_online_cpus(); in perf_probe_api()
68 if (!cpus) in perf_probe_api()
70 cpu = perf_cpu_map__cpu(cpus, 0); in perf_probe_api()
71 perf_cpu_map__put(cpus); in perf_probe_api()
139 struct perf_cpu_map *cpus; in perf_can_record_cpu_wide() local
143 cpus = perf_cpu_map__new_online_cpus(); in perf_can_record_cpu_wide()
144 if (!cpus) in perf_can_record_cpu_wide()
147 cpu = perf_cpu_map__cpu(cpus, 0); in perf_can_record_cpu_wide()
148 perf_cpu_map__put(cpus); in perf_can_record_cpu_wide()
/linux/tools/perf/tests/
H A Dopenat-syscall-all-cpus.c27 struct perf_cpu_map *cpus; in test__openat_syscall_event_on_all_cpus() local
40 cpus = perf_cpu_map__new_online_cpus(); in test__openat_syscall_event_on_all_cpus()
41 if (cpus == NULL) { in test__openat_syscall_event_on_all_cpus()
56 if (evsel__open(evsel, cpus, threads) < 0) { in test__openat_syscall_event_on_all_cpus()
64 perf_cpu_map__for_each_cpu(cpu, idx, cpus) { in test__openat_syscall_event_on_all_cpus()
91 evsel->core.cpus = perf_cpu_map__get(cpus); in test__openat_syscall_event_on_all_cpus()
95 perf_cpu_map__for_each_cpu(cpu, idx, cpus) { in test__openat_syscall_event_on_all_cpus()
121 perf_cpu_map__put(cpus); in test__openat_syscall_event_on_all_cpus()
H A Devent-times.c115 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 = evsel__open_per_cpu(evsel, cpus, -1); in attach__cpu_disabled()
129 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 = evsel__open_per_cpu(evsel, cpus, -1); in attach__cpu_enabled()
156 perf_cpu_map__put(cpus); in attach__cpu_enabled()
[all...]
/linux/scripts/gdb/linux/
H A Dinterrupts.py8 from linux import cpus
39 for cpu in cpus.each_online_cpu():
40 any_count += cpus.per_cpu(desc['kstat_irqs'], cpu)['cnt']
46 for cpu in cpus.each_online_cpu():
48 count = cpus.per_cpu(desc['kstat_irqs'], cpu)['cnt']
103 for cpu in cpus.each_online_cpu():
104 stat = cpus.per_cpu(irq_stat, cpu)
112 for cpu in cpus.each_online_cpu():
113 text += "%10u " % (cpus.per_cpu(pvar, cpu))
179 for cpu in cpus.each_online_cpu():
[all …]
/linux/include/linux/
H A Dstop_machine.h114 int stop_machine(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus);
125 int stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus);
144 const struct cpumask *cpus);
148 const struct cpumask *cpus) in stop_machine_cpuslocked() argument
159 stop_machine(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus) in stop_machine() argument
161 return stop_machine_cpuslocked(fn, data, cpus); in stop_machine()
166 const struct cpumask *cpus) in stop_machine_from_inactive_cpu() argument
168 return stop_machine(fn, data, cpus); in stop_machine_from_inactive_cpu()
/linux/Documentation/devicetree/bindings/csky/
H A Dcpus.txt6 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/sound/soc/samsung/
H A Dsnow.c145 link->cpus = links_cpus; in snow_probe()
162 link->cpus->of_node = of_parse_phandle(cpu, "sound-dai", 0); in snow_probe()
165 if (!link->cpus->of_node) { in snow_probe()
175 of_node_put(link->cpus->of_node); in snow_probe()
180 priv->clk_i2s_bus = of_clk_get_by_name(link->cpus->of_node, in snow_probe()
184 of_node_put(link->cpus->of_node); in snow_probe()
190 link->cpus->of_node = of_parse_phandle(dev->of_node, in snow_probe()
192 if (!link->cpus->of_node) { in snow_probe()
200 of_node_put(link->cpus->of_node); in snow_probe()
206 link->platforms->of_node = link->cpus->of_node; in snow_probe()
[all …]
/linux/arch/x86/hyperv/
H A Dmmu.c20 static u64 hyperv_flush_tlb_others_ex(const struct cpumask *cpus,
60 static void hyperv_flush_tlb_multi(const struct cpumask *cpus, in hyperv_flush_tlb_multi() argument
69 trace_hyperv_mmu_flush_tlb_multi(cpus, info); in hyperv_flush_tlb_multi()
97 if (cpumask_equal(cpus, cpu_present_mask)) { in hyperv_flush_tlb_multi()
111 cpu = cpumask_last(cpus); in hyperv_flush_tlb_multi()
116 for_each_cpu(cpu, cpus) { in hyperv_flush_tlb_multi()
162 status = hyperv_flush_tlb_others_ex(cpus, info); in hyperv_flush_tlb_multi()
170 native_flush_tlb_multi(cpus, info); in hyperv_flush_tlb_multi()
173 static u64 hyperv_flush_tlb_others_ex(const struct cpumask *cpus, in hyperv_flush_tlb_others_ex() argument
201 nr_bank = cpumask_to_vpset_skip(&flush->hv_vp_set, cpus, in hyperv_flush_tlb_others_ex()
/linux/sound/soc/kirkwood/
H A Darmada-370-db.c111 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/tools/testing/selftests/rcutorture/bin/
H A Djitter.sh58 if cpus=`grep 1 /sys/devices/system/cpu/*/online 2>&1 |
63 cpus=
66 cpus="$cpus $nohotplugcpus"
68 cpumask=`awk -v cpus="$cpus" -v me=$me -v n=$n 'BEGIN {
/linux/tools/power/cpupower/utils/
H A Dcpufreq-info.c358 struct cpufreq_affected_cpus *cpus = cpufreq_get_affected_cpus(cpu); in get_affected_cpus() local
361 if (!cpus) { in get_affected_cpus()
366 while (cpus->next) { in get_affected_cpus()
367 printf("%d ", cpus->cpu); in get_affected_cpus()
368 cpus = cpus->next; in get_affected_cpus()
370 printf("%d\n", cpus->cpu); in get_affected_cpus()
371 cpufreq_put_affected_cpus(cpus); in get_affected_cpus()
379 struct cpufreq_affected_cpus *cpus = cpufreq_get_related_cpus(cpu); in get_related_cpus() local
382 if (!cpus) { in get_related_cpus()
387 while (cpus->next) { in get_related_cpus()
[all …]
/linux/drivers/irqchip/
H A Dirq-bcm7038-l1.c41 struct bcm7038_l1_cpu *cpus[NR_CPUS]; member
127 cpu = intc->cpus[cpu_logical_map(smp_processor_id())]; in bcm7038_l1_irq_handle()
129 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()
208 was_disabled = !!(intc->cpus[intc->affinity[hw]]->mask_cache[word] & in bcm7038_l1_set_affinity()
252 cpu = intc->cpus[idx] = kzalloc(struct_size(cpu, mask_cache, n_words), in bcm7038_l1_init_one()
312 intc->cpus[boot_cpu]->map_base + reg_mask_set(intc, word)); in bcm7038_l1_suspend()
[all …]

12345678910>>...44