Home
last modified time | relevance | path

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

12345678910>>...54

/linux/tools/lib/perf/
H A Dcpumap.c25 RC_STRUCT(perf_cpu_map) *cpus; in perf_cpu_map__alloc()
31 cpus = malloc(sizeof(*cpus) + sizeof(struct perf_cpu) * nr_cpus); in perf_cpu_map__alloc()
32 if (ADD_RC_CHK(result, cpus)) { in perf_cpu_map__alloc()
33 cpus->nr = nr_cpus; in perf_cpu_map__alloc()
34 refcount_set(&cpus->refcnt, 1); in perf_cpu_map__alloc()
41 struct perf_cpu_map *cpus = perf_cpu_map__alloc(1); in perf_cpu_map__new_any_cpu() local
43 if (cpus) in perf_cpu_map__new_any_cpu()
44 RC_CHK_ACCESS(cpus)->map[0].cpu = -1; in perf_cpu_map__new_any_cpu()
46 return cpus; in perf_cpu_map__new_any_cpu()
80 struct perf_cpu_map *cpus; in cpu_map__new_sysconf() local
[all …]
H A Devlist.c39 if (perf_cpu_map__is_empty(evsel->cpus)) { in __perf_evlist__propagate_maps()
52 evsel->cpus = perf_cpu_map__get(evlist->user_requested_cpus); in __perf_evlist__propagate_maps()
58 evsel->cpus = perf_cpu_map__get(evsel->pmu_cpus); in __perf_evlist__propagate_maps()
65 if (evsel->requires_cpu && perf_cpu_map__has_any_cpu(evsel->cpus)) { in __perf_evlist__propagate_maps()
66 perf_cpu_map__put(evsel->cpus); in __perf_evlist__propagate_maps()
67 evsel->cpus = perf_cpu_map__get(evsel->pmu_cpus); in __perf_evlist__propagate_maps()
76 if (!perf_cpu_map__equal(evsel->cpus, evlist->user_requested_cpus)) { in __perf_evlist__propagate_maps()
77 perf_cpu_map__put(evsel->cpus); in __perf_evlist__propagate_maps()
78 evsel->cpus = perf_cpu_map__get(evlist->user_requested_cpus); in __perf_evlist__propagate_maps()
83 if (!perf_cpu_map__has_any_cpu(evsel->cpus) && in __perf_evlist__propagate_maps()
[all …]
/linux/arch/riscv/kernel/
H A Dsys_hwprobe.c28 const struct cpumask *cpus) in hwprobe_arch_id() argument
39 for_each_cpu(cpu, cpus) { in hwprobe_arch_id()
74 const struct cpumask *cpus) in hwprobe_isa_ext0() argument
93 for_each_cpu(cpu, cpus) { in hwprobe_isa_ext0()
182 static bool hwprobe_ext0_has(const struct cpumask *cpus, u64 ext) in hwprobe_ext0_has() argument
186 hwprobe_isa_ext0(&pair, cpus); in hwprobe_ext0_has()
191 static u64 hwprobe_misaligned(const struct cpumask *cpus) in hwprobe_misaligned() argument
196 for_each_cpu(cpu, cpus) { in hwprobe_misaligned()
214 static u64 hwprobe_misaligned(const struct cpumask *cpus) in hwprobe_misaligned() argument
227 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.c93 cpu_set_t *cpus = (cpu_set_t *)arg; in test_zicbom() local
97 rc = riscv_hwprobe(&pair, 1, sizeof(cpu_set_t), (unsigned long *)cpus, 0); in test_zicbom()
117 cpu_set_t *cpus = (cpu_set_t *)arg; in test_zicboz() local
122 rc = riscv_hwprobe(&pair, 1, sizeof(cpu_set_t), (unsigned long *)cpus, 0); in test_zicboz()
160 static void check_no_zicbo_cpus(cpu_set_t *cpus, __u64 cbo) in check_no_zicbo_cpus() argument
170 while (i++ < CPU_COUNT(cpus)) { in check_no_zicbo_cpus()
171 while (!CPU_ISSET(c, cpus)) in check_no_zicbo_cpus()
219 cpu_set_t cpus; in main() local
231 rc = sched_getaffinity(0, sizeof(cpu_set_t), &cpus); in main()
237 rc = riscv_hwprobe(&pair, 1, sizeof(cpu_set_t), (unsigned long *)&cpus, 0); in main()
[all …]
/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/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/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
98 BOOT_ISOLCPUS=$(cat $CGROUP2/cpuset.cpus.isolated)
101 BOOT_ISOLCPUS=$(cat $CGROUP2/cpuset.cpus.isolated)
146 echo $EXPECTED_VAL > cpuset.cpus.partition
[all …]
/linux/tools/lib/perf/include/perf/
H A Dcpumap.h52 LIBPERF_API struct perf_cpu perf_cpu_map__cpu(const struct perf_cpu_map *cpus, int idx);
60 LIBPERF_API int perf_cpu_map__nr(const struct perf_cpu_map *cpus);
90 #define perf_cpu_map__for_each_cpu(cpu, idx, cpus) \ argument
91 for ((idx) = 0, (cpu) = perf_cpu_map__cpu(cpus, idx); \
92 (idx) < perf_cpu_map__nr(cpus); \
93 (idx)++, (cpu) = perf_cpu_map__cpu(cpus, idx))
95 #define perf_cpu_map__for_each_cpu_skip_any(_cpu, idx, cpus) \ argument
96 for ((idx) = 0, (_cpu) = perf_cpu_map__cpu(cpus, idx); \
97 (idx) < perf_cpu_map__nr(cpus); \
98 (idx)++, (_cpu) = perf_cpu_map__cpu(cpus, idx)) \
[all …]
/linux/arch/riscv/kernel/vdso/
H A Dhwprobe.c12 size_t cpusetsize, unsigned long *cpus,
16 size_t cpusetsize, unsigned long *cpus, in riscv_vdso_get_values() argument
20 bool all_cpus = !cpusetsize && !cpus; in riscv_vdso_get_values()
31 return riscv_hwprobe(pairs, pair_count, cpusetsize, cpus, flags); in riscv_vdso_get_values()
50 size_t cpusetsize, unsigned long *cpus, in riscv_vdso_get_cpus() argument
56 unsigned char *c = (unsigned char *)cpus; in riscv_vdso_get_cpus()
61 if (!cpusetsize || !cpus) in riscv_vdso_get_cpus()
72 return riscv_hwprobe(pairs, pair_count, cpusetsize, cpus, flags); in riscv_vdso_get_cpus()
101 size_t cpusetsize, unsigned long *cpus,
105 size_t cpusetsize, unsigned long *cpus, in __vdso_riscv_hwprobe() argument
[all …]
/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
44 if (cpumask_test_cpu(cpu, priv->cpus)) in cpufreq_dt_find_data()
109 cpumask_copy(policy->cpus, priv->cpus); in cpufreq_init()
176 if (!zalloc_cpumask_var(&priv->cpus, GFP_KERNEL)) in dt_cpufreq_early_init()
179 cpumask_set_cpu(cpu, priv->cpus); in dt_cpufreq_early_init()
197 ret = dev_pm_opp_of_get_sharing_cpus(cpu_dev, priv->cpus); in dt_cpufreq_early_init()
207 if (dev_pm_opp_get_sharing_cpus(cpu_dev, priv->cpus)) in dt_cpufreq_early_init()
222 ret = dev_pm_opp_of_cpumask_add_table(priv->cpus); in dt_cpufreq_early_init()
241 cpumask_setall(priv->cpus); in dt_cpufreq_early_init()
242 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.c113 struct perf_cpu_map *cpus; in attach__cpu_disabled() local
118 cpus = perf_cpu_map__new("0"); in attach__cpu_disabled()
119 if (cpus == NULL) { in attach__cpu_disabled()
126 err = evsel__open_per_cpu(evsel, cpus, -1); in attach__cpu_disabled()
127 perf_cpu_map__put(cpus); in attach__cpu_disabled()
142 struct perf_cpu_map *cpus; in attach__cpu_enabled() local
147 cpus = perf_cpu_map__new("0"); in attach__cpu_enabled()
148 if (cpus == NULL) { in attach__cpu_enabled()
153 err = evsel__open_per_cpu(evsel, cpus, -1); in attach__cpu_enabled()
154 perf_cpu_map__put(cpus); in attach__cpu_enabled()
/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/include/linux/
H A Dstop_machine.h130 int stop_machine(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus);
142 int stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus);
162 const struct cpumask *cpus);
166 const struct cpumask *cpus) in stop_machine_cpuslocked() argument
177 stop_machine(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus) in stop_machine() argument
179 return stop_machine_cpuslocked(fn, data, cpus); in stop_machine()
184 const struct cpumask *cpus) in stop_machine_from_inactive_cpu() argument
186 return stop_machine(fn, data, cpus); in stop_machine_from_inactive_cpu()
/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/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).dereference())
179 for cpu in cpus.each_online_cpu():
[all …]
/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/arch/x86/hyperv/
H A Dmmu.c19 static u64 hyperv_flush_tlb_others_ex(const struct cpumask *cpus,
59 static void hyperv_flush_tlb_multi(const struct cpumask *cpus, in hyperv_flush_tlb_multi() argument
68 trace_hyperv_mmu_flush_tlb_multi(cpus, info); in hyperv_flush_tlb_multi()
96 if (cpumask_equal(cpus, cpu_present_mask)) { in hyperv_flush_tlb_multi()
110 cpu = cpumask_last(cpus); in hyperv_flush_tlb_multi()
115 for_each_cpu(cpu, cpus) { in hyperv_flush_tlb_multi()
161 status = hyperv_flush_tlb_others_ex(cpus, info); in hyperv_flush_tlb_multi()
169 native_flush_tlb_multi(cpus, info); in hyperv_flush_tlb_multi()
172 static u64 hyperv_flush_tlb_others_ex(const struct cpumask *cpus, in hyperv_flush_tlb_others_ex() argument
200 nr_bank = cpumask_to_vpset_skip(&flush->hv_vp_set, cpus, in hyperv_flush_tlb_others_ex()
/linux/tools/testing/selftests/rcutorture/bin/
H A Djitter.sh74 if cpus=`grep 1 /sys/devices/system/cpu/*/online 2>&1 |
79 cpus=
82 cpus="$cpus $nohotplugcpus"
84 cpumask=`awk -v cpus="$cpus" -v me=$me -v n=$n 'BEGIN {
/linux/tools/tracing/rtla/src/
H A Dtimerlat_bpf.c129 int cpus) in get_value() argument
135 sizeof(long long) * cpus, 0); in get_value()
140 sizeof(long long) * cpus, 0); in get_value()
145 sizeof(long long) * cpus, 0); in get_value()
158 int cpus) in timerlat_bpf_get_hist_value() argument
163 key, value_irq, value_thread, value_user, cpus); in timerlat_bpf_get_hist_value()
173 int cpus) in timerlat_bpf_get_summary_value() argument
178 key, value_irq, value_thread, value_user, cpus); in timerlat_bpf_get_summary_value()

12345678910>>...54