/linux/arch/riscv/kernel/ |
H A D | smpboot.c | 46 int cpuid; in smp_prepare_cpus() local 60 for_each_possible_cpu(cpuid) { in smp_prepare_cpus() 61 if (cpuid == curr_cpuid) in smp_prepare_cpus() 63 set_cpu_present(cpuid, true); in smp_prepare_cpus() 64 numa_store_cpu_info(cpuid); in smp_prepare_cpus() 126 int cpuid = 1; in of_parse_and_init_cpus() local 140 if (cpuid >= NR_CPUS) { in of_parse_and_init_cpus() 142 cpuid, hart); in of_parse_and_init_cpus() 146 cpuid_to_hartid_map(cpuid) = hart; in of_parse_and_init_cpus() 147 early_map_cpu_to_node(cpuid, of_node_to_nid(dn)); in of_parse_and_init_cpus() [all …]
|
/linux/drivers/soc/tegra/ |
H A D | flowctrl.c | 51 u32 flowctrl_read_cpu_csr(unsigned int cpuid) in flowctrl_read_cpu_csr() argument 53 u8 offset = flowctrl_offset_cpu_csr[cpuid]; in flowctrl_read_cpu_csr() 62 void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value) in flowctrl_write_cpu_csr() argument 64 return flowctrl_update(flowctrl_offset_cpu_csr[cpuid], value); in flowctrl_write_cpu_csr() 67 void flowctrl_write_cpu_halt(unsigned int cpuid, u32 value) in flowctrl_write_cpu_halt() argument 69 return flowctrl_update(flowctrl_offset_halt_cpu[cpuid], value); in flowctrl_write_cpu_halt() 72 void flowctrl_cpu_suspend_enter(unsigned int cpuid) in flowctrl_cpu_suspend_enter() argument 77 reg = flowctrl_read_cpu_csr(cpuid); in flowctrl_cpu_suspend_enter() 85 reg |= TEGRA20_FLOW_CTRL_CSR_WFE_CPU0 << cpuid; in flowctrl_cpu_suspend_enter() 106 reg |= TEGRA20_FLOW_CTRL_CSR_WFE_CPU0 << cpuid; in flowctrl_cpu_suspend_enter() [all …]
|
/linux/arch/parisc/kernel/ |
H A D | topology.c | 28 void store_cpu_topology(unsigned int cpuid) in store_cpu_topology() argument 30 struct cpu_topology *cpuid_topo = &cpu_topology[cpuid]; in store_cpu_topology() 40 per_cpu(cpu_devices, cpuid).hotpluggable = 1; in store_cpu_topology() 42 if (register_cpu(&per_cpu(cpu_devices, cpuid), cpuid)) in store_cpu_topology() 43 pr_warn("Failed to register CPU%d device", cpuid); in store_cpu_topology() 49 p = &per_cpu(cpu_data, cpuid); in store_cpu_topology() 53 if (cpu == cpuid) /* ignore current cpu */ in store_cpu_topology() 72 update_siblings_masks(cpuid); in store_cpu_topology() 75 cpuid, in store_cpu_topology() 76 cpu_topology[cpuid].core_id, in store_cpu_topology() [all …]
|
H A D | processor.c | 84 unsigned long cpuid; in processor_probe() local 103 cpuid = boot_cpu_data.cpu_count; in processor_probe() 105 cpu_info.cpu_num = cpu_info.cpu_loc = cpuid; in processor_probe() 136 cpuid, cpu_info.cpu_num, cpu_info.cpu_loc, in processor_probe() 155 cpuid = cpu_info.cpu_num; in processor_probe() 161 p = &per_cpu(cpu_data, cpuid); in processor_probe() 165 if (cpuid) in processor_probe() 170 p->cpuid = cpuid; /* save CPU id */ in processor_probe() 175 store_cpu_topology(cpuid); in processor_probe() 182 init_percpu_prof(cpuid); in processor_probe() [all …]
|
H A D | smp.c | 88 ipi_init(int cpuid) in ipi_init() argument 92 if(cpu_online(cpuid) ) in ipi_init() 333 static int smp_boot_one_cpu(int cpuid, struct task_struct *idle) in smp_boot_one_cpu() argument 335 const struct cpuinfo_parisc *p = &per_cpu(cpu_data, cpuid); in smp_boot_one_cpu() 342 memset(&per_cpu(irq_stat, cpuid), 0, sizeof(irq_cpustat_t)); in smp_boot_one_cpu() 347 *per_cpu_ptr(desc->kstat_irqs, cpuid) = (struct irqstat) { }; in smp_boot_one_cpu() 358 cpu_now_booting = cpuid; in smp_boot_one_cpu() 367 printk(KERN_INFO "Releasing cpu %d now, hpa=%lx\n", cpuid, p->hpa); in smp_boot_one_cpu() 387 if(cpu_online(cpuid)) { in smp_boot_one_cpu() 395 printk(KERN_CRIT "SMP: CPU:%d is stuck.\n", cpuid); in smp_boot_one_cpu() [all …]
|
/linux/arch/alpha/kernel/ |
H A D | smp.c | 81 smp_store_cpu_info(int cpuid) in smp_store_cpu_info() argument 83 cpu_data[cpuid].loops_per_jiffy = loops_per_jiffy; in smp_store_cpu_info() 84 cpu_data[cpuid].last_asn = ASN_FIRST_VERSION; in smp_store_cpu_info() 85 cpu_data[cpuid].need_new_asn = 0; in smp_store_cpu_info() 86 cpu_data[cpuid].asn_lock = 0; in smp_store_cpu_info() 93 smp_setup_percpu_timer(int cpuid) in smp_setup_percpu_timer() argument 95 cpu_data[cpuid].prof_counter = 1; in smp_setup_percpu_timer() 96 cpu_data[cpuid].prof_multiplier = 1; in smp_setup_percpu_timer() 100 wait_boot_cpu_to_stop(int cpuid) in wait_boot_cpu_to_stop() argument 110 printk("wait_boot_cpu_to_stop: FAILED on CPU %d, hanging now\n", cpuid); in wait_boot_cpu_to_stop() [all …]
|
H A D | sys_marvel.c | 405 int cpuid = hard_smp_processor_id(); in marvel_smp_callin() local 406 struct io7 *io7 = marvel_find_io7(cpuid); in marvel_smp_callin() 415 printk("Redirecting IO7 interrupts to local CPU at PE %u\n", cpuid); in marvel_smp_callin() 418 io7_redirect_irq(io7, &io7->csrs->HLT_CTL.csr, cpuid); in marvel_smp_callin() 419 io7_redirect_irq(io7, &io7->csrs->HPI_CTL.csr, cpuid); in marvel_smp_callin() 420 io7_redirect_irq(io7, &io7->csrs->CRD_CTL.csr, cpuid); in marvel_smp_callin() 421 io7_redirect_irq(io7, &io7->csrs->STV_CTL.csr, cpuid); in marvel_smp_callin() 422 io7_redirect_irq(io7, &io7->csrs->HEI_CTL.csr, cpuid); in marvel_smp_callin() 426 io7_redirect_one_lsi(io7, i, cpuid); in marvel_smp_callin() 428 io7_redirect_one_lsi(io7, 0x74, cpuid); in marvel_smp_callin() [all …]
|
/linux/include/soc/tegra/ |
H A D | flowctrl.h | 44 u32 flowctrl_read_cpu_csr(unsigned int cpuid); 45 void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value); 46 void flowctrl_write_cpu_halt(unsigned int cpuid, u32 value); 48 void flowctrl_cpu_suspend_enter(unsigned int cpuid); 49 void flowctrl_cpu_suspend_exit(unsigned int cpuid); 51 static inline u32 flowctrl_read_cpu_csr(unsigned int cpuid) in flowctrl_read_cpu_csr() argument 56 static inline void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value) in flowctrl_write_cpu_csr() argument 60 static inline void flowctrl_write_cpu_halt(unsigned int cpuid, u32 value) {} in flowctrl_write_cpu_halt() argument 62 static inline void flowctrl_cpu_suspend_enter(unsigned int cpuid) in flowctrl_cpu_suspend_enter() argument 66 static inline void flowctrl_cpu_suspend_exit(unsigned int cpuid) in flowctrl_cpu_suspend_exit() argument
|
/linux/tools/testing/selftests/kvm/x86_64/ |
H A D | cpuid_test.c | 143 struct kvm_cpuid2 *vcpu_alloc_cpuid(struct kvm_vm *vm, vm_vaddr_t *p_gva, struct kvm_cpuid2 *cpuid) in set_cpuid_after_run() 145 int size = sizeof(*cpuid) + cpuid->nent * sizeof(cpuid->entries[0]); in set_cpuid_after_run() 149 memcpy(guest_cpuids, cpuid, size); in set_cpuid_after_run() 185 struct kvm_cpuid2 *cpuid = allocate_kvm_cpuid2(vcpu->cpuid->nent + 1); in main() 188 vcpu_ioctl(vcpu, KVM_GET_CPUID2, cpuid); in main() 189 TEST_ASSERT(cpuid->nent == vcpu->cpuid in main() 126 vcpu_alloc_cpuid(struct kvm_vm * vm,vm_vaddr_t * p_gva,struct kvm_cpuid2 * cpuid) vcpu_alloc_cpuid() argument 168 struct kvm_cpuid2 *cpuid = allocate_kvm_cpuid2(vcpu->cpuid->nent + 1); test_get_cpuid2() local [all...] |
/linux/tools/perf/arch/loongarch/util/ |
H A D | header.c | 46 char *line, *model, *cpuid; in _get_cpuid() local 53 line = model = cpuid = NULL; in _get_cpuid() 64 if (model && (asprintf(&cpuid, "%s", model) < 0)) in _get_cpuid() 65 cpuid = NULL; in _get_cpuid() 70 return cpuid; in _get_cpuid() 76 char *cpuid = _get_cpuid(); in get_cpuid() local 78 if (!cpuid) in get_cpuid() 81 if (sz < strlen(cpuid)) { in get_cpuid() 86 scnprintf(buffer, sz, "%s", cpuid); in get_cpuid() 89 free(cpuid); in get_cpuid() [all...] |
/linux/arch/sparc/kernel/ |
H A D | sun4d_smp.c | 45 static inline void show_leds(int cpuid) in show_leds() argument 47 cpuid &= 0x1e; in show_leds() 49 "r" ((cpu_leds[cpuid] << 4) | cpu_leds[cpuid+1]), in show_leds() 50 "r" (ECSR_BASE(cpuid) | BB_LEDS), in show_leds() 56 int cpuid = hard_smp_processor_id(); in sun4d_cpu_pre_starting() local 59 cpu_leds[cpuid] = 0x6; in sun4d_cpu_pre_starting() 60 show_leds(cpuid); in sun4d_cpu_pre_starting() 69 int cpuid; in sun4d_cpu_pre_online() local 71 cpuid = hard_smp_processor_id(); in sun4d_cpu_pre_online() 78 sun4d_swap((unsigned long *)&cpu_callin_map[cpuid], 1); in sun4d_cpu_pre_online() [all …]
|
H A D | smp_32.c | 179 int i, cpuid, extra; in smp_prepare_cpus() local 184 for (i = 0; !cpu_find_by_instance(i, NULL, &cpuid); i++) { in smp_prepare_cpus() 185 if (cpuid >= NR_CPUS) in smp_prepare_cpus() 239 int cpuid = hard_smp_processor_id(); in smp_prepare_boot_cpu() local 241 if (cpuid >= NR_CPUS) { in smp_prepare_boot_cpu() 245 if (cpuid != 0) in smp_prepare_boot_cpu() 248 current_thread_info()->cpu = cpuid; in smp_prepare_boot_cpu() 249 set_cpu_online(cpuid, true); in smp_prepare_boot_cpu() 250 set_cpu_possible(cpuid, true); in smp_prepare_boot_cpu() 311 unsigned int cpuid = hard_smp_processor_id(); in arch_cpu_pre_online() local [all …]
|
H A D | sun4d_irq.c | 33 unsigned int cpuid; /* target cpu */ member 195 int cpuid = handler_data->cpuid; in sun4d_mask_irq() local 201 cc_set_imsk_other(cpuid, cc_get_imsk_other(cpuid) | (1 << real_irq)); in sun4d_mask_irq() 213 int cpuid = handler_data->cpuid; in sun4d_unmask_irq() local 220 cc_set_imsk_other(cpuid, cc_get_imsk_other(cpuid) & ~(1 << real_irq)); in sun4d_unmask_irq() 254 int cpuid = cpu_logical_map(1); in sun4d_distribute_irqs() local 256 if (cpuid == -1) in sun4d_distribute_irqs() 257 cpuid = cpu_logical_map(0); in sun4d_distribute_irqs() 261 board_to_cpu[board] = cpuid; in sun4d_distribute_irqs() 262 set_sbi_tid(devid, cpuid << 3); in sun4d_distribute_irqs() [all …]
|
/linux/arch/x86/kernel/ |
H A D | verify_cpu.S | 40 pushfl # standard way to check for cpuid 49 jz .Lverify_cpu_no_longmode # cpu has no cpuid 52 movl $0x0,%eax # See if cpuid 1 is implemented 53 cpuid 55 jb .Lverify_cpu_no_longmode # no cpuid 1 78 cpuid 101 cpuid 106 movl $0x80000000,%eax # See if extended cpuid is implemented 107 cpuid 109 jb .Lverify_cpu_no_longmode # no extended cpuid [all …]
|
/linux/tools/perf/arch/riscv/util/ |
H A D | header.c | 42 char *cpuid = NULL; in _get_cpuid() local 49 return cpuid; in _get_cpuid() 72 if (asprintf(&cpuid, "%s-%s-%s", mvendorid, marchid, mimpid) < 0) in _get_cpuid() 73 cpuid = NULL; in _get_cpuid() 81 return cpuid; in _get_cpuid() 86 char *cpuid = _get_cpuid(); in get_cpuid() local 89 if (sz < strlen(cpuid)) { in get_cpuid() 94 scnprintf(buffer, sz, "%s", cpuid); in get_cpuid() 96 free(cpuid); in get_cpuid()
|
/linux/arch/arm/kernel/ |
H A D | topology.c | 177 static inline void update_cpu_capacity(unsigned int cpuid) {} in update_cpu_capacity() argument 185 void store_cpu_topology(unsigned int cpuid) in store_cpu_topology() argument 187 struct cpu_topology *cpuid_topo = &cpu_topology[cpuid]; in store_cpu_topology() 224 update_cpu_capacity(cpuid); in store_cpu_topology() 227 cpuid, cpu_topology[cpuid].thread_id, in store_cpu_topology() 228 cpu_topology[cpuid].core_id, in store_cpu_topology() 229 cpu_topology[cpuid].package_id, mpidr); in store_cpu_topology() 232 update_siblings_masks(cpuid); in store_cpu_topology()
|
/linux/tools/testing/selftests/kvm/lib/x86_64/ |
H A D | hyperv.c | 13 static struct kvm_cpuid2 *cpuid; in kvm_get_supported_hv_cpuid() local 16 if (cpuid) in kvm_get_supported_hv_cpuid() 17 return cpuid; in kvm_get_supported_hv_cpuid() 19 cpuid = allocate_kvm_cpuid2(MAX_NR_CPUID_ENTRIES); in kvm_get_supported_hv_cpuid() 22 kvm_ioctl(kvm_fd, KVM_GET_SUPPORTED_HV_CPUID, cpuid); in kvm_get_supported_hv_cpuid() 25 return cpuid; in kvm_get_supported_hv_cpuid() 63 struct kvm_cpuid2 *cpuid = allocate_kvm_cpuid2(MAX_NR_CPUID_ENTRIES); in vcpu_get_supported_hv_cpuid() local 65 vcpu_ioctl(vcpu, KVM_GET_SUPPORTED_HV_CPUID, cpuid); in vcpu_get_supported_hv_cpuid() 67 return cpuid; in vcpu_get_supported_hv_cpuid()
|
H A D | processor.c | 727 if (vcpu->cpuid) in __kvm_cpu_has() argument 728 free(vcpu->cpuid); in __kvm_cpu_has() 751 static uint32_t __kvm_cpu_has(const struct kvm_cpuid2 *cpuid, in kvm_cpuid_has() 758 for (i = 0; i < cpuid->nent; i++) { in kvm_cpuid_property() 759 entry = &cpuid->entries[i]; in kvm_cpuid_property() 773 bool kvm_cpuid_has(const struct kvm_cpuid2 *cpuid, in kvm_get_feature_msr() 776 return __kvm_cpu_has(cpuid, feature.function, feature.index, in kvm_get_feature_msr() 780 uint32_t kvm_cpuid_property(const struct kvm_cpuid2 *cpuid, in kvm_get_feature_msr() 783 return __kvm_cpu_has(cpuid, property.function, property.index, in __vm_xsave_require_permission() 844 void vcpu_init_cpuid(struct kvm_vcpu *vcpu, const struct kvm_cpuid2 *cpuid) in vcpu_set_cpuid_property() 749 kvm_cpuid_has(const struct kvm_cpuid2 * cpuid,struct kvm_x86_cpu_feature feature) kvm_cpuid_has() argument 756 kvm_cpuid_property(const struct kvm_cpuid2 * cpuid,struct kvm_x86_cpu_property property) kvm_cpuid_property() argument 820 vcpu_init_cpuid(struct kvm_vcpu * vcpu,const struct kvm_cpuid2 * cpuid) vcpu_init_cpuid() argument 1146 get_cpuid_entry(const struct kvm_cpuid2 * cpuid,uint32_t function,uint32_t index) get_cpuid_entry() argument [all...] |
/linux/tools/perf/pmu-events/ |
H A D | empty-pmu-events.c | 232 * cpuid field, which is an arch-specific identifier for the CPU. 236 * The cpuid can contain any character other than the comma. 240 const char *cpuid; 252 .cpuid = "common", 261 .cpuid = "testcpu", in decompress_event() 273 .cpuid = 0, in decompress_event() 514 char *cpuid; 518 char *cpuid = NULL; in perf_pmu__find_events_table() 524 cpuid = get_cpuid_allow_env_override(cpu); in perf_pmu__find_events_table() 527 * On some platforms which uses cpus map, cpuid ca in perf_pmu__find_events_table() 203 const char *cpuid; global() member 468 char *cpuid; map_for_pmu() member 472 char *cpuid = NULL; map_for_pmu() local 555 find_core_events_table(const char * arch,const char * cpuid) find_core_events_table() argument 566 find_core_metrics_table(const char * arch,const char * cpuid) find_core_metrics_table() argument [all...] |
/linux/arch/x86/kernel/cpu/ |
H A D | transmeta.c | 37 cpuid(0x80860001, &dummy, &cpu_rev, &cpu_freq, &cpu_flags); in init_transmeta() 48 cpuid(0x80860002, &new_cpu_rev, &cms_rev1, &cms_rev2, &dummy); in init_transmeta() 61 cpuid(0x80860003, in init_transmeta() 66 cpuid(0x80860004, in init_transmeta() 71 cpuid(0x80860005, in init_transmeta() 76 cpuid(0x80860006, in init_transmeta()
|
/linux/arch/loongarch/include/asm/ |
H A D | numa.h | 39 extern void __init early_numa_add_cpu(int cpuid, s16 node); 47 static inline void set_cpuid_to_node(int cpuid, s16 node) in set_cpuid_to_node() argument 49 __cpuid_to_node[cpuid] = node; in set_cpuid_to_node() 56 static inline void early_numa_add_cpu(int cpuid, s16 node) { } in early_numa_add_cpu() argument 59 static inline void set_cpuid_to_node(int cpuid, s16 node) { } in set_cpuid_to_node() argument
|
/linux/lib/zstd/common/ |
H A D | cpu.h | 82 ZSTD_cpuid_t cpuid; in ZSTD_cpuid() local 83 cpuid.f1c = f1c; in ZSTD_cpuid() 84 cpuid.f1d = f1d; in ZSTD_cpuid() 85 cpuid.f7b = f7b; in ZSTD_cpuid() 86 cpuid.f7c = f7c; in ZSTD_cpuid() 87 return cpuid; in ZSTD_cpuid() 92 MEM_STATIC int ZSTD_cpuid_##name(ZSTD_cpuid_t const cpuid) { \ 93 return ((cpuid.r) & (1U << bit)) != 0; \
|
/linux/arch/x86/boot/ |
H A D | cpuflags.c | 75 #define cpuid(id, a, b, c, d) cpuid_count(id, 0, a, b, c, d) macro 91 cpuid(0x0, &max_intel_level, &cpu_vendor[0], &cpu_vendor[2], in get_cpuflags() 96 cpuid(0x1, &tfms, &ignored, &cpu.flags[4], in get_cpuflags() 110 cpuid(0x80000000, &max_amd_level, &ignored, &ignored, in get_cpuflags() 115 cpuid(0x80000001, &ignored, &ignored, &cpu.flags[6], in get_cpuflags()
|
/linux/drivers/perf/ |
H A D | arm_pmu_acpi.c | 251 unsigned long cpuid = read_cpuid_id(); in arm_pmu_acpi_find_pmu() local 257 if (!pmu || pmu->acpi_cpuid != cpuid) in arm_pmu_acpi_find_pmu() 340 unsigned long cpuid) in arm_pmu_acpi_probe_matching_cpus() argument 347 if (cpu_cpuid == cpuid) in arm_pmu_acpi_probe_matching_cpus() 383 unsigned long cpuid; in arm_pmu_acpi_probe() local 397 cpuid = per_cpu(cpu_data, cpu).reg_midr; in arm_pmu_acpi_probe() 398 pmu->acpi_cpuid = cpuid; in arm_pmu_acpi_probe() 400 arm_pmu_acpi_probe_matching_cpus(pmu, cpuid); in arm_pmu_acpi_probe()
|
/linux/arch/x86/kvm/ |
H A D | cpuid.h | 19 int kvm_dev_ioctl_get_cpuid(struct kvm_cpuid2 *cpuid, 23 struct kvm_cpuid *cpuid, 26 struct kvm_cpuid2 *cpuid, 29 struct kvm_cpuid2 *cpuid, 73 const struct cpuid_reg cpuid = x86_feature_cpuid(x86_feature); in guest_cpuid_get_register() local 76 entry = kvm_find_cpuid_entry_index(vcpu, cpuid.function, cpuid.index); in guest_cpuid_get_register() 80 return __cpuid_entry_get_reg(entry, cpuid.reg); in guest_cpuid_get_register()
|