| /linux/Documentation/arch/x86/ |
| H A D | topology.rst | 68 The physical ID of the package. This information is retrieved via CPUID 148 specific CPUID leaves which enumerate the processor topology and the cache 151 The CPUID leaves in their preferred order of parsing for each x86 vendor is as 156 1) CPUID leaf 0x80000026 [Extended CPU Topology] (Core::X86::Cpuid::ExCpuTopology) 158 The extended CPUID leaf 0x80000026 is the extension of the CPUID leaf 0xB 163 CPUID level is >= 0x80000026 and then checking if `LogProcAtThisLevel` 174 CPUID leaf 0x80000026 also provides more information regarding the power 178 If CPUID leaf 0x80000026 is supported, further parsing is not required. 180 2) CPUID leaf 0x0000000B [Extended Topology Enumeration] (Core::X86::Cpuid::ExtTopEnum) 182 The extended CPUID leaf 0x0000000B is the predecessor on the extended [all …]
|
| H A D | cpuinfo.rst | 19 CPUID to find out what the target machine supports and what not. 23 said CPU supports CPUID faulting - userspace can simply probe for the 32 kernel has *enabled* and *supports*. As in: the CPUID feature flag is 64 tools/arch/x86/kcpuid and cpuid(1). 73 unlikely. KVM can synthesize the CPUID bit and the KVM guest can simply 74 query CPUID and figure out what the hypervisor supports and what not. As 82 Feature flags can be derived from the contents of CPUID leaves 85 These feature definitions are organized mirroring the layout of CPUID 93 Flags can be from scattered CPUID-based features 96 Hardware features enumerated in sparsely populated CPUID leaves get [all …]
|
| /linux/tools/testing/selftests/kvm/x86/ |
| H A D | cpuid_test.c | 5 * Generic tests for KVM CPUID set/get ioctls 73 * CPUID.0xD.{0,1}.EBX enumerate XSAVE size based on the current in get_const_cpuid_mask() 90 "CPUID nent mismatch: %d vs. %d", cpuid1->nent, cpuid2->nent); in compare_cpuids() 100 "CPUID entries[%d] mismtach: 0x%x.%d.%x vs. 0x%x.%d.%x", in compare_cpuids() 111 "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() 143 struct kvm_cpuid2 *vcpu_alloc_cpuid(struct kvm_vm *vm, gva_t *p_gva, struct kvm_cpuid2 *cpuid) in vcpu_alloc_cpuid() argument 145 int size = sizeof(*cpuid) + cpuid->nent * sizeof(cpuid->entries[0]); in vcpu_alloc_cpuid() 149 memcpy(guest_cpuids, cpuid, size); in vcpu_alloc_cpuid() 162 /* Setting unmodified CPUID is allowed */ in set_cpuid_after_run() 164 TEST_ASSERT(!rc, "Setting unmodified CPUID after KVM_RUN failed: %d", rc); in set_cpuid_after_run() [all …]
|
| /linux/lib/zstd/common/ |
| H A D | cpu.h | 16 * Implementation taken from folly/CpuId.h 17 * https://github.com/facebook/folly/blob/master/folly/CpuId.h 36 /* The following block like the normal cpuid branch below, but gcc in ZSTD_cpuid() 43 "cpuid\n\t" in ZSTD_cpuid() 52 "cpuid\n\t" in ZSTD_cpuid() 60 "cpuid\n\t" in ZSTD_cpuid() 69 __asm__("cpuid" : "=a"(n) : "a"(0) : "ebx", "ecx", "edx"); in ZSTD_cpuid() 72 __asm__("cpuid" : "=a"(f1a), "=c"(f1c), "=d"(f1d) : "a"(1) : "ebx"); in ZSTD_cpuid() 76 __asm__("cpuid" in ZSTD_cpuid() 83 ZSTD_cpuid_t cpuid; in ZSTD_cpuid() local [all …]
|
| /linux/arch/riscv/kernel/ |
| H A D | smpboot.c | 48 int cpuid; in smp_prepare_cpus() local 62 for_each_possible_cpu(cpuid) { in smp_prepare_cpus() 63 if (cpuid == curr_cpuid) in smp_prepare_cpus() 65 set_cpu_present(cpuid, true); in smp_prepare_cpus() 66 numa_store_cpu_info(cpuid); in smp_prepare_cpus() 128 int cpuid = 1; in of_parse_and_init_cpus() local 142 if (cpuid >= NR_CPUS) { in of_parse_and_init_cpus() 143 pr_warn("Invalid cpuid [%d] for hartid [%lu]\n", in of_parse_and_init_cpus() 144 cpuid, hart); in of_parse_and_init_cpus() 148 cpuid_to_hartid_map(cpuid) = hart; in of_parse_and_init_cpus() [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() 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 …]
|
| /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/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/x86/boot/compressed/ |
| H A 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 …]
|
| /linux/drivers/dma/ |
| H A D | cv1800b-dmamux.c | 47 #define DMAMUX_INT_BIT(chid, cpuid) \ argument 48 BIT((cpuid) * DMAMUX_INT_BIT_PER_CPU + (chid)) 49 #define DMAMUX_INTEN_BIT(cpuid) \ argument 50 DMAMUX_INT_BIT(8, cpuid) 51 #define DMAMUX_INT_CH_BIT(chid, cpuid) \ argument 52 (DMAMUX_INT_BIT(chid, cpuid) | DMAMUX_INTEN_BIT(cpuid)) 57 #define DMAMUX_INT_CH_MASK(chid, cpuid) \ argument 58 (DMAMUX_INT_MASK(chid) | DMAMUX_INTEN_BIT(cpuid)) 104 unsigned int chid, devid, cpuid; in cv1800_dmamux_route_allocate() local 113 cpuid = dma_spec->args[1]; in cv1800_dmamux_route_allocate() [all …]
|
| /linux/tools/testing/selftests/kvm/lib/x86/ |
| 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() 44 /* Need to skip KVM CPUID leaves 0x400000xx */ in vcpu_set_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()
|
| /linux/arch/alpha/kernel/ |
| H A D | smp.c | 69 /* Set to a secondary's cpuid when it comes online. */ 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 [all …]
|
| /linux/tools/perf/util/ |
| H A D | disasm.h | 111 const struct arch *arch__find(uint16_t e_machine, uint32_t e_flags, const char *cpuid); 125 const struct arch *arch__new_arc(const struct e_machine_and_e_flags *id, const char *cpuid); 126 const struct arch *arch__new_arm(const struct e_machine_and_e_flags *id, const char *cpuid); 127 const struct arch *arch__new_arm64(const struct e_machine_and_e_flags *id, const char *cpuid); 128 const struct arch *arch__new_csky(const struct e_machine_and_e_flags *id, const char *cpuid); 129 const struct arch *arch__new_loongarch(const struct e_machine_and_e_flags *id, const char *cpuid); 130 const struct arch *arch__new_mips(const struct e_machine_and_e_flags *id, const char *cpuid); 131 const struct arch *arch__new_powerpc(const struct e_machine_and_e_flags *id, const char *cpuid); 132 const struct arch *arch__new_riscv64(const struct e_machine_and_e_flags *id, const char *cpuid); 133 const struct arch *arch__new_s390(const struct e_machine_and_e_flags *id, const char *cpuid); [all...] |
| /linux/drivers/firmware/imx/ |
| H A D | sm-cpu.c | 16 int scmi_imx_cpu_reset_vector_set(u32 cpuid, u64 vector, bool start, bool boot, in scmi_imx_cpu_reset_vector_set() argument 22 return imx_cpu_ops->cpu_reset_vector_set(ph, cpuid, vector, start, in scmi_imx_cpu_reset_vector_set() 27 int scmi_imx_cpu_start(u32 cpuid, bool start) in scmi_imx_cpu_start() argument 33 return imx_cpu_ops->cpu_start(ph, cpuid, true); in scmi_imx_cpu_start() 35 return imx_cpu_ops->cpu_start(ph, cpuid, false); in scmi_imx_cpu_start() 39 int scmi_imx_cpu_started(u32 cpuid, bool *started) in scmi_imx_cpu_started() argument 47 return imx_cpu_ops->cpu_started(ph, cpuid, started); in scmi_imx_cpu_started()
|
| /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 | 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 …]
|
| 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 …]
|
| /linux/include/uapi/misc/ |
| H A D | amd-apml.h | 30 * CPUID input 31 * [0]...[3] cpuid func, 32 * [4][5] cpuid: thread 33 * [6] cpuid: ext function & read eax/ebx or ecx/edx 36 * CPUID output 40 * Status code for CPUID read 110 * The IOCTL provides userspace access to AMD sideband cpuid protocol 111 * - CPUID protocol to get CPU details for Function/Ext Function
|
| /linux/arch/loongarch/include/asm/ |
| H A D | numa.h | 25 extern void __init early_numa_add_cpu(int cpuid, s16 node); 33 static inline void set_cpuid_to_node(int cpuid, s16 node) in set_cpuid_to_node() argument 35 __cpuid_to_node[cpuid] = node; in set_cpuid_to_node() 42 static inline void early_numa_add_cpu(int cpuid, s16 node) { } in early_numa_add_cpu() argument 45 static inline void set_cpuid_to_node(int cpuid, s16 node) { } in set_cpuid_to_node() argument
|
| /linux/drivers/firmware/psci/ |
| H A D | psci.c | 217 static int __psci_cpu_on(u32 fn, unsigned long cpuid, unsigned long entry_point) in __psci_cpu_on() argument 221 err = invoke_psci_fn(fn, cpuid, entry_point, 0); in __psci_cpu_on() 225 static int psci_0_1_cpu_on(unsigned long cpuid, unsigned long entry_point) in psci_0_1_cpu_on() argument 227 return __psci_cpu_on(psci_0_1_function_ids.cpu_on, cpuid, entry_point); in psci_0_1_cpu_on() 230 static int psci_0_2_cpu_on(unsigned long cpuid, unsigned long entry_point) in psci_0_2_cpu_on() argument 232 return __psci_cpu_on(PSCI_FN_NATIVE(0_2, CPU_ON), cpuid, entry_point); in psci_0_2_cpu_on() 235 static int __psci_migrate(u32 fn, unsigned long cpuid) in __psci_migrate() argument 239 err = invoke_psci_fn(fn, cpuid, 0, 0); in __psci_migrate() 243 static int psci_0_1_migrate(unsigned long cpuid) in psci_0_1_migrate() argument 245 return __psci_migrate(psci_0_1_function_ids.migrate, cpuid); in psci_0_1_migrate() [all …]
|
| /linux/arch/x86/boot/startup/ |
| H A D | sev-shared.c | 21 /* Copy of the SNP firmware's CPUID page. */ 25 * These will be initialized based on CPUID table so that non-present 221 * directly rather than relying on the base size in the CPUID table. 252 * entries in the CPUID table were not present. This is not a valid in snp_cpuid_calc_xsave_size() 409 * Some hypervisors will avoid keeping track of CPUID entries in snp_cpuid() 413 * work using a single SNP CPUID table. in snp_cpuid() 417 * CPUID table entries are only a template that may need to be in snp_cpuid() 421 * within a valid CPUID range, proceed with post-processing in snp_cpuid() 440 * hypervisor and only the CPUID exit-code. 450 /* Only CPUID is supported via MSR protocol */ in do_vc_no_ghcb() [all …]
|
| /linux/arch/x86/boot/ |
| H A D | cpuflags.c | 60 asm volatile("cpuid" in cpuid_count() 66 #define cpuid(id, a, b, c, d) cpuid_count(id, 0, a, b, c, d) macro 82 cpuid(0x0, &max_intel_level, &cpu_vendor[0], &cpu_vendor[2], in get_cpuflags() 87 cpuid(0x1, &tfms, &ignored, &cpu.flags[4], in get_cpuflags() 101 cpuid(0x80000000, &max_amd_level, &ignored, &ignored, in get_cpuflags() 106 cpuid(0x80000001, &ignored, &ignored, &cpu.flags[6], in get_cpuflags()
|
| /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/Documentation/virt/kvm/x86/ |
| H A D | msr.rst | 56 Availability of this MSR must be checked via bit 3 in 0x4000001 cpuid 128 of specific flags has to be checked in 0x40000001 cpuid leaf. 133 | flag bit | cpuid bit | meaning | 144 Availability of this MSR must be checked via bit 3 in 0x4000001 cpuid 157 Availability of this MSR must be checked via bit 0 in 0x4000001 cpuid 169 Availability of this MSR must be checked via bit 0 in 0x4000001 cpuid 174 if (!kvm_para_available()) /* refer to cpuid.txt */ 214 present in CPUID. Bit 3 enables interrupt based delivery of 'page ready' 216 CPUID. 246 available if KVM_FEATURE_ASYNC_PF_INT is present in CPUID. [all …]
|