/freebsd/sys/amd64/amd64/ |
H A D | mp_machdep.c | 153 boot_cpu_id = PCPU_GET(apic_id); in cpu_mp_start() 156 KASSERT(boot_cpu_id == PCPU_GET(apic_id), in cpu_mp_start() 565 return (invl_scoreboard_getcpu(cpu) + PCPU_GET(cpuid)); in invl_scoreboard_slot() 629 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() 815 (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; in invltlb_invpcid_pti_handler() [all …]
|
H A D | fpu.c | 495 if (curthread == PCPU_GET(fpcurthread)) { in fpuexit() 712 if (PCPU_GET(fpcurthread) != curthread) { in fputrap_x87() 731 if (PCPU_GET(fpcurthread) != curthread) in fputrap_sse() 804 if (__predict_false(PCPU_GET(fpcurthread) == td)) { in fpudna() 813 if (__predict_false(PCPU_GET(fpcurthread) != NULL)) { in fpudna() 816 PCPU_GET(fpcurthread), in fpudna() 817 PCPU_GET(fpcurthread)->td_tid, td, td->td_tid); in fpudna() 832 } else if (PCPU_GET(fpcurthread) != td) { in fpu_activate_sw() 842 td = PCPU_GET(fpcurthread); in fpudrop() 877 if (td == PCPU_GET(fpcurthread) && PCB_USER_FPU(pcb)) { in fpugetregs() [all …]
|
H A D | trap.c | 495 if ((PCPU_GET(curpmap)->pm_ucr3 != in trap() 497 (frame->tf_rsp == (uintptr_t)PCPU_GET( in trap() 499 frame->tf_rsp = PCPU_GET(rsp0) - 5 * in trap() 685 return (PCPU_GET(curpmap)->pm_ucr3 != PMAP_NO_CR3 && in trap_is_pti() 689 (PCPU_GET(curpmap)->pm_cr3 & ~CR3_PCID_MASK)); in trap_is_pti() 891 printf("cpuid = %d; ", PCPU_GET(cpuid)); in trap_diag() 892 printf("apic id = %02x\n", PCPU_GET(apic_id)); in trap_diag() 1016 printf("cpuid = %d; ", PCPU_GET(cpuid)); in dblfault_handler() 1017 printf("apic id = %02x\n", PCPU_GET(apic_id)); in dblfault_handler()
|
/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() 575 CPU_CLR(PCPU_GET(cpuid), &mask); in smp_targeted_tlb_shootdown() 590 CPU_CLR(PCPU_GET(cpuid), &other_cpus); in smp_targeted_tlb_shootdown() 658 xhits_gbl[PCPU_GET(cpuid)]++; in invltlb_handler() 661 (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; in invltlb_handler() 681 xhits_pg[PCPU_GET(cpuid)]++; in invlpg_handler() 684 (*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/x86/x86/ |
H A D | mca.c | 684 rec->mr_apic_id = PCPU_GET(apic_id); in mca_check_status() 689 rec->mr_cpu = PCPU_GET(cpuid); in mca_check_status() 843 cc = &cmc_state[PCPU_GET(cpuid)][bank]; in cmci_update() 868 cc = &amd_et_state[PCPU_GET(cpuid)][bank]; in amd_thresholding_update() 909 if (mode == CMCI && !(PCPU_GET(cmci_mask) & 1 << i)) in mca_scan() 927 if (PCPU_GET(cmci_mask) & 1 << i) { in mca_scan() 1180 KASSERT(i < mca_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); in cmci_monitor() 1190 PCPU_GET(cpuid), PCPU_GET(apic_id), in cmci_monitor() 1191 PCPU_GET(acpi_id)); in cmci_monitor() 1210 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() 1109 if (cpu_info[PCPU_GET(apic_id)].cpu_hyperthread) in init_secondary_tail() 1328 int cpu = PCPU_GET(cpuid); in ipi_bitmap_handler() 1438 CPU_CLR(PCPU_GET(cpuid), &other_cpus); in ipi_all_but_self() 1444 cpu = PCPU_GET(cpuid); in ipi_all_but_self() 1480 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 | 726 if (cpu != PCPU_GET(cpuid)) in dbg_setup_xpoint() 782 if (cpu != PCPU_GET(cpuid)) in dbg_remove_xpoint() 874 cpuid = PCPU_GET(cpuid); in dbg_reset_state() 1005 PCPU_GET(cpuid)); in dbg_monitor_init() 1029 "state on CPU%d", __func__, PCPU_GET(cpuid))); in dbg_monitor_init_secondary() 1037 " on CPU%d", __func__, PCPU_GET(cpuid))); in dbg_monitor_init_secondary() 1057 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/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/arm64/arm64/ |
H A D | cpu_errata.c | 135 if (PCPU_GET(cpuid) == 0) { in install_ssbd_workaround() 223 if (PCPU_GET(cpuid) == 0) { in install_cpu_errata() 237 MPASS(PCPU_GET(cpuid) == 0); in install_cpu_errata_late()
|
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() 866 CPU_SET(PCPU_GET(cpui in gic_v3_setup_intr_periph() [all...] |
H A D | cpu_feat.c | 58 PCPU_GET(cpuid) != 0) in enable_cpu_feat() 108 MPASS(PCPU_GET(cpuid) == 0); in enable_cpu_feat_after_dev()
|
H A D | efirt_machdep.c | 251 if (PCPU_GET(bcast_tlbi_workaround) != 0) in efi_arch_enter() 271 set_ttbr0(pmap_to_ttbr0(PCPU_GET(curpmap))); in efi_arch_leave() 272 if (PCPU_GET(bcast_tlbi_workaround) != 0) in efi_arch_leave()
|
/freebsd/sys/powerpc/powerpc/ |
H A D | mp_machdep.c | 98 printf("SMP: AP CPU #%d launched\n", PCPU_GET(cpuid)); in machdep_ap_bootstrap() 101 PCPU_GET(cpuid), ap_awake == mp_ncpus ? "\n" : " "); in machdep_ap_bootstrap() 244 pc->pc_flags = PCPU_GET(flags); /* Copy cached CPU flags */ in cpu_mp_unleash() 323 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 | 690 return runq_check(&runq) + runq_check(&runq_pcpu[PCPU_GET(cpuid)]); in sched_runnable() 1031 CPU_CLR(PCPU_GET(cpuid), &idle_cpus_mask); in sched_switch() 1123 CPU_SET(PCPU_GET(cpuid), &idle_cpus_mask); in sched_switch() 1126 td->td_oncpu = PCPU_GET(cpuid); in sched_switch() 1182 me = PCPU_GET(cpuid); in forward_wakeup() 1387 cpuid = PCPU_GET(cpuid); in sched_add() 1497 tdcpu = runq_choose(&runq_pcpu[PCPU_GET(cpuid)]); in sched_choose() 1503 PCPU_GET(cpuid)); in sched_choose() 1505 rq = &runq_pcpu[PCPU_GET(cpuid)]; in sched_choose() 1518 runq_length[PCPU_GET(cpui in sched_choose() [all...] |
/freebsd/sys/dev/xen/control/ |
H A D | control.c | 197 KASSERT((PCPU_GET(cpuid) == 0), ("Not running on CPU#0")); in xctrl_suspend() 217 CPU_CLR(PCPU_GET(cpuid), &cpu_suspend_map); in xctrl_suspend() 229 CPU_CLR(PCPU_GET(cpuid), &cpu_suspend_map); in xctrl_suspend()
|
/freebsd/sys/arm64/include/ |
H A D | cpu.h | 175 (((mask) & PCPU_GET(midr)) == \ 179 (((mask) & PCPU_GET(midr)) == ((mask) & (devid))) 243 (CPU_AFF2(CPU_AFFINITY(PCPU_GET(cpuid))))
|
/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()
|