Home
last modified time | relevance | path

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

12345678910>>...20

/Linux-v6.1/arch/riscv/kernel/
Dsmpboot.c47 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 if (cpu_ops[cpuid]->cpu_prepare) { in smp_prepare_cpus()
64 ret = cpu_ops[cpuid]->cpu_prepare(cpuid); in smp_prepare_cpus()
68 set_cpu_present(cpuid, true); in smp_prepare_cpus()
69 numa_store_cpu_info(cpuid); in smp_prepare_cpus()
78 int cpuid = 1; in setup_smp() local
94 if (cpuid >= NR_CPUS) { in setup_smp()
95 pr_warn("Invalid cpuid [%d] for hartid [%lu]\n", in setup_smp()
[all …]
Dcpu_ops_sbi.c65 static int sbi_cpu_start(unsigned int cpuid, struct task_struct *tidle) in sbi_cpu_start() argument
68 unsigned long hartid = cpuid_to_hartid_map(cpuid); in sbi_cpu_start()
70 struct sbi_hart_boot_data *bdata = &per_cpu(boot_data, cpuid); in sbi_cpu_start()
82 static int sbi_cpu_prepare(unsigned int cpuid) in sbi_cpu_prepare() argument
85 pr_err("cpu start method not defined for CPU [%d]\n", cpuid); in sbi_cpu_prepare()
92 static int sbi_cpu_disable(unsigned int cpuid) in sbi_cpu_disable() argument
107 static int sbi_cpu_is_stopped(unsigned int cpuid) in sbi_cpu_is_stopped() argument
110 unsigned long hartid = cpuid_to_hartid_map(cpuid); in sbi_cpu_is_stopped()
Dcpu_ops_spinwait.c20 static void cpu_update_secondary_bootdata(unsigned int cpuid, in cpu_update_secondary_bootdata() argument
23 unsigned long hartid = cpuid_to_hartid_map(cpuid); in cpu_update_secondary_bootdata()
42 static int spinwait_cpu_prepare(unsigned int cpuid) in spinwait_cpu_prepare() argument
45 pr_err("cpu start method not defined for CPU [%d]\n", cpuid); in spinwait_cpu_prepare()
51 static int spinwait_cpu_start(unsigned int cpuid, struct task_struct *tidle) in spinwait_cpu_start() argument
61 cpu_update_secondary_bootdata(cpuid, tidle); in spinwait_cpu_start()
/Linux-v6.1/arch/x86/boot/compressed/
Dmem_encrypt.S26 movl $0x80000000, %eax /* CPUID to check the highest leaf */
27 cpuid
33 * CPUID Fn8000_001F[EAX] - Bit 1
34 * CPUID Fn8000_001F[EBX] - Bits 5:0
38 cpuid
65 * sev_es_req_cpuid - Request a CPUID value from the Hypervisor using
69 * @%edx: CPUID Function
72 * %edx returns CPUID value on success
107 /* Keep CPUID function in %ebx */
114 movl $0, %eax # Request CPUID[fn].EAX
[all …]
/Linux-v6.1/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 …]
/Linux-v6.1/lib/zstd/common/
Dcpu.h15 * 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 …]
/Linux-v6.1/arch/parisc/kernel/
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 …]
Dprocessor.c83 unsigned long cpuid; in processor_probe() local
102 cpuid = boot_cpu_data.cpu_count; in processor_probe()
104 cpu_info.cpu_num = cpu_info.cpu_loc = cpuid; in processor_probe()
135 cpuid, cpu_info.cpu_num, cpu_info.cpu_loc, in processor_probe()
140 /* We need contiguous numbers for cpuid. Firmware's notion in processor_probe()
141 * of cpuid is for physical CPUs and we just don't care yet. in processor_probe()
154 cpuid = cpu_info.cpu_num; in processor_probe()
160 p = &per_cpu(cpu_data, cpuid); in processor_probe()
164 if (cpuid) in processor_probe()
169 p->cpuid = cpuid; /* save CPU id */ in processor_probe()
[all …]
/Linux-v6.1/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-v6.1/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-v6.1/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
112 return -EIO; /* CPUID not supported */ in cpuid_open()
144 return kasprintf(GFP_KERNEL, "cpu/%u/cpuid", MINOR(dev->devt)); in cpuid_devnode()
152 "cpu/cpuid", &cpuid_fops)) { in cpuid_init()
153 printk(KERN_ERR "cpuid: unable to get major %d for cpuid\n", in cpuid_init()
157 cpuid_class = class_create(THIS_MODULE, "cpuid"); in cpuid_init()
164 err = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "x86/cpuid:online", in cpuid_init()
175 __unregister_chrdev(CPUID_MAJOR, 0, NR_CPUS, "cpu/cpuid"); in cpuid_init()
[all …]
/Linux-v6.1/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-v6.1/tools/testing/selftests/kvm/x86_64/
Dcpuid_test.c5 * Generic tests for KVM CPUID set/get ioctls
50 cpuid(0x40000000, &eax, &ebx, &ecx, &edx); in test_cpuid_40000000()
88 "CPUID nent mismatch: %d vs. %d", cpuid1->nent, cpuid2->nent); in compare_cpuids()
96 "CPUID entries[%d] mismtach: 0x%x.%d.%x vs. 0x%x.%d.%x\n", in compare_cpuids()
105 "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()
135 struct kvm_cpuid2 *vcpu_alloc_cpuid(struct kvm_vm *vm, vm_vaddr_t *p_gva, struct kvm_cpuid2 *cpuid) in vcpu_alloc_cpuid() argument
137 int size = sizeof(*cpuid) + cpuid->nent * sizeof(cpuid->entries[0]); in vcpu_alloc_cpuid()
141 memcpy(guest_cpuids, cpuid, size); in vcpu_alloc_cpuid()
153 /* Setting unmodified CPUID is allowed */ in set_cpuid_after_run()
155 TEST_ASSERT(!rc, "Setting unmodified CPUID after KVM_RUN failed: %d", rc); in set_cpuid_after_run()
[all …]
/Linux-v6.1/arch/x86/kernel/cpu/
Dtsx.c32 * Ensure TSX support is not enumerated in CPUID. in tsx_disable()
52 * Ensure TSX support is enumerated in CPUID. in tsx_enable()
72 * First of all, there's a CPUID bit: X86_FEATURE_RTM_ALWAYS_ABORT
80 * the MSR is present only when *two* CPUID bits are set:
88 * CPUID bit X86_FEATURE_RTM_ALWAYS_ABORT set and for those the same strategy
95 * which, when done, may cause for the X86_FEATURE_RTM_ALWAYS_ABORT CPUID
99 * cause for the supported CPUID feature bits to get re-detected and, if
102 * short: the kernel doesn't modify CPUID feature bits after booting.
112 * MSR_TFA_TSX_CPUID_CLEAR bit is only present when both CPUID in tsx_clear_cpuid()
165 * Hardware will always abort a TSX transaction when the CPUID bit in tsx_init()
[all …]
/Linux-v6.1/tools/testing/selftests/kvm/lib/x86_64/
Dprocessor.c682 if (vcpu->cpuid) in vcpu_arch_free()
683 free(vcpu->cpuid); in vcpu_arch_free()
688 static struct kvm_cpuid2 *cpuid; in kvm_get_supported_cpuid() local
691 if (cpuid) in kvm_get_supported_cpuid()
692 return cpuid; in kvm_get_supported_cpuid()
694 cpuid = allocate_kvm_cpuid2(MAX_NR_CPUID_ENTRIES); in kvm_get_supported_cpuid()
697 kvm_ioctl(kvm_fd, KVM_GET_SUPPORTED_CPUID, cpuid); in kvm_get_supported_cpuid()
700 return cpuid; in kvm_get_supported_cpuid()
703 bool kvm_cpuid_has(const struct kvm_cpuid2 *cpuid, in kvm_cpuid_has() argument
709 for (i = 0; i < cpuid->nent; i++) { in kvm_cpuid_has()
[all …]
/Linux-v6.1/tools/perf/pmu-events/
Dempty-pmu-events.c186 * cpuid field, which is an arch-specific identifier for the CPU.
190 * The cpuid can contain any character other than the comma.
194 const char *cpuid; member
205 .cpuid = "testcpu",
210 .cpuid = 0,
271 char *cpuid = perf_pmu__getcpuid(pmu); in perf_pmu__find_table() local
274 /* on some platforms which uses cpus map, cpuid can be NULL for in perf_pmu__find_table()
277 if (!cpuid) in perf_pmu__find_table()
284 if (!map->cpuid) in perf_pmu__find_table()
287 if (!strcmp_cpuid_str(map->cpuid, cpuid)) { in perf_pmu__find_table()
[all …]
/Linux-v6.1/arch/x86/kvm/
Dcpuid.c4 * cpuid support routines
22 #include <asm/cpuid.h>
23 #include "cpuid.h"
71 * Magic value used by KVM when querying userspace-provided CPUID entries and
75 * to avoid false positives when processing guest CPUID input.
102 * lookup (as opposed to emulating CPUID) for a function that's in cpuid_entry2_find()
154 /* Check whether the supplied CPUID data is equal to what is already set for the vCPU. */
226 * save the feature bitmap to avoid cpuid lookup for every PV in kvm_update_pv_runtime()
234 * Calculate guest's supported XCR0 taking into account guest CPUID data and
293 * Bits 127:0 of the allowed SECS.ATTRIBUTES (CPUID.0x12.0x1) enumerate in __kvm_update_cpuid_runtime()
[all …]
/Linux-v6.1/tools/perf/arch/x86/util/
Dheader.c12 #include "cpuid.h"
18 cpuid(0, 0, lvl, &b, &c, &d); in get_cpuid_0()
36 cpuid(1, 0, &a, &b, &c, &d); in __get_cpuid()
78 /* Full CPUID format for x86 is vendor-family-model-stepping */
104 * Full CPUID format is required to identify a platform. in strcmp_cpuid_str()
105 * Error out if the cpuid string is incomplete. in strcmp_cpuid_str()
108 pr_info("Invalid CPUID %s. Full CPUID is required, " in strcmp_cpuid_str()
125 /* If the full CPUID format isn't required, in strcmp_cpuid_str()
/Linux-v6.1/drivers/firmware/psci/
Dpsci.c210 static int __psci_cpu_on(u32 fn, unsigned long cpuid, unsigned long entry_point) in __psci_cpu_on() argument
214 err = invoke_psci_fn(fn, cpuid, entry_point, 0); in __psci_cpu_on()
218 static int psci_0_1_cpu_on(unsigned long cpuid, unsigned long entry_point) in psci_0_1_cpu_on() argument
220 return __psci_cpu_on(psci_0_1_function_ids.cpu_on, cpuid, entry_point); in psci_0_1_cpu_on()
223 static int psci_0_2_cpu_on(unsigned long cpuid, unsigned long entry_point) in psci_0_2_cpu_on() argument
225 return __psci_cpu_on(PSCI_FN_NATIVE(0_2, CPU_ON), cpuid, entry_point); in psci_0_2_cpu_on()
228 static int __psci_migrate(u32 fn, unsigned long cpuid) in __psci_migrate() argument
232 err = invoke_psci_fn(fn, cpuid, 0, 0); in __psci_migrate()
236 static int psci_0_1_migrate(unsigned long cpuid) in psci_0_1_migrate() argument
238 return __psci_migrate(psci_0_1_function_ids.migrate, cpuid); in psci_0_1_migrate()
[all …]
/Linux-v6.1/Documentation/virt/kvm/x86/
Derrata.rst23 Unlike most other CPUID feature bits, CPUID[EAX=7,ECX=0]:EBX[6]
24 (FDP_EXCPTN_ONLY) and CPUID[EAX=7,ECX=0]:EBX]13] (ZERO_FCS_FDS) are
27 Clearing these bits in CPUID has no effect on the operation of the guest;
31 **Workaround:** It is recommended to always set these bits in guest CPUID.
33 to be present likely predates these CPUID feature bits, and therefore
/Linux-v6.1/drivers/clocksource/
Dtimer-riscv.c121 int cpuid, error; in riscv_timer_init_dt() local
133 cpuid = riscv_hartid_to_cpuid(hartid); in riscv_timer_init_dt()
134 if (cpuid < 0) { in riscv_timer_init_dt()
135 pr_warn("Invalid cpuid for hartid [%lu]\n", hartid); in riscv_timer_init_dt()
136 return cpuid; in riscv_timer_init_dt()
139 if (cpuid != smp_processor_id()) in riscv_timer_init_dt()
161 pr_info("%s: Registering clocksource cpuid [%d] hartid [%lu]\n", in riscv_timer_init_dt()
162 __func__, cpuid, hartid); in riscv_timer_init_dt()
166 error, cpuid); in riscv_timer_init_dt()
/Linux-v6.1/drivers/cpufreq/
Dtegra194-cpufreq.c55 void (*get_cpu_cluster_id)(u32 cpu, u32 *cpuid, u32 *clusterid);
56 int (*get_cpu_ndiv)(u32 cpu, u32 cpuid, u32 clusterid, u64 *ndiv);
79 static void tegra234_get_cpu_cluster_id(u32 cpu, u32 *cpuid, u32 *clusterid) in tegra234_get_cpu_cluster_id() argument
85 if (cpuid) in tegra234_get_cpu_cluster_id()
86 *cpuid = MPIDR_AFFINITY_LEVEL(mpidr, 1); in tegra234_get_cpu_cluster_id()
91 static int tegra234_get_cpu_ndiv(u32 cpu, u32 cpuid, u32 clusterid, u64 *ndiv) in tegra234_get_cpu_ndiv() argument
98 mpidr_id = (clusterid * data->soc->maxcpus_per_cluster) + cpuid; in tegra234_get_cpu_ndiv()
110 u32 cpu, cpuid, clusterid; in tegra234_set_cpu_ndiv() local
114 data->soc->ops->get_cpu_cluster_id(cpu, &cpuid, &clusterid); in tegra234_set_cpu_ndiv()
117 mpidr_id = (clusterid * data->soc->maxcpus_per_cluster) + cpuid; in tegra234_set_cpu_ndiv()
[all …]

12345678910>>...20