| /kernel/linux/linux-6.6/arch/riscv/kernel/ |
| D | smpboot.c | 51 int cpuid; in smp_prepare_cpus() local 66 for_each_possible_cpu(cpuid) { in smp_prepare_cpus() 67 if (cpuid == curr_cpuid) in smp_prepare_cpus() 69 if (cpu_ops[cpuid]->cpu_prepare) { in smp_prepare_cpus() 70 ret = cpu_ops[cpuid]->cpu_prepare(cpuid); in smp_prepare_cpus() 74 set_cpu_present(cpuid, true); in smp_prepare_cpus() 75 numa_store_cpu_info(cpuid); in smp_prepare_cpus() 128 int cpuid; in acpi_parse_and_init_cpus() local 134 for (cpuid = 1; cpuid < nr_cpu_ids; cpuid++) { in acpi_parse_and_init_cpus() 135 if (cpuid_to_hartid_map(cpuid) != INVALID_HARTID) { in acpi_parse_and_init_cpus() [all …]
|
| /kernel/linux/linux-5.10/arch/riscv/kernel/ |
| D | smpboot.c | 46 int cpuid; in smp_prepare_cpus() local 55 for_each_possible_cpu(cpuid) { in smp_prepare_cpus() 56 if (cpuid == smp_processor_id()) in smp_prepare_cpus() 58 if (cpu_ops[cpuid]->cpu_prepare) { in smp_prepare_cpus() 59 ret = cpu_ops[cpuid]->cpu_prepare(cpuid); in smp_prepare_cpus() 63 set_cpu_present(cpuid, true); in smp_prepare_cpus() 72 int cpuid = 1; in setup_smp() local 86 if (cpuid >= NR_CPUS) { in setup_smp() 87 pr_warn("Invalid cpuid [%d] for hartid [%d]\n", in setup_smp() 88 cpuid, hart); in setup_smp() [all …]
|
| /kernel/linux/linux-6.6/tools/testing/selftests/kvm/x86_64/ |
| D | cpuid_test.c | 5 * Generic tests for KVM CPUID set/get ioctls 79 "CPUID nent mismatch: %d vs. %d", cpuid1->nent, cpuid2->nent); in compare_cpuids() 87 "CPUID entries[%d] mismtach: 0x%x.%d.%x vs. 0x%x.%d.%x\n", in compare_cpuids() 96 "CPUID 0x%x.%x differ: 0x%x:0x%x:0x%x:0x%x vs 0x%x:0x%x:0x%x:0x%x", in compare_cpuids() 126 struct kvm_cpuid2 *vcpu_alloc_cpuid(struct kvm_vm *vm, vm_vaddr_t *p_gva, struct kvm_cpuid2 *cpuid) in vcpu_alloc_cpuid() argument 128 int size = sizeof(*cpuid) + cpuid->nent * sizeof(cpuid->entries[0]); in vcpu_alloc_cpuid() 132 memcpy(guest_cpuids, cpuid, size); in vcpu_alloc_cpuid() 144 /* Setting unmodified CPUID is allowed */ in set_cpuid_after_run() 146 TEST_ASSERT(!rc, "Setting unmodified CPUID after KVM_RUN failed: %d", rc); in set_cpuid_after_run() 168 struct kvm_cpuid2 *cpuid = allocate_kvm_cpuid2(vcpu->cpuid->nent + 1); in test_get_cpuid2() local [all …]
|
| /kernel/linux/linux-6.6/arch/sparc/kernel/ |
| D | prom_64.c | 389 * 'portid', or 'cpuid' property. in arch_find_n_match_cpu_physical_id() 406 mid_prop = "cpuid"; in arch_find_n_match_cpu_physical_id() 441 int cpuid = of_getintprop_default(dp, mid_prop, -1); in of_iterate_over_cpus() local 445 if (cpuid < 0) { in of_iterate_over_cpus() 446 this_mid_prop = "cpuid"; in of_iterate_over_cpus() 447 cpuid = of_getintprop_default(dp, this_mid_prop, -1); in of_iterate_over_cpus() 449 if (cpuid < 0) { in of_iterate_over_cpus() 455 if (cpuid >= NR_CPUS) { in of_iterate_over_cpus() 458 cpuid, NR_CPUS); in of_iterate_over_cpus() 462 ret = func(dp, cpuid, arg); in of_iterate_over_cpus() [all …]
|
| /kernel/linux/linux-5.10/arch/sparc/kernel/ |
| D | prom_64.c | 389 * 'portid', or 'cpuid' property. in arch_find_n_match_cpu_physical_id() 406 mid_prop = "cpuid"; in arch_find_n_match_cpu_physical_id() 441 int cpuid = of_getintprop_default(dp, mid_prop, -1); in of_iterate_over_cpus() local 445 if (cpuid < 0) { in of_iterate_over_cpus() 446 this_mid_prop = "cpuid"; in of_iterate_over_cpus() 447 cpuid = of_getintprop_default(dp, this_mid_prop, -1); in of_iterate_over_cpus() 449 if (cpuid < 0) { in of_iterate_over_cpus() 455 if (cpuid >= NR_CPUS) { in of_iterate_over_cpus() 458 cpuid, NR_CPUS); in of_iterate_over_cpus() 462 ret = func(dp, cpuid, arg); in of_iterate_over_cpus() [all …]
|
| /kernel/linux/linux-6.6/lib/zstd/common/ |
| D | cpu.h | 15 * Implementation taken from folly/CpuId.h 16 * https://github.com/facebook/folly/blob/master/folly/CpuId.h 35 /* The following block like the normal cpuid branch below, but gcc in ZSTD_cpuid() 42 "cpuid\n\t" in ZSTD_cpuid() 51 "cpuid\n\t" in ZSTD_cpuid() 59 "cpuid\n\t" in ZSTD_cpuid() 68 __asm__("cpuid" : "=a"(n) : "a"(0) : "ebx", "ecx", "edx"); in ZSTD_cpuid() 71 __asm__("cpuid" : "=a"(f1a), "=c"(f1c), "=d"(f1d) : "a"(1) : "ebx"); in ZSTD_cpuid() 75 __asm__("cpuid" in ZSTD_cpuid() 82 ZSTD_cpuid_t cpuid; in ZSTD_cpuid() local [all …]
|
| /kernel/linux/linux-5.10/arch/parisc/kernel/ |
| D | topology.c | 30 static void update_siblings_masks(unsigned int cpuid) in update_siblings_masks() argument 32 struct cputopo_parisc *cpu_topo, *cpuid_topo = &cpu_topology[cpuid]; in update_siblings_masks() 42 cpumask_set_cpu(cpuid, &cpu_topo->core_sibling); in update_siblings_masks() 43 if (cpu != cpuid) in update_siblings_masks() 49 cpumask_set_cpu(cpuid, &cpu_topo->thread_sibling); in update_siblings_masks() 50 if (cpu != cpuid) in update_siblings_masks() 63 void __init store_cpu_topology(unsigned int cpuid) in store_cpu_topology() argument 65 struct cputopo_parisc *cpuid_topo = &cpu_topology[cpuid]; in store_cpu_topology() 78 p = &per_cpu(cpu_data, cpuid); in store_cpu_topology() 82 if (cpu == cpuid) /* ignore current cpu */ in store_cpu_topology() [all …]
|
| D | processor.c | 82 unsigned long cpuid; in processor_probe() local 101 cpuid = boot_cpu_data.cpu_count; in processor_probe() 103 cpu_info.cpu_num = cpu_info.cpu_loc = cpuid; in processor_probe() 134 cpuid, cpu_info.cpu_num, cpu_info.cpu_loc, in processor_probe() 139 /* We need contiguous numbers for cpuid. Firmware's notion in processor_probe() 140 * of cpuid is for physical CPUs and we just don't care yet. in processor_probe() 153 cpuid = cpu_info.cpu_num; in processor_probe() 159 p = &per_cpu(cpu_data, cpuid); in processor_probe() 163 if (cpuid) in processor_probe() 168 p->cpuid = cpuid; /* save CPU id */ in processor_probe() [all …]
|
| /kernel/linux/linux-6.6/arch/parisc/kernel/ |
| 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 …]
|
| 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() 141 /* We need contiguous numbers for cpuid. Firmware's notion in processor_probe() 142 * of cpuid is for physical CPUs and we just don't care yet. 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() [all …]
|
| /kernel/linux/linux-6.6/include/soc/tegra/ |
| 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
|
| /kernel/linux/linux-5.10/include/soc/tegra/ |
| 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
|
| /kernel/linux/linux-6.6/tools/perf/pmu-events/ |
| D | empty-pmu-events.c | 198 * cpuid field, which is an arch-specific identifier for the CPU. 202 * The cpuid can contain any character other than the comma. 206 const char *cpuid; member 218 .cpuid = "testcpu", 224 .cpuid = 0, 330 char *cpuid = perf_pmu__getcpuid(pmu); in perf_pmu__find_events_table() local 333 /* on some platforms which uses cpus map, cpuid can be NULL for in perf_pmu__find_events_table() 336 if (!cpuid) in perf_pmu__find_events_table() 343 if (!map->cpuid) in perf_pmu__find_events_table() 346 if (!strcmp_cpuid_str(map->cpuid, cpuid)) { in perf_pmu__find_events_table() [all …]
|
| /kernel/linux/linux-6.6/arch/x86/boot/compressed/ |
| D | mem_encrypt.S | 23 movl $0x80000000, %eax /* CPUID to check the highest leaf */ 24 cpuid 30 * CPUID Fn8000_001F[EAX] - Bit 1 31 * CPUID Fn8000_001F[EBX] - Bits 5:0 35 cpuid 57 * sev_es_req_cpuid - Request a CPUID value from the Hypervisor using 61 * @%edx: CPUID Function 64 * %edx returns CPUID value on success 99 /* Keep CPUID function in %ebx */ 106 movl $0, %eax # Request CPUID[fn].EAX [all …]
|
| /kernel/linux/linux-6.6/drivers/soc/tegra/ |
| 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 …]
|
| /kernel/linux/linux-5.10/drivers/soc/tegra/ |
| 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 …]
|
| /kernel/linux/linux-6.6/arch/x86/include/asm/ |
| D | cpuid.h | 3 * CPUID-related helpers/definitions 34 asm volatile("cpuid" in native_cpuid() 54 * Native CPUID functions returning a single datum. 68 * Generic CPUID function in native_cpuid_reg() 72 static inline void cpuid(unsigned int op, in native_cpuid_reg() 81 /* Some CPUID calls want 'count' to be placed in ecx */ 92 * CPUID functions returning a single datum 98 cpuid(op, &eax, &ebx, &ecx, &edx); in cpuid_eax() 107 cpuid(op, &eax, &ebx, &ecx, &edx); in cpuid_ebx() 116 cpuid(op, &eax, &ebx, &ecx, &edx); in cpuid_ecx() [all …]
|
| /kernel/linux/linux-5.10/arch/x86/kernel/ |
| 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 …]
|
| D | cpuid.c | 9 * x86 CPUID access device 11 * This device is accessed by lseek() to the appropriate CPUID level 19 * This driver uses /dev/cpu/%d/cpuid where %d is the minor number, and on 113 return -EIO; /* CPUID not supported */ in cpuid_open() 145 return kasprintf(GFP_KERNEL, "cpu/%u/cpuid", MINOR(dev->devt)); in cpuid_devnode() 153 "cpu/cpuid", &cpuid_fops)) { in cpuid_init() 154 printk(KERN_ERR "cpuid: unable to get major %d for cpuid\n", in cpuid_init() 158 cpuid_class = class_create(THIS_MODULE, "cpuid"); in cpuid_init() 165 err = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "x86/cpuid:online", in cpuid_init() 176 __unregister_chrdev(CPUID_MAJOR, 0, NR_CPUS, "cpu/cpuid"); in cpuid_init() [all …]
|
| /kernel/linux/linux-6.6/arch/x86/kernel/ |
| 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 …]
|
| /kernel/liteos_a/kernel/base/core/ |
| D | los_swtmr.c | 47 STATIC INLINE UINT64 SwtmrToStart(SWTMR_CTRL_S *swtmr, UINT16 cpuid); 127 STATIC INLINE VOID SwtmrDebugDataStart(SWTMR_CTRL_S *swtmr, UINT16 cpuid) in SwtmrDebugDataStart() argument 133 data->cpuid = cpuid; in SwtmrDebugDataStart() 288 STATIC UINT32 SwtmrTaskCreate(UINT16 cpuid, UINT32 *swtmrTaskID) in SwtmrTaskCreate() argument 300 swtmrTask.usCpuAffiMask = CPUID_TO_AFFI_MASK(cpuid); in SwtmrTaskCreate() 310 UINT32 OsSwtmrTaskIDGetByCpuid(UINT16 cpuid) in OsSwtmrTaskIDGetByCpuid() argument 312 return g_swtmrRunqueue[cpuid].swtmrTask->taskID; in OsSwtmrTaskIDGetByCpuid() 376 UINT32 cpuid = ArchCurrCpuid(); in OsSwtmrInit() local 379 if (cpuid == 0) { in OsSwtmrInit() 386 ret = SwtmrTaskCreate(cpuid, &swtmrTaskID); in OsSwtmrInit() [all …]
|
| /kernel/linux/linux-5.10/arch/alpha/kernel/ |
| D | smp.c | 68 /* Set to a secondary's cpuid when it comes online. */ 80 smp_store_cpu_info(int cpuid) in smp_store_cpu_info() argument 82 cpu_data[cpuid].loops_per_jiffy = loops_per_jiffy; in smp_store_cpu_info() 83 cpu_data[cpuid].last_asn = ASN_FIRST_VERSION; in smp_store_cpu_info() 84 cpu_data[cpuid].need_new_asn = 0; in smp_store_cpu_info() 85 cpu_data[cpuid].asn_lock = 0; in smp_store_cpu_info() 92 smp_setup_percpu_timer(int cpuid) in smp_setup_percpu_timer() argument 94 cpu_data[cpuid].prof_counter = 1; in smp_setup_percpu_timer() 95 cpu_data[cpuid].prof_multiplier = 1; in smp_setup_percpu_timer() 99 wait_boot_cpu_to_stop(int cpuid) in wait_boot_cpu_to_stop() argument [all …]
|
| /kernel/linux/linux-6.6/arch/alpha/kernel/ |
| D | smp.c | 68 /* Set to a secondary's cpuid when it comes online. */ 80 smp_store_cpu_info(int cpuid) in smp_store_cpu_info() argument 82 cpu_data[cpuid].loops_per_jiffy = loops_per_jiffy; in smp_store_cpu_info() 83 cpu_data[cpuid].last_asn = ASN_FIRST_VERSION; in smp_store_cpu_info() 84 cpu_data[cpuid].need_new_asn = 0; in smp_store_cpu_info() 85 cpu_data[cpuid].asn_lock = 0; in smp_store_cpu_info() 92 smp_setup_percpu_timer(int cpuid) in smp_setup_percpu_timer() argument 94 cpu_data[cpuid].prof_counter = 1; in smp_setup_percpu_timer() 95 cpu_data[cpuid].prof_multiplier = 1; in smp_setup_percpu_timer() 99 wait_boot_cpu_to_stop(int cpuid) in wait_boot_cpu_to_stop() argument [all …]
|
| /kernel/liteos_a/kernel/base/misc/ |
| D | los_stackinfo.c | 65 UINT32 cpuid; in OsExcStackCheck() local 72 for (cpuid = 0; cpuid < LOSCFG_KERNEL_CORE_NUM; cpuid++) { in OsExcStackCheck() 73 …stackTop = (UINTPTR *)((UINTPTR)g_stackInfo[index].stackTop + cpuid * g_stackInfo[index].stackSize… in OsExcStackCheck() 76 … LOSCFG_KERNEL_CORE_NUM - 1 - cpuid, g_stackInfo[index].stackName, *stackTop); in OsExcStackCheck() 85 UINT32 cpuid; in OsExcStackInfo() local 98 for (cpuid = 0; cpuid < LOSCFG_KERNEL_CORE_NUM; cpuid++) { in OsExcStackInfo() 99 …stackTop = (UINTPTR *)((UINTPTR)g_stackInfo[index].stackTop + cpuid * g_stackInfo[index].stackSize… in OsExcStackInfo() 104 … LOSCFG_KERNEL_CORE_NUM - 1 - cpuid, stackTop, g_stackInfo[index].stackSize, size); in OsExcStackInfo()
|
| /kernel/linux/linux-6.6/tools/perf/arch/riscv/util/ |
| 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()
|