/openbmc/linux/arch/riscv/kernel/ |
H A D | smpboot.c | 49 int cpuid; in smp_prepare_cpus() local 68 ret = cpu_ops[cpuid]->cpu_prepare(cpuid); in smp_prepare_cpus() 126 int cpuid; in acpi_parse_and_init_cpus() local 132 for (cpuid = 1; cpuid < nr_cpu_ids; cpuid++) { in acpi_parse_and_init_cpus() 134 cpu_set_ops(cpuid); in acpi_parse_and_init_cpus() 148 int cpuid = 1; in of_parse_and_init_cpus() local 166 cpuid, hart); in of_parse_and_init_cpus() 172 cpuid++; in of_parse_and_init_cpus() 179 cpuid, nr_cpu_ids); in of_parse_and_init_cpus() 181 for (cpuid = 1; cpuid < nr_cpu_ids; cpuid++) { in of_parse_and_init_cpus() [all …]
|
H A D | cpu_ops_sbi.c | 65 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()
|
H A D | cpu_ops_spinwait.c | 20 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() 41 static int spinwait_cpu_prepare(unsigned int cpuid) in spinwait_cpu_prepare() argument 44 pr_err("cpu start method not defined for CPU [%d]\n", cpuid); in spinwait_cpu_prepare() 50 static int spinwait_cpu_start(unsigned int cpuid, struct task_struct *tidle) in spinwait_cpu_start() argument 60 cpu_update_secondary_bootdata(cpuid, tidle); in spinwait_cpu_start()
|
/openbmc/u-boot/cmd/ |
H A D | mp.c | 11 unsigned long cpuid; in cpu_status_all() local 13 for (cpuid = 0; ; cpuid++) { in cpu_status_all() 14 if (!is_core_valid(cpuid)) { in cpu_status_all() 15 if (cpuid == 0) { in cpu_status_all() 21 cpu_status(cpuid); in cpu_status_all() 30 unsigned long cpuid; in cpu_cmd() local 38 cpuid = simple_strtoul(argv[1], NULL, 10); in cpu_cmd() 39 if (!is_core_valid(cpuid)) { in cpu_cmd() 47 cpu_reset(cpuid); in cpu_cmd() 49 cpu_status(cpuid); in cpu_cmd() [all …]
|
/openbmc/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 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() 175 store_cpu_topology(cpuid); in processor_probe() 182 init_percpu_prof(cpuid); in processor_probe() 193 if (cpuid) { in processor_probe() 214 if (cpuid) { in processor_probe() 216 add_cpu(cpuid); in processor_probe() [all …]
|
H A D | smp.c | 88 ipi_init(int cpuid) in ipi_init() argument 92 if(cpu_online(cpuid) ) in ipi_init() 333 static int smp_boot_one_cpu(int cpuid, struct task_struct *idle) in smp_boot_one_cpu() argument 335 const struct cpuinfo_parisc *p = &per_cpu(cpu_data, cpuid); in smp_boot_one_cpu() 342 memset(&per_cpu(irq_stat, cpuid), 0, sizeof(irq_cpustat_t)); in smp_boot_one_cpu() 347 *per_cpu_ptr(desc->kstat_irqs, cpuid) = 0; in smp_boot_one_cpu() 358 cpu_now_booting = cpuid; in smp_boot_one_cpu() 387 if(cpu_online(cpuid)) { in smp_boot_one_cpu() 395 printk(KERN_CRIT "SMP: CPU:%d is stuck.\n", cpuid); in smp_boot_one_cpu() 401 cpuid, timeout * 100); in smp_boot_one_cpu() [all …]
|
/openbmc/linux/arch/sparc/kernel/ |
H A D | prom_64.c | 445 if (cpuid < 0) { 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() 471 if (id == cpuid) in check_cpu_node() 485 set_cpu_present(cpuid, true); in record_one_cpu() 529 cpuid = 0; in fill_in_one_cpu() 532 cpu_data(cpuid).clock_tick = in fill_in_one_cpu() 536 cpu_data(cpuid).dcache_size = in fill_in_one_cpu() [all …]
|
H A D | sun4d_smp.c | 47 cpuid &= 0x1e; in show_leds() 49 "r" ((cpu_leds[cpuid] << 4) | cpu_leds[cpuid+1]), 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() 85 while (current_set[cpuid]->cpu != cpuid) in sun4d_cpu_pre_online() 90 : : "r" (¤t_set[cpuid]) in sun4d_cpu_pre_online() 93 cpu_leds[cpuid] = 0x9; in sun4d_cpu_pre_online() [all …]
|
H A D | smp_32.c | 179 int i, cpuid, extra; in smp_prepare_cpus() local 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 313 register_percpu_ce(cpuid); in arch_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 | irq_64.c | 329 tid = cpuid << IMAP_TID_SHIFT; in sun4u_compute_tid() 332 unsigned int a = cpuid & 0x1f; in sun4u_compute_tid() 341 tid = cpuid << IMAP_TID_SHIFT; in sun4u_compute_tid() 353 int cpuid; in irq_choose_cpu() local 357 cpuid = map_to_cpu(irq); in irq_choose_cpu() 365 return cpuid; in irq_choose_cpu() 378 unsigned long cpuid, imap, val; in sun4u_irq_enable() local 381 cpuid = irq_choose_cpu(data->irq, in sun4u_irq_enable() 403 unsigned long cpuid, imap, val; in sun4u_set_affinity() local 514 unsigned long cpuid; in sun4v_virq_enable() local [all …]
|
/openbmc/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() 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() 109 reg |= TEGRA30_FLOW_CTRL_CSR_WFI_CPU0 << cpuid; in flowctrl_cpu_suspend_enter() 116 flowctrl_write_cpu_csr(cpuid, reg); in flowctrl_cpu_suspend_enter() 119 if (i == cpuid) in flowctrl_cpu_suspend_enter() 133 reg = flowctrl_read_cpu_csr(cpuid); in flowctrl_cpu_suspend_exit() [all …]
|
/openbmc/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
|
/openbmc/linux/arch/alpha/kernel/ |
H A D | smp.c | 80 smp_store_cpu_info(int cpuid) in smp_store_cpu_info() argument 85 cpu_data[cpuid].asn_lock = 0; in smp_store_cpu_info() 99 wait_boot_cpu_to_stop(int cpuid) in wait_boot_cpu_to_stop() argument 122 if (cpu_online(cpuid)) { in smp_callin() 126 set_cpu_online(cpuid, true); in smp_callin() 138 smp_setup_percpu_timer(cpuid); in smp_callin() 150 notify_cpu_starting(cpuid); in smp_callin() 157 wait_boot_cpu_to_stop(cpuid); in smp_callin() 161 smp_store_cpu_info(cpuid); in smp_callin() 209 cpumask = (1UL << cpuid); in send_secondary_console_msg() [all …]
|
/openbmc/qemu/target/arm/ |
H A D | arm-powerctl.c | 131 __func__, cpuid); in arm_set_cpu_on() 156 __func__, cpuid); in arm_set_cpu_on() 169 __func__, cpuid); in arm_set_cpu_on() 222 __func__, cpuid); in arm_set_cpu_on_and_reset() 235 __func__, cpuid); in arm_set_cpu_on_and_reset() 257 int arm_set_cpu_off(uint64_t cpuid) in arm_set_cpu_off() argument 264 DPRINTF("cpu %" PRId64 "\n", cpuid); in arm_set_cpu_off() 275 __func__, cpuid); in arm_set_cpu_off() 293 int arm_reset_cpu(uint64_t cpuid) in arm_reset_cpu() argument 300 DPRINTF("cpu %" PRId64 "\n", cpuid); in arm_reset_cpu() [all …]
|
H A D | arm-powerctl.h | 30 CPUState *arm_get_cpu_by_id(uint64_t cpuid); 49 int arm_set_cpu_on(uint64_t cpuid, uint64_t entry, uint64_t context_id, 63 int arm_set_cpu_off(uint64_t cpuid); 75 int arm_reset_cpu(uint64_t cpuid); 91 int arm_set_cpu_on_and_reset(uint64_t cpuid);
|
/openbmc/linux/tools/testing/selftests/kvm/x86_64/ |
H A D | cpuid_test.c | 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() 168 struct kvm_cpuid2 *cpuid = allocate_kvm_cpuid2(vcpu->cpuid->nent + 1); in test_get_cpuid2() local 171 vcpu_ioctl(vcpu, KVM_GET_CPUID2, cpuid); in test_get_cpuid2() 172 TEST_ASSERT(cpuid->nent == vcpu->cpuid->nent, in test_get_cpuid2() 174 vcpu->cpuid->nent, cpuid->nent); in test_get_cpuid2() 176 for (i = 0; i < vcpu->cpuid->nent; i++) { in test_get_cpuid2() 177 cpuid->nent = i; in test_get_cpuid2() 178 r = __vcpu_ioctl(vcpu, KVM_GET_CPUID2, cpuid); in test_get_cpuid2() 182 free(cpuid); in test_get_cpuid2() [all …]
|
/openbmc/linux/tools/perf/pmu-events/ |
H A D | empty-pmu-events.c | 206 const char *cpuid; member 218 .cpuid = "testcpu", 224 .cpuid = 0, 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() 351 free(cpuid); in perf_pmu__find_events_table() 364 if (!cpuid) in perf_pmu__find_metrics_table() 371 if (!map->cpuid) in perf_pmu__find_metrics_table() 374 if (!strcmp_cpuid_str(map->cpuid, cpuid)) { in perf_pmu__find_metrics_table() [all …]
|
/openbmc/linux/tools/perf/arch/riscv/util/ |
H A 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()
|
/openbmc/linux/arch/x86/kernel/ |
H A 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 107 cpuid 109 jb .Lverify_cpu_no_longmode # no extended cpuid 112 cpuid [all …]
|
/openbmc/u-boot/arch/arm/mach-omap2/omap3/ |
H A D | sys_info.c | 70 u32 cpuid = 0; in get_cpu_id() local 76 __asm__ __volatile__("mrc p15, 0, %0, c0, c0, 0":"=r"(cpuid)); in get_cpu_id() 77 if ((cpuid & 0xf) == 0x0) { in get_cpu_id() 83 cpuid = readl(&id_base->idcode); in get_cpu_id() 86 return cpuid; in get_cpu_id() 96 u32 cpuid = get_cpu_id(); in get_cpu_family() local 98 if (cpuid == 0) in get_cpu_family() 101 hawkeye = (cpuid >> HAWKEYE_SHIFT) & 0xffff; in get_cpu_family() 124 u32 cpuid = get_cpu_id(); in get_cpu_rev() local 126 if (cpuid == 0) in get_cpu_rev() [all …]
|
/openbmc/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()
|
/openbmc/linux/drivers/firmware/psci/ |
H A D | psci.c | 238 err = invoke_psci_fn(fn, cpuid, 0, 0); in __psci_migrate() 242 static int psci_0_1_migrate(unsigned long cpuid) in psci_0_1_migrate() argument 247 static int psci_0_2_migrate(unsigned long cpuid) in psci_0_2_migrate() argument 406 unsigned long cpuid; in psci_debugfs_read() local 410 cpuid = psci_migrate_info_up_cpu(); in psci_debugfs_read() 412 cpuid, resident_cpu); in psci_debugfs_read() 555 unsigned long cpuid; in psci_init_migrate() local 576 cpuid = psci_migrate_info_up_cpu(); in psci_init_migrate() 577 if (cpuid & ~MPIDR_HWID_BITMASK) { in psci_init_migrate() 579 cpuid); in psci_init_migrate() [all …]
|
/openbmc/u-boot/board/theobroma-systems/puma_rk3399/ |
H A D | puma-rk3399.c | 101 const char *cpuid = env_get("cpuid#"); in setup_macaddr() local 110 if (!cpuid) { in setup_macaddr() 115 ret = hash_block("sha256", (void *)cpuid, strlen(cpuid), hash, &size); in setup_macaddr() 139 u8 cpuid[cpuid_length]; in setup_serial() local 154 ret = misc_read(dev, cpuid_offset, &cpuid, sizeof(cpuid)); in setup_serial() 163 sprintf(&cpuid_str[i * 2], "%02x", cpuid[i]); in setup_serial() 172 low[i] = cpuid[1 + (i << 1)]; in setup_serial() 173 high[i] = cpuid[i << 1]; in setup_serial()
|