| /freebsd/sys/amd64/amd64/ |
| H A D | mp_machdep.c | 158 boot_cpu_id = PCPU_GET(apic_id); in cpu_mp_start() 161 KASSERT(boot_cpu_id == PCPU_GET(apic_id), in cpu_mp_start() 189 CPU_CLR(PCPU_GET(cpuid), &other_cpus); in cpu_mp_stop() 578 return (invl_scoreboard_getcpu(cpu) + PCPU_GET(cpuid)); in invl_scoreboard_slot() 642 generation = PCPU_GET(smp_tlb_gen); in smp_targeted_tlb_shootdown_native() 775 xhits_gbl[PCPU_GET(cpuid)]++; in invltlb_handler() 778 (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; in invltlb_handler() 793 xhits_gbl[PCPU_GET(cpuid)]++; in invltlb_invpcid_handler() 796 (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; in invltlb_invpcid_handler() 812 xhits_gbl[PCPU_GET(cpuid)]++; in invltlb_invpcid_pti_handler() [all …]
|
| H A D | fpu.c | 488 if (curthread == PCPU_GET(fpcurthread)) { in fpuexit() 705 if (PCPU_GET(fpcurthread) != curthread) { in fputrap_x87() 724 if (PCPU_GET(fpcurthread) != curthread) in fputrap_sse() 797 if (__predict_false(PCPU_GET(fpcurthread) == td)) { in fpudna() 806 if (__predict_false(PCPU_GET(fpcurthread) != NULL)) { in fpudna() 809 PCPU_GET(fpcurthread), in fpudna() 810 PCPU_GET(fpcurthread)->td_tid, td, td->td_tid); in fpudna() 825 } else if (PCPU_GET(fpcurthread) != td) { in fpu_activate_sw() 835 td = PCPU_GET(fpcurthread); in fpudrop() 870 if (td == PCPU_GET(fpcurthread) && PCB_USER_FPU(pcb)) { in fpugetregs() [all …]
|
| /freebsd/sys/i386/i386/ |
| H A D | mp_machdep.c | 247 boot_cpu_id = PCPU_GET(apic_id); in cpu_mp_start() 250 KASSERT(boot_cpu_id == PCPU_GET(apic_id), in cpu_mp_start() 323 common_tssp->tss_esp0 = PCPU_GET(trampstk); in init_secondary() 327 PCPU_SET(common_tssd, *PCPU_GET(tss_gdt)); in init_secondary() 573 CPU_CLR(PCPU_GET(cpuid), &mask); in smp_targeted_tlb_shootdown() 588 CPU_CLR(PCPU_GET(cpuid), &other_cpus); in smp_targeted_tlb_shootdown() 656 xhits_gbl[PCPU_GET(cpuid)]++; in invltlb_handler() 659 (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; in invltlb_handler() 679 xhits_pg[PCPU_GET(cpuid)]++; in invlpg_handler() 682 (*ipi_invlpg_counts[PCPU_GET(cpuid)])++; in invlpg_handler() [all …]
|
| H A D | npx.c | 530 if (curthread == PCPU_GET(fpcurthread)) { in npxexit() 762 PCPU_GET(fpcurthread), curthread, hw_float); in npxtrap_x87() 772 if (PCPU_GET(fpcurthread) != curthread) { in npxtrap_x87() 791 PCPU_GET(fpcurthread), curthread, hw_float); in npxtrap_sse() 795 if (PCPU_GET(fpcurthread) != curthread) in npxtrap_sse() 858 if (__predict_false(PCPU_GET(fpcurthread) == td)) { in npxdna() 867 if (__predict_false(PCPU_GET(fpcurthread) != NULL)) { in npxdna() 870 PCPU_GET(fpcurthread), in npxdna() 871 PCPU_GET(fpcurthread)->td_proc->p_pid, in npxdna() 906 } else if (PCPU_GET(fpcurthread) != td) { in npxswitch() [all …]
|
| /freebsd/sys/contrib/openzfs/include/os/freebsd/spl/sys/ |
| H A D | simd_powerpc.h | 58 fpu_kern_enter(PCPU_GET(curthread), NULL, FPU_KERN_NOCTX);\ 61 if (__predict_false(PCPU_GET(curpcb)->pcb_flags & PCB_KERN_FPU_NOSAVE))\ 62 fpu_kern_leave(PCPU_GET(curthread), NULL); \
|
| /freebsd/sys/x86/x86/ |
| H A D | mca.c | 853 rec->mr_apic_id = PCPU_GET(apic_id); in mca_check_status() 858 rec->mr_cpu = PCPU_GET(cpuid); in mca_check_status() 1012 cc = &cmc_state[PCPU_GET(cpuid)][bank]; in cmci_update() 1037 cc = &amd_et_state[PCPU_GET(cpuid)][bank]; in amd_thresholding_update() 1078 if (mode == CMCI && !(PCPU_GET(cmci_mask) & 1 << i)) in mca_scan() 1096 if (PCPU_GET(cmci_mask) & 1 << i) { in mca_scan() 1386 KASSERT(i < mca_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); in cmci_monitor() 1396 PCPU_GET(cpuid), PCPU_GET(apic_id), in cmci_monitor() 1397 PCPU_GET(acpi_id)); in cmci_monitor() 1416 cc = &cmc_state[PCPU_GET(cpuid)][i]; in cmci_monitor() [all …]
|
| H A D | mp_x86.c | 1076 cpuid = PCPU_GET(cpuid); in init_secondary_tail() 1077 if (PCPU_GET(apic_id) != lapic_id()) { in init_secondary_tail() 1080 printf("SMP: correct apic_id = %d\n", PCPU_GET(apic_id)); in init_secondary_tail() 1085 KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); in init_secondary_tail() 1086 PCPU_SET(curthread, PCPU_GET(idlethread)); in init_secondary_tail() 1116 if (cpu_info[PCPU_GET(apic_id)].cpu_hyperthread) in init_secondary_tail() 1335 int cpu = PCPU_GET(cpuid); in ipi_bitmap_handler() 1445 CPU_CLR(PCPU_GET(cpuid), &other_cpus); in ipi_all_but_self() 1451 cpu = PCPU_GET(cpuid); in ipi_all_but_self() 1487 cpuid = PCPU_GET(cpuid); in ipi_nmi_handler() [all …]
|
| /freebsd/sys/sys/ |
| H A D | callout.h | 99 callout_reset_sbt_on((c), (sbt), (pr), (fn), (arg), PCPU_GET(cpuid),\ 107 callout_reset_on((c), (on_tick), (fn), (arg), PCPU_GET(cpuid)) 114 callout_schedule_sbt_on((c), (sbt), (pr), PCPU_GET(cpuid), (flags)) 118 callout_schedule_on((c), (on_tick), PCPU_GET(cpuid))
|
| H A D | pcpu.h | 121 #define DPCPU_PTR(n) _DPCPU_PTR(PCPU_GET(dynamic), n) 218 #define curcpu PCPU_GET(cpuid) 219 #define curvidata PCPU_GET(vidata) 226 #define curthread PCPU_GET(curthread) 238 #define zpcpu_offset() (PCPU_GET(zpcpu_offset))
|
| /freebsd/sys/arm/arm/ |
| H A D | vfp.c | 167 if (PCPU_GET(cpuid) == 0) { in vfp_init() 258 cpu = PCPU_GET(cpuid); in vfp_bounce() 259 if (curpcb->pcb_vfpcpu != cpu || curthread != PCPU_GET(fpcurthread)) { in vfp_bounce() 378 if (PCPU_GET(fpcurthread) == td) in vfp_discard() 412 KASSERT(PCPU_GET(fpcurthread) == td, in vfp_save_state() 450 if (curthread == PCPU_GET(fpcurthread)) { in fpu_kern_enter() 492 KASSERT(PCPU_GET(fpcurthread) == NULL, in fpu_kern_leave()
|
| H A D | mp_machdep.c | 176 KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); in init_secondary() 246 cpu = PCPU_GET(cpuid); in ipi_stop() 345 CPU_CLR(PCPU_GET(cpuid), &other_cpus); in ipi_all_but_self()
|
| H A D | debug_monitor.c | 722 if (cpu != PCPU_GET(cpuid)) in dbg_setup_xpoint() 778 if (cpu != PCPU_GET(cpuid)) in dbg_remove_xpoint() 856 cpuid = PCPU_GET(cpuid); in dbg_reset_state() 975 PCPU_GET(cpuid)); in dbg_monitor_init() 999 "state on CPU%d", __func__, PCPU_GET(cpuid))); in dbg_monitor_init_secondary() 1007 " on CPU%d", __func__, PCPU_GET(cpuid))); in dbg_monitor_init_secondary() 1027 switch (PCPU_GET(dbreg_cmd)) { in dbg_resume_dbreg()
|
| H A D | cpuinfo.c | 377 modify_actlr(~0, PCPU_GET(original_actlr)); in apply_bp_hardening() 451 PCPU_GET(cpuid)); in handle_bp_hardening() 471 printf("CPU(%d) applied BP hardening: %s\n", PCPU_GET(cpuid), in handle_bp_hardening() 489 PCPU_GET(cpuid)); in handle_bp_hardening()
|
| /freebsd/sys/powerpc/pseries/ |
| H A D | xics.c | 374 regs = xicp_mem_for_cpu(PCPU_GET(hwref)); in xicp_dispatch() 376 ("Can't find regs for CPU %ld", (uintptr_t)PCPU_GET(hwref))); in xicp_dispatch() 386 opal_call(OPAL_INT_GET_XIRR, &cpu_xirr[PCPU_GET(cpuid)], in xicp_dispatch() 388 xirr = cpu_xirr[PCPU_GET(cpuid)]; in xicp_dispatch() 408 PCPU_GET(hwref), 0xff); in xicp_dispatch() 411 phyp_hcall(H_IPI, (uint64_t)(PCPU_GET(hwref)), in xicp_dispatch() 437 cpu = PCPU_GET(hwref); in xicp_enable() 486 bus_write_4(xicp_mem_for_cpu(PCPU_GET(hwref)), 4, xirr); in xicp_eoi()
|
| /freebsd/sys/arm64/spe/ |
| H A D | arm_spe_backend.c | 362 struct arm_spe_info *info = spe_info[PCPU_GET(cpuid)]; in arm_spe_enable() 367 dprintf("%s on cpu:%d\n", __func__, PCPU_GET(cpuid)); in arm_spe_enable() 377 WRITE_SPECIALREG(CONTEXTIDR_EL1_REG, PCPU_GET(cpuid)); in arm_spe_enable() 414 CPU_SET(PCPU_GET(cpuid), &ctx->cpu_map); in arm_spe_enable() 458 struct arm_spe_info *info = spe_info[PCPU_GET(cpuid)]; in arm_spe_disable_nolock() 465 dprintf("%s on cpu:%d\n", __func__, PCPU_GET(cpuid)); in arm_spe_disable_nolock() 489 CPU_CLR(PCPU_GET(cpuid), &ctx->cpu_map); in arm_spe_disable_nolock() 495 struct arm_spe_info *info = spe_info[PCPU_GET(cpuid)]; in arm_spe_disable() 561 struct arm_spe_info *info = spe_info[PCPU_GET(cpuid)]; in spe_backend_disable() 627 struct arm_spe_info *info = spe_info[PCPU_GET(cpuid)]; in arm_spe_reenable()
|
| /freebsd/sys/arm64/arm64/ |
| H A D | cpu_feat.c | 58 if (stage == CPU_FEAT_EARLY_BOOT && PCPU_GET(cpuid) == 0) { in enable_cpu_feat() 78 PCPU_GET(cpuid) != 0) in enable_cpu_feat() 151 MPASS(PCPU_GET(cpuid) == 0); in enable_cpu_feat_after_dev()
|
| H A D | gic_v3.c | 226 rdist = sc->gic_redists.pcpu[PCPU_GET(cpuid)].res; in gic_r_read_4() 227 offset += sc->gic_redists.pcpu[PCPU_GET(cpuid)].offset; in gic_r_read_4() 238 rdist = sc->gic_redists.pcpu[PCPU_GET(cpuid)].res; in gic_r_read_8() 239 offset += sc->gic_redists.pcpu[PCPU_GET(cpuid)].offset; in gic_r_read_8() 250 rdist = sc->gic_redists.pcpu[PCPU_GET(cpuid)].res; in gic_r_write_4() 251 offset += sc->gic_redists.pcpu[PCPU_GET(cpuid)].offset; in gic_r_write_4() 262 rdist = sc->gic_redists.pcpu[PCPU_GET(cpuid)].res; in gic_r_write_8() 263 offset += sc->gic_redists.pcpu[PCPU_GET(cpuid)].offset; in gic_r_write_8() 495 *result = (uintptr_t)&sc->gic_redists.pcpu[PCPU_GET(cpuid)]; in gic_v3_read_ivar() 870 CPU_SET(PCPU_GET(cpuid), &isrc->isrc_cpu); in gic_v3_setup_intr_periph() [all …]
|
| H A D | cpu_errata.c | 127 if (PCPU_GET(cpuid) == 0) { in install_cpu_errata() 141 MPASS(PCPU_GET(cpuid) == 0); in install_cpu_errata_late()
|
| /freebsd/sys/x86/xen/ |
| H A D | xen_apic.c | 127 rc = HYPERVISOR_vcpu_op(VCPUOP_send_nmi, PCPU_GET(vcpu_id), NULL); in send_nmi() 139 if (cpu != PCPU_GET(cpuid)) { in send_nmi() 196 self = PCPU_GET(cpuid); in xen_pv_lapic_ipi_vectored() 228 (*ipi_rendezvous_counts[PCPU_GET(cpuid)])++; in xen_smp_rendezvous_action()
|
| /freebsd/sys/powerpc/powerpc/ |
| H A D | mp_machdep.c | 99 printf("SMP: AP CPU #%d launched\n", PCPU_GET(cpuid)); in machdep_ap_bootstrap() 102 PCPU_GET(cpuid), ap_awake == mp_ncpus ? "\n" : " "); in machdep_ap_bootstrap() 245 pc->pc_flags = PCPU_GET(flags); /* Copy cached CPU flags */ in cpu_mp_unleash() 324 cpuid = PCPU_GET(cpuid); in powerpc_ipi_handler()
|
| H A D | interrupt.c | 120 if (pmc_hook && (PCPU_GET(curthread)->td_pflags & TDP_CALLCHAIN)) in powerpc_interrupt() 121 pmc_hook(PCPU_GET(curthread), PMC_FN_USER_CALLCHAIN, framep); in powerpc_interrupt()
|
| /freebsd/sys/kern/ |
| H A D | sched_4bsd.c | 688 runq_not_empty(&runq_pcpu[PCPU_GET(cpuid)])); in sched_4bsd_runnable() 1025 CPU_CLR(PCPU_GET(cpuid), &idle_cpus_mask); in sched_4bsd_sswitch() 1122 CPU_SET(PCPU_GET(cpuid), &idle_cpus_mask); in sched_4bsd_sswitch() 1125 td->td_oncpu = PCPU_GET(cpuid); in sched_4bsd_sswitch() 1181 me = PCPU_GET(cpuid); in forward_wakeup() 1386 cpuid = PCPU_GET(cpuid); in sched_4bsd_add() 1496 tdcpu = runq_choose(&runq_pcpu[PCPU_GET(cpuid)]); in sched_4bsd_choose() 1502 PCPU_GET(cpuid)); in sched_4bsd_choose() 1504 rq = &runq_pcpu[PCPU_GET(cpuid)]; in sched_4bsd_choose() 1517 runq_length[PCPU_GET(cpuid)]--; in sched_4bsd_choose() [all …]
|
| /freebsd/sys/dev/xen/control/ |
| H A D | control.c | 198 KASSERT((PCPU_GET(cpuid) == 0), ("Not running on CPU#0")); in xctrl_suspend() 218 CPU_CLR(PCPU_GET(cpuid), &cpu_suspend_map); in xctrl_suspend() 230 CPU_CLR(PCPU_GET(cpuid), &cpu_suspend_map); in xctrl_suspend()
|
| /freebsd/sys/powerpc/include/ |
| H A D | counter.h | 70 PCPU_GET(cpuid))) = 0; in counter_u64_zero_one_cpu() 136 PCPU_GET(cpuid))) = 0; in counter_u64_zero_one_cpu()
|
| /freebsd/sys/dev/hwt/ |
| H A D | hwt_hook.c | 69 cpu_id = PCPU_GET(cpuid); in hwt_switch_in() 105 cpu_id = PCPU_GET(cpuid); in hwt_switch_out() 139 cpu_id = PCPU_GET(cpuid); in hwt_hook_thread_exit()
|