Home
last modified time | relevance | path

Searched full:cpuid (Results 1 – 25 of 353) sorted by relevance

12345678910>>...15

/linux/arch/riscv/kernel/
H A Dsmpboot.c46 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()
141 pr_warn("Invalid cpuid [%d] for hartid [%lu]\n", 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()
[all …]
/linux/lib/zstd/common/
H A Dcpu.h16 * 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/parisc/kernel/
H A Dtopology.c28 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 Dprocessor.c84 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/arch/x86/boot/compressed/
H A Dmem_encrypt.S23 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 …]
H A Dsev.c24 #include <asm/cpuid/api.h>
323 * will verify the SNP CPUID/MSR bits.
339 * involves CPUID checks which will be more reliable if the SNP in early_snp_init()
340 * CPUID table is used. See comments over snp_setup_cpuid_table() for in early_snp_init()
381 * CPUID Fn8000_001F[EAX] in sev_check_cpu_support()
384 * CPUID Fn8000_001F[EBX] in sev_check_cpu_support()
413 * loads the CPUID page and the same checks afterwards are done in sev_enable()
425 * against CPUID/MSR values later. in sev_enable()
429 /* Now repeat the checks with the SNP CPUID table. */ in sev_enable()
434 error("SEV-SNP support indicated by CC blob, but not CPUID."); in sev_enable()
[all …]
/linux/drivers/soc/tegra/
H A Dflowctrl.c51 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/include/soc/tegra/
H A Dflowctrl.h44 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/arch/x86/kvm/
H A Dcpuid.c4 * cpuid support routines
24 #include <asm/cpuid/api.h>
25 #include "cpuid.h"
91 * KVM has a semi-arbitrary rule that querying the guest's CPUID model in kvm_find_cpuid_entry2()
92 * with IRQs disabled is disallowed. The CPUID model can legitimately in kvm_find_cpuid_entry2()
98 * of the hotpath, e.g. by caching information during CPUID updates. in kvm_find_cpuid_entry2()
119 * lookup (as opposed to emulating CPUID) for a function that's in kvm_find_cpuid_entry2()
172 /* Check whether the supplied CPUID data is equal to what is already set for the vCPU. */
180 * Apply runtime CPUID updates to the incoming CPUID entries to avoid in kvm_cpuid_check_equal()
183 * Note! @e2 and @nent track the _old_ CPUID entries! in kvm_cpuid_check_equal()
[all …]
H A Dcpuid.h17 * Magic value used by KVM when querying userspace-provided CPUID entries and
21 * to avoid false positives when processing guest CPUID input.
42 int kvm_dev_ioctl_get_cpuid(struct kvm_cpuid2 *cpuid,
46 struct kvm_cpuid *cpuid,
49 struct kvm_cpuid2 *cpuid,
52 struct kvm_cpuid2 *cpuid,
97 const struct cpuid_reg cpuid = x86_feature_cpuid(x86_feature); in guest_cpuid_has() local
109 * honor userspace's CPUID), KVM needs to check the raw guest CPUID, in guest_cpuid_has()
117 entry = kvm_find_cpuid_entry_index(vcpu, cpuid.function, cpuid.index); in guest_cpuid_has()
121 reg = __cpuid_entry_get_reg(entry, cpuid.reg); in guest_cpuid_has()
[all …]
/linux/rust/kernel/
H A Dcpu.rs35 /// use kernel::cpu::CpuId;
40 /// let id = unsafe { CpuId::from_u32_unchecked(cpu) };
43 /// assert!(CpuId::from_i32(0).is_some());
44 /// assert!(CpuId::from_i32(-1).is_none());
47 pub struct CpuId(u32); struct
49 impl CpuId { impl
50 /// Creates a new [`CpuId`] from the given `id` without checking bounds.
64 /// Creates a new [`CpuId`] from the given `id`, checking that it is valid.
74 /// Creates a new [`CpuId`] from the given `id` without checking bounds.
90 /// Creates a new [`CpuId`] from the given `id`, checking that it is valid.
[all …]
/linux/arch/alpha/kernel/
H A Dsmp.c69 /* 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/drivers/firmware/arm_scmi/vendors/imx/
H A Dimx-sm-cpu.c45 __le32 cpuid; member
66 u32 cpuid) in scmi_imx_cpu_validate_cpuid() argument
70 if (cpuid >= info->nr_cpu) in scmi_imx_cpu_validate_cpuid()
77 u32 cpuid, bool start) in scmi_imx_cpu_start() argument
83 ret = scmi_imx_cpu_validate_cpuid(ph, cpuid); in scmi_imx_cpu_start()
96 put_unaligned_le32(cpuid, t->tx.buf); in scmi_imx_cpu_start()
105 u32 cpuid, u64 vector, bool start, in scmi_imx_cpu_reset_vector_set() argument
112 ret = scmi_imx_cpu_validate_cpuid(ph, cpuid); in scmi_imx_cpu_reset_vector_set()
122 in->cpuid = cpu_to_le32(cpuid); in scmi_imx_cpu_reset_vector_set()
139 static int scmi_imx_cpu_started(const struct scmi_protocol_handle *ph, u32 cpuid, in scmi_imx_cpu_started() argument
[all …]
/linux/arch/x86/kernel/
H A Dcpuid.c9 * 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
111 return -EIO; /* CPUID not supported */ in cpuid_open()
128 return kasprintf(GFP_KERNEL, "cpu/%u/cpuid", MINOR(dev->devt)); in cpuid_devnode()
132 .name = "cpuid",
156 "cpu/cpuid", &cpuid_fops)) { in cpuid_init()
157 printk(KERN_ERR "cpuid: unable to get major %d for cpuid\n", 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 …]
/linux/arch/sparc/kernel/
H A Dsun4d_smp.c45 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 Dsun4d_irq.c33 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 Dsmp_32.c179 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/drivers/firmware/imx/
H A Dsm-cpu.c16 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/Documentation/arch/x86/
H A Dcpuinfo.rst19 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/include/uapi/misc/
H A Damd-apml.h30 * 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 Dnuma.h25 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/arch/arm/kernel/
H A Dtopology.c177 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 Dmsr.rst56 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 …]
/linux/tools/arch/x86/kcpuid/
H A Dkcpuid.c4 #include <cpuid.h>
19 char *def_csv = "/usr/share/misc/cpuid.csv";
135 * Force using <cpuid.h> __cpuid_count() instead of __cpuid(). The in cpuid_store()
136 * latter leaves ECX uninitialized, which can break CPUID queries. in cpuid_store()
139 #define cpuid(leaf, a, b, c, d) \ in cpuid_store()
186 * Cut off vendor-prefix from CPUID function as we're using it as an in raw_dump_range()
243 cpuid(range->index, max_func, ebx, ecx, edx); in setup_cpuid_range()
246 * If the CPUID range's maximum function value is garbage, then it in setup_cpuid_range()
268 cpuid(f, eax, ebx, ecx, edx); in setup_cpuid_range()
306 * The basic row format for cpuid in parse_line()
88 static inline void cpuid(u32 *eax, u32 *ebx, u32 *ecx, u32 *edx) cpuid() function
[all...]
/linux/arch/x86/kernel/cpu/
H A Dtransmeta.c37 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()

12345678910>>...15