Home
last modified time | relevance | path

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

12345678910>>...17

/Linux-v5.10/arch/riscv/kernel/
Dsmpboot.c46 int cpuid; in smp_prepare_cpus() local
53 for_each_possible_cpu(cpuid) { in smp_prepare_cpus()
54 if (cpuid == smp_processor_id()) in smp_prepare_cpus()
56 if (cpu_ops[cpuid]->cpu_prepare) { in smp_prepare_cpus()
57 ret = cpu_ops[cpuid]->cpu_prepare(cpuid); in smp_prepare_cpus()
61 set_cpu_present(cpuid, true); in smp_prepare_cpus()
70 int cpuid = 1; in setup_smp() local
84 if (cpuid >= NR_CPUS) { in setup_smp()
85 pr_warn("Invalid cpuid [%d] for hartid [%d]\n", in setup_smp()
86 cpuid, hart); in setup_smp()
[all …]
Dcpu_ops_sbi.c56 static int sbi_cpu_start(unsigned int cpuid, struct task_struct *tidle) in sbi_cpu_start() argument
60 int hartid = cpuid_to_hartid_map(cpuid); in sbi_cpu_start()
62 cpu_update_secondary_bootdata(cpuid, tidle); in sbi_cpu_start()
68 static int sbi_cpu_prepare(unsigned int cpuid) in sbi_cpu_prepare() argument
71 pr_err("cpu start method not defined for CPU [%d]\n", cpuid); in sbi_cpu_prepare()
78 static int sbi_cpu_disable(unsigned int cpuid) in sbi_cpu_disable() argument
93 static int sbi_cpu_is_stopped(unsigned int cpuid) in sbi_cpu_is_stopped() argument
96 int hartid = cpuid_to_hartid_map(cpuid); in sbi_cpu_is_stopped()
Dcpu_ops.c24 void cpu_update_secondary_bootdata(unsigned int cpuid, in cpu_update_secondary_bootdata() argument
27 int hartid = cpuid_to_hartid_map(cpuid); in cpu_update_secondary_bootdata()
36 void __init cpu_set_ops(int cpuid) in cpu_set_ops() argument
40 if (!cpuid) in cpu_set_ops()
42 cpu_ops[cpuid] = &cpu_ops_sbi; in cpu_set_ops()
45 cpu_ops[cpuid] = &cpu_ops_spinwait; in cpu_set_ops()
/Linux-v5.10/arch/sparc/kernel/
Dprom_64.c389 * '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 …]
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 …]
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 …]
Dsmp_32.c184 int i, cpuid, extra; in smp_prepare_cpus() local
189 for (i = 0; !cpu_find_by_instance(i, NULL, &cpuid); i++) { in smp_prepare_cpus()
190 if (cpuid >= NR_CPUS) in smp_prepare_cpus()
244 int cpuid = hard_smp_processor_id(); in smp_prepare_boot_cpu() local
246 if (cpuid >= NR_CPUS) { in smp_prepare_boot_cpu()
250 if (cpuid != 0) in smp_prepare_boot_cpu()
253 current_thread_info()->cpu = cpuid; in smp_prepare_boot_cpu()
254 set_cpu_online(cpuid, true); in smp_prepare_boot_cpu()
255 set_cpu_possible(cpuid, true); in smp_prepare_boot_cpu()
316 unsigned int cpuid = hard_smp_processor_id(); in arch_cpu_pre_online() local
[all …]
Dirq_64.c313 static unsigned int sun4u_compute_tid(unsigned long imap, unsigned long cpuid) in sun4u_compute_tid() argument
318 tid = starfire_translate(imap, cpuid); in sun4u_compute_tid()
328 tid = cpuid << IMAP_TID_SHIFT; in sun4u_compute_tid()
331 unsigned int a = cpuid & 0x1f; in sun4u_compute_tid()
332 unsigned int n = (cpuid >> 5) & 0x1f; in sun4u_compute_tid()
340 tid = cpuid << IMAP_TID_SHIFT; in sun4u_compute_tid()
352 int cpuid; in irq_choose_cpu() local
356 cpuid = map_to_cpu(irq); in irq_choose_cpu()
361 cpuid = cpumask_empty(&tmp) ? map_to_cpu(irq) : cpumask_first(&tmp); in irq_choose_cpu()
364 return cpuid; in irq_choose_cpu()
[all …]
/Linux-v5.10/arch/parisc/kernel/
Dtopology.c30 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 …]
Dprocessor.c82 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()
169 p->cpuid = cpuid; /* save CPU id */ in processor_probe()
[all …]
Dsmp.c85 ipi_init(int cpuid) in ipi_init() argument
89 if(cpu_online(cpuid) ) in ipi_init()
321 int smp_boot_one_cpu(int cpuid, struct task_struct *idle) in smp_boot_one_cpu() argument
323 const struct cpuinfo_parisc *p = &per_cpu(cpu_data, cpuid); in smp_boot_one_cpu()
326 task_thread_info(idle)->cpu = cpuid; in smp_boot_one_cpu()
331 cpu_now_booting = cpuid; in smp_boot_one_cpu()
340 printk(KERN_INFO "Releasing cpu %d now, hpa=%lx\n", cpuid, p->hpa); in smp_boot_one_cpu()
360 if(cpu_online(cpuid)) { in smp_boot_one_cpu()
369 printk(KERN_CRIT "SMP: CPU:%d is stuck.\n", cpuid); in smp_boot_one_cpu()
375 cpuid, timeout * 100); in smp_boot_one_cpu()
[all …]
/Linux-v5.10/include/soc/tegra/
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-v5.10/drivers/soc/tegra/
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-v5.10/arch/x86/kernel/
Dverify_cpu.S40 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 …]
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
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 …]
/Linux-v5.10/arch/alpha/kernel/
Dsmp.c68 /* 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 …]
/Linux-v5.10/arch/x86/kvm/
Dcpuid.c4 * cpuid support routines
21 #include "cpuid.h"
100 * save the feature bitmap to avoid cpuid lookup for every PV in kvm_update_pv_runtime()
227 struct kvm_cpuid *cpuid, in kvm_vcpu_ioctl_set_cpuid() argument
234 if (cpuid->nent > KVM_MAX_CPUID_ENTRIES) in kvm_vcpu_ioctl_set_cpuid()
237 if (cpuid->nent) { in kvm_vcpu_ioctl_set_cpuid()
238 e = vmemdup_user(entries, array_size(sizeof(*e), cpuid->nent)); in kvm_vcpu_ioctl_set_cpuid()
242 e2 = kvmalloc_array(cpuid->nent, sizeof(*e2), GFP_KERNEL_ACCOUNT); in kvm_vcpu_ioctl_set_cpuid()
248 for (i = 0; i < cpuid->nent; i++) { in kvm_vcpu_ioctl_set_cpuid()
261 r = kvm_check_cpuid(e2, cpuid->nent); in kvm_vcpu_ioctl_set_cpuid()
[all …]
Dcpuid.h17 int kvm_dev_ioctl_get_cpuid(struct kvm_cpuid2 *cpuid,
21 struct kvm_cpuid *cpuid,
24 struct kvm_cpuid2 *cpuid,
27 struct kvm_cpuid2 *cpuid,
69 * Reverse CPUID and its derivatives can only be used for hardware-defined
70 * feature words, i.e. words whose bits directly correspond to a CPUID leaf.
71 * Retrieving a feature bit or masking guest CPUID from a Linux-defined word
129 const struct cpuid_reg cpuid = x86_feature_cpuid(x86_feature); in cpuid_entry_get_reg() local
131 return __cpuid_entry_get_reg(entry, cpuid.reg); in cpuid_entry_get_reg()
192 const struct cpuid_reg cpuid = x86_feature_cpuid(x86_feature); in guest_cpuid_get_register() local
[all …]
/Linux-v5.10/tools/testing/selftests/kvm/x86_64/
Dhyperv_cpuid.c105 * "CPUID%lx EAX=0x%lx EBX=0x%lx ECX=0x%lx EDX=0x%lx\n", in test_hv_cpuid()
115 static struct kvm_cpuid2 cpuid = {.nent = 0}; in test_hv_cpuid_e2big() local
118 ret = _vcpu_ioctl(vm, VCPU_ID, KVM_GET_SUPPORTED_HV_CPUID, &cpuid); in test_hv_cpuid_e2big()
129 static struct kvm_cpuid2 *cpuid; in kvm_get_supported_hv_cpuid() local
131 cpuid = malloc(sizeof(*cpuid) + nent * sizeof(struct kvm_cpuid_entry2)); in kvm_get_supported_hv_cpuid()
133 if (!cpuid) { in kvm_get_supported_hv_cpuid()
138 cpuid->nent = nent; in kvm_get_supported_hv_cpuid()
140 vcpu_ioctl(vm, VCPU_ID, KVM_GET_SUPPORTED_HV_CPUID, cpuid); in kvm_get_supported_hv_cpuid()
142 return cpuid; in kvm_get_supported_hv_cpuid()
/Linux-v5.10/drivers/clocksource/
Dtimer-riscv.c95 int cpuid, hartid, error; in riscv_timer_init_dt() local
106 cpuid = riscv_hartid_to_cpuid(hartid); in riscv_timer_init_dt()
107 if (cpuid < 0) { in riscv_timer_init_dt()
108 pr_warn("Invalid cpuid for hartid [%d]\n", hartid); in riscv_timer_init_dt()
109 return cpuid; in riscv_timer_init_dt()
112 if (cpuid != smp_processor_id()) in riscv_timer_init_dt()
134 pr_info("%s: Registering clocksource cpuid [%d] hartid [%d]\n", in riscv_timer_init_dt()
135 __func__, cpuid, hartid); in riscv_timer_init_dt()
139 error, cpuid); in riscv_timer_init_dt()
/Linux-v5.10/tools/perf/arch/x86/util/
Dheader.c14 cpuid(unsigned int op, unsigned int *a, unsigned int *b, unsigned int *c, in cpuid() function
34 cpuid(0, &lvl, &b, &c, &d); in __get_cpuid()
41 cpuid(1, &a, &b, &c, &d); in __get_cpuid()
83 /* Full CPUID format for x86 is vendor-family-model-stepping */
109 * Full CPUID format is required to identify a platform. in strcmp_cpuid_str()
110 * Error out if the cpuid string is incomplete. in strcmp_cpuid_str()
113 pr_info("Invalid CPUID %s. Full CPUID is required, " in strcmp_cpuid_str()
130 /* If the full CPUID format isn't required, in strcmp_cpuid_str()
/Linux-v5.10/arch/x86/boot/compressed/
Dmem_encrypt.S28 cpuid
32 movl $0x80000000, %eax /* CPUID to check the highest leaf */
33 cpuid
39 * CPUID Fn8000_001F[EAX] - Bit 1
40 * CPUID Fn8000_001F[EBX] - Bits 5:0
44 cpuid
/Linux-v5.10/tools/testing/selftests/kvm/lib/x86_64/
Dprocessor.c624 struct kvm_cpuid2 *cpuid; in allocate_kvm_cpuid2() local
628 size = sizeof(*cpuid); in allocate_kvm_cpuid2()
630 cpuid = malloc(size); in allocate_kvm_cpuid2()
631 if (!cpuid) { in allocate_kvm_cpuid2()
636 cpuid->nent = nent; in allocate_kvm_cpuid2()
638 return cpuid; in allocate_kvm_cpuid2()
642 * KVM Supported CPUID Get
648 * Return: The supported KVM CPUID
650 * Get the guest CPUID supported by KVM.
654 static struct kvm_cpuid2 *cpuid; in kvm_get_supported_cpuid() local
[all …]
/Linux-v5.10/arch/arm/kernel/
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-v5.10/Documentation/x86/
Dcpuinfo.rst29 shows features which the kernel supports. For a full list of CPUID flags
35 a: Feature flags can be derived from the contents of CPUID leaves.
37 These feature definitions are organized mirroring the layout of CPUID
45 b: Flags can be from scattered CPUID-based features.
47 Hardware features enumerated in sparsely populated CPUID leaves get
48 software-defined values. Still, CPUID needs to be queried to determine
51 checked at runtime in the respective CPUID leaf [EAX=f, ECX=0] bit EDX[1].
53 The intent of scattering CPUID leaves is to not bloat struct
54 cpuinfo_x86.x86_capability[] unnecessarily. For instance, the CPUID leaf
55 [EAX=7, ECX=0] has 30 features and is dense, but the CPUID leaf [EAX=7, EAX=1]
[all …]

12345678910>>...17