/openbmc/qemu/tests/functional/ |
H A D | test_x86_cpu_model_versions.py | 32 def validate_aliases(self, cpus): argument 33 for c in cpus.values(): 36 self.assertIn(c['alias-of'], cpus, 39 self.assertNotIn('alias-of', cpus[c['alias-of']], 45 def validate_variant_aliases(self, cpus): argument 48 self.assertNotIn("Haswell-noTSX-v1", cpus, 50 self.assertNotIn("Broadwell-noTSX-v1", cpus, 52 self.assertNotIn("Nehalem-IBRS-v1", cpus, 54 self.assertNotIn("Westmere-IBRS-v1", cpus, 56 self.assertNotIn("SandyBridge-IBRS-v1", cpus, [all …]
|
/openbmc/linux/tools/lib/perf/ |
H A D | cpumap.c | 20 RC_STRUCT(perf_cpu_map) *cpus = malloc(sizeof(*cpus) + sizeof(struct perf_cpu) * nr_cpus); in perf_cpu_map__alloc() 23 if (ADD_RC_CHK(result, cpus)) { in perf_cpu_map__alloc() 24 cpus->nr = nr_cpus; in perf_cpu_map__alloc() 25 refcount_set(&cpus->refcnt, 1); in perf_cpu_map__alloc() 32 struct perf_cpu_map *cpus = perf_cpu_map__alloc(1); in perf_cpu_map__dummy_new() local 34 if (cpus) in perf_cpu_map__dummy_new() 35 RC_CHK_ACCESS(cpus)->map[0].cpu = -1; in perf_cpu_map__dummy_new() 37 return cpus; in perf_cpu_map__dummy_new() 71 struct perf_cpu_map *cpus; in cpu_map__default_new() local 78 cpus = perf_cpu_map__alloc(nr_cpus); in cpu_map__default_new() [all …]
|
/openbmc/linux/tools/lib/perf/tests/ |
H A D | test-cpumap.c | 16 struct perf_cpu_map *cpus; in test_cpumap() local 24 cpus = perf_cpu_map__dummy_new(); 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__default_new(); 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()
|
/openbmc/linux/arch/riscv/kernel/ |
H A D | sys_riscv.c | 86 const struct cpumask *cpus) in hwprobe_arch_id() argument 92 for_each_cpu(cpu, cpus) { in hwprobe_arch_id() 126 const struct cpumask *cpus) in hwprobe_isa_ext0() argument 145 for_each_cpu(cpu, cpus) { in hwprobe_isa_ext0() 168 static u64 hwprobe_misaligned(const struct cpumask *cpus) in hwprobe_misaligned() argument 173 for_each_cpu(cpu, cpus) { in hwprobe_misaligned() 192 const struct cpumask *cpus) in hwprobe_one_pair() argument 198 hwprobe_arch_id(pair, cpus); in hwprobe_one_pair() 211 hwprobe_isa_ext0(pair, cpus); in hwprobe_one_pair() 215 pair->value = hwprobe_misaligned(cpus); in hwprobe_one_pair() [all …]
|
/openbmc/linux/tools/perf/arch/arm64/util/ |
H A D | header.c | 19 static int _get_cpuid(char *buf, size_t sz, struct perf_cpu_map *cpus) in _get_cpuid() argument 28 cpus = perf_cpu_map__get(cpus); in _get_cpuid() 30 for (cpu = 0; cpu < perf_cpu_map__nr(cpus); cpu++) { in _get_cpuid() 35 sysfs, RC_CHK_ACCESS(cpus)->map[cpu].cpu); in _get_cpuid() 54 perf_cpu_map__put(cpus); in _get_cpuid() 60 struct perf_cpu_map *cpus = perf_cpu_map__new(NULL); in get_cpuid() local 63 if (!cpus) in get_cpuid() 66 ret = _get_cpuid(buf, sz, cpus); in get_cpuid() 68 perf_cpu_map__put(cpus); in get_cpuid() 78 if (!pmu || !pmu->cpus) in get_cpuid_str() [all …]
|
/openbmc/qemu/hw/riscv/ |
H A D | numa.c | 40 int i, first_hartid = ms->smp.cpus; in riscv_socket_first_hartid() 46 for (i = 0; i < ms->smp.cpus; i++) { in riscv_socket_first_hartid() 47 if (ms->possible_cpus->cpus[i].props.node_id != socket_id) { in riscv_socket_first_hartid() 55 return (first_hartid < ms->smp.cpus) ? first_hartid : -1; in riscv_socket_first_hartid() 63 return (!socket_id) ? ms->smp.cpus - 1 : -1; in riscv_socket_last_hartid() 66 for (i = 0; i < ms->smp.cpus; i++) { in riscv_socket_last_hartid() 67 if (ms->possible_cpus->cpus[i].props.node_id != socket_id) { in riscv_socket_last_hartid() 75 return (last_hartid < ms->smp.cpus) ? last_hartid : -1; in riscv_socket_last_hartid() 83 return (!socket_id) ? ms->smp.cpus : -1; in riscv_socket_hart_count() 122 if (ms->possible_cpus->cpus[i].props.node_id != socket_id) { in riscv_socket_check_hartids() [all …]
|
/openbmc/linux/sound/soc/intel/boards/ |
H A D | sof_cs42l42.c | 301 struct snd_soc_dai_link_component *cpus, in create_spk_amp_dai_links() argument 336 links[*id].cpus = &cpus[*id]; in create_spk_amp_dai_links() 339 links[*id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, in create_spk_amp_dai_links() 341 if (!links[*id].cpus->dai_name) { in create_spk_amp_dai_links() 354 struct snd_soc_dai_link_component *cpus, in create_hp_codec_dai_links() argument 374 links[*id].cpus = &cpus[*id]; in create_hp_codec_dai_links() 377 links[*id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, in create_hp_codec_dai_links() 380 if (!links[*id].cpus->dai_name) in create_hp_codec_dai_links() 393 struct snd_soc_dai_link_component *cpus, in create_dmic_dai_links() argument 404 links[*id].cpus = &cpus[*id]; in create_dmic_dai_links() [all …]
|
H A D | sof_ssp_amp.c | 198 struct snd_soc_dai_link_component *cpus; in sof_card_dai_links_create() local 204 cpus = devm_kcalloc(dev, sof_ssp_amp_card.num_links, in sof_card_dai_links_create() 206 if (!links || !cpus) in sof_card_dai_links_create() 220 links[id].cpus = &cpus[id]; in sof_card_dai_links_create() 221 links[id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, in sof_card_dai_links_create() 223 if (!links[id].cpus->dai_name) in sof_card_dai_links_create() 257 links[id].cpus = &cpus[id]; in sof_card_dai_links_create() 259 links[id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d Pin", ssp_codec); in sof_card_dai_links_create() 260 if (!links[id].cpus->dai_name) in sof_card_dai_links_create() 269 links[id].cpus = &cpus[id]; in sof_card_dai_links_create() [all …]
|
H A D | sof_pcm512x.c | 225 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() 256 links[id].cpus = &cpus[id]; in sof_card_dai_links_create() 259 links[id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, in sof_card_dai_links_create() 262 if (!links[id].cpus->dai_name) in sof_card_dai_links_create() 265 links[id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, in sof_card_dai_links_create() 268 if (!links[id].cpus->dai_name) in sof_card_dai_links_create() 277 links[id].cpus = &cpus[id]; in sof_card_dai_links_create() 278 links[id].cpus->dai_name = "DMIC01 Pin"; in sof_card_dai_links_create() [all …]
|
H A D | sof_nau8825.c | 356 struct snd_soc_dai_link_component *cpus; in sof_card_dai_links_create() local 362 cpus = devm_kcalloc(dev, sof_audio_card_nau8825.num_links, in sof_card_dai_links_create() 364 if (!links || !cpus) in sof_card_dai_links_create() 384 links[id].cpus = &cpus[id]; in sof_card_dai_links_create() 387 links[id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, in sof_card_dai_links_create() 390 if (!links[id].cpus->dai_name) in sof_card_dai_links_create() 399 links[id].cpus = &cpus[id]; in sof_card_dai_links_create() 400 links[id].cpus->dai_name = "DMIC01 Pin"; in sof_card_dai_links_create() 405 links[id + 1].cpus = &cpus[id + 1]; in sof_card_dai_links_create() 406 links[id + 1].cpus->dai_name = "DMIC16k Pin"; in sof_card_dai_links_create() [all …]
|
/openbmc/linux/drivers/clk/sunxi/ |
H A 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 …]
|
/openbmc/qemu/hw/alpha/ |
H A D | dp264.c | 53 AlphaCPU *cpus[4]; in clipper_init() local 64 unsigned int smp_cpus = machine->smp.cpus; in clipper_init() 67 memset(cpus, 0, sizeof(cpus)); in clipper_init() 69 cpus[i] = ALPHA_CPU(cpu_create(machine->cpu_type)); in clipper_init() 82 cpus[0]->env.trap_arg0 = ram_size; in clipper_init() 83 cpus[0]->env.trap_arg1 = 0; in clipper_init() 84 cpus[0]->env.trap_arg2 = smp_cpus | (!machine->enable_graphics << 6); in clipper_init() 90 pci_bus = typhoon_init(machine->ram, &isa_irq, &rtc_irq, cpus, in clipper_init() 156 cpus[i]->env.pc = palcode_entry; in clipper_init() 157 cpus[i]->env.palbr = palcode_entry; in clipper_init() [all …]
|
/openbmc/linux/tools/lib/perf/include/perf/ |
H A D | cpumap.h | 34 LIBPERF_API struct perf_cpu perf_cpu_map__cpu(const struct perf_cpu_map *cpus, int idx); 35 LIBPERF_API int perf_cpu_map__nr(const struct perf_cpu_map *cpus); 49 #define perf_cpu_map__for_each_cpu(cpu, idx, cpus) \ argument 50 for ((idx) = 0, (cpu) = perf_cpu_map__cpu(cpus, idx); \ 51 (idx) < perf_cpu_map__nr(cpus); \ 52 (idx)++, (cpu) = perf_cpu_map__cpu(cpus, idx)) 54 #define perf_cpu_map__for_each_idx(idx, cpus) \ argument 55 for ((idx) = 0; (idx) < perf_cpu_map__nr(cpus); (idx)++)
|
/openbmc/linux/tools/perf/util/ |
H A D | perf_api_probe.c | 63 struct perf_cpu_map *cpus; in perf_probe_api() local 67 cpus = perf_cpu_map__new(NULL); 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(NULL); 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()
|
/openbmc/qemu/hw/openrisc/ |
H A D | openrisc_sim.c | 103 static qemu_irq get_cpu_irq(OpenRISCCPU *cpus[], int cpunum, int irq_pin) in get_cpu_irq() argument 105 return qdev_get_gpio_in_named(DEVICE(cpus[cpunum]), "IRQ", irq_pin); in get_cpu_irq() 172 int num_cpus, OpenRISCCPU *cpus[], in openrisc_sim_net_init() argument 193 qdev_connect_gpio_out(splitter, i, get_cpu_irq(cpus, i, irq_pin)); in openrisc_sim_net_init() 197 sysbus_connect_irq(s, 0, get_cpu_irq(cpus, 0, irq_pin)); in openrisc_sim_net_init() 216 OpenRISCCPU *cpus[], int irq_pin) in openrisc_sim_ompic_init() argument 230 sysbus_connect_irq(s, i, get_cpu_irq(cpus, i, irq_pin)); in openrisc_sim_ompic_init() 247 OpenRISCCPU *cpus[], int irq_pin, in openrisc_sim_serial_init() argument 261 qdev_connect_gpio_out(splitter, i, get_cpu_irq(cpus, i, irq_pin)); in openrisc_sim_serial_init() 265 serial_irq = get_cpu_irq(cpus, 0, irq_pin); in openrisc_sim_serial_init() [all …]
|
H A D | virt.c | 103 static qemu_irq get_cpu_irq(OpenRISCCPU *cpus[], int cpunum, int irq_pin) in get_cpu_irq() argument 105 return qdev_get_gpio_in_named(DEVICE(cpus[cpunum]), "IRQ", irq_pin); in get_cpu_irq() 108 static qemu_irq get_per_cpu_irq(OpenRISCCPU *cpus[], int num_cpus, int irq_pin) in get_per_cpu_irq() argument 117 qdev_connect_gpio_out(splitter, i, get_cpu_irq(cpus, i, irq_pin)); in get_per_cpu_irq() 121 return get_cpu_irq(cpus, 0, irq_pin); in get_per_cpu_irq() 201 OpenRISCCPU *cpus[], int irq_pin) in openrisc_virt_ompic_init() argument 215 sysbus_connect_irq(s, i, get_cpu_irq(cpus, i, irq_pin)); in openrisc_virt_ompic_init() 232 OpenRISCCPU *cpus[], int irq_pin) in openrisc_virt_serial_init() argument 236 qemu_irq serial_irq = get_per_cpu_irq(cpus, num_cpus, irq_pin); in openrisc_virt_serial_init() 296 OpenRISCCPU *cpus[], int irq_pin) in openrisc_virt_rtc_init() argument [all …]
|
/openbmc/linux/tools/perf/tests/ |
H A D | openat-syscall-all-cpus.c | 27 struct perf_cpu_map *cpus; in test__openat_syscall_event_on_all_cpus() local 40 cpus = perf_cpu_map__new(NULL); 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 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 = evsel__open_per_cpu(evsel, cpus, -1); 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 = evsel__open_per_cpu(evsel, cpus, -1); in attach__cpu_enabled() 159 perf_cpu_map__put(cpus); in attach__cpu_enabled()
|
/openbmc/linux/drivers/cpufreq/ |
H A D | cpufreq-dt.c | 30 cpumask_var_t cpus; member 50 if (cpumask_test_cpu(cpu, priv->cpus)) in cpufreq_dt_find_data() 129 cpumask_copy(policy->cpus, priv->cpus); in cpufreq_init() 211 if (!zalloc_cpumask_var(&priv->cpus, GFP_KERNEL)) in dt_cpufreq_early_init() 214 cpumask_set_cpu(cpu, priv->cpus); in dt_cpufreq_early_init() 232 ret = dev_pm_opp_of_get_sharing_cpus(cpu_dev, priv->cpus); in dt_cpufreq_early_init() 242 if (dev_pm_opp_get_sharing_cpus(cpu_dev, priv->cpus)) in dt_cpufreq_early_init() 257 ret = dev_pm_opp_of_cpumask_add_table(priv->cpus); in dt_cpufreq_early_init() 276 cpumask_setall(priv->cpus); in dt_cpufreq_early_init() 277 ret = dev_pm_opp_set_sharing_cpus(cpu_dev, priv->cpus); in dt_cpufreq_early_init() [all …]
|
/openbmc/qemu/tests/qtest/ |
H A D | numa-test.c | 85 QList *cpus; in test_query_cpus() local 93 cpus = get_cpus(qts, &resp); in test_query_cpus() 94 g_assert(cpus); in test_query_cpus() 96 while ((e = qlist_pop(cpus))) { in test_query_cpus() 123 QList *cpus; in pc_numa_cpu() local 136 cpus = get_cpus(qts, &resp); in pc_numa_cpu() 137 g_assert(cpus); in pc_numa_cpu() 139 while ((e = qlist_pop(cpus))) { in pc_numa_cpu() 177 QList *cpus; in spapr_numa_cpu() local 189 cpus = get_cpus(qts, &resp); in spapr_numa_cpu() [all …]
|
/openbmc/linux/tools/testing/selftests/cgroup/ |
H A D | test_cpuset_prs.sh | 102 echo $EXPECTED_VAL > cpuset.cpus.partition 104 ACTUAL_VAL=$(cat cpuset.cpus.partition) 115 ACTUAL_VAL=$(cat cpuset.cpus.effective) 142 echo 2-3 > cpuset.cpus 143 TYPE=$(cat cpuset.cpus.partition) 144 [[ $TYPE = member ]] || echo member > cpuset.cpus.partition 173 echo 2-3 > cpuset.cpus 187 echo 2 > cpuset.cpus 191 echo 2-3 > cpuset.cpus 363 PFILE=$CGRP/cpuset.cpus.partition [all …]
|
/openbmc/qemu/hw/intc/ |
H A D | ompic.c | 52 OR1KOMPICCPUState cpus[OMPIC_MAX_CPUS]; member 64 return s->cpus[src_cpu].control; in ompic_read() 66 return s->cpus[src_cpu].status; in ompic_read() 78 s->cpus[src_cpu].control = data; in ompic_write() 83 s->cpus[dst_cpu].status = OMPIC_STATUS_IRQ_PENDING | in ompic_write() 87 qemu_irq_raise(s->cpus[dst_cpu].irq); in ompic_write() 90 s->cpus[src_cpu].status &= ~OMPIC_STATUS_IRQ_PENDING; in ompic_write() 91 qemu_irq_lower(s->cpus[src_cpu].irq); in ompic_write() 127 sysbus_init_irq(sbd, &s->cpus[i].irq); in or1k_ompic_realize() 152 VMSTATE_STRUCT_ARRAY(cpus, OR1KOMPICState, OMPIC_MAX_CPUS, 1,
|
/openbmc/linux/Documentation/devicetree/bindings/csky/ |
H A 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 {
|
/openbmc/linux/include/linux/ |
H A D | stop_machine.h | 114 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()
|
/openbmc/linux/scripts/gdb/linux/ |
H A D | interrupts.py | 8 from linux import cpus 39 for cpu in cpus.each_online_cpu(): 40 any_count += cpus.per_cpu(desc['kstat_irqs'], cpu) 46 for cpu in cpus.each_online_cpu(): 48 count = cpus.per_cpu(desc['kstat_irqs'], cpu) 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 …]
|