| /freebsd-12.1/sys/amd64/amd64/ |
| H A D | mp_machdep.c | 249 boot_cpu_id = PCPU_GET(apic_id); in cpu_mp_start() 510 xhits_gbl[PCPU_GET(cpuid)]++; in invltlb_invpcid_handler() 532 xhits_gbl[PCPU_GET(cpuid)]++; in invltlb_invpcid_pti_handler() 565 xhits_gbl[PCPU_GET(cpuid)]++; in invltlb_pcid_handler() 603 xhits_pg[PCPU_GET(cpuid)]++; in invlpg_invpcid_handler() 606 (*ipi_invlpg_counts[PCPU_GET(cpuid)])++; in invlpg_invpcid_handler() 629 xhits_pg[PCPU_GET(cpuid)]++; in invlpg_pcid_handler() 632 (*ipi_invlpg_counts[PCPU_GET(cpuid)])++; in invlpg_pcid_handler() 637 if (smp_tlb_pmap == PCPU_GET(curpmap) && in invlpg_pcid_handler() 655 xhits_rng[PCPU_GET(cpuid)]++; in invlrng_invpcid_handler() [all …]
|
| H A D | fpu.c | 442 if (curthread == PCPU_GET(fpcurthread)) { in fpuexit() 659 if (PCPU_GET(fpcurthread) != curthread) { in fputrap_x87() 678 if (PCPU_GET(fpcurthread) != curthread) in fputrap_sse() 751 if (__predict_false(PCPU_GET(fpcurthread) == td)) { in fpudna() 763 PCPU_GET(fpcurthread), in fpudna() 779 } else if (PCPU_GET(fpcurthread) != td) { in fpu_activate_sw() 789 td = PCPU_GET(fpcurthread); in fpudrop() 1084 if (curthread == PCPU_GET(fpcurthread)) { in fpu_kern_enter() 1088 KASSERT(PCPU_GET(fpcurthread) == NULL, in fpu_kern_enter() 1129 KASSERT(PCPU_GET(fpcurthread) == NULL, in fpu_kern_leave() [all …]
|
| H A D | trap.c | 494 if ((PCPU_GET(curpmap)->pm_ucr3 != in trap() 496 (frame->tf_rsp == (uintptr_t)PCPU_GET( in trap() 498 frame->tf_rsp = PCPU_GET(rsp0) - 5 * in trap() 708 return (PCPU_GET(curpmap)->pm_ucr3 != PMAP_NO_CR3 && in trap_is_pti() 712 (PCPU_GET(curpmap)->pm_cr3 & ~CR3_PCID_MASK)); in trap_is_pti() 888 sdtossd(&gdt[NGDT * PCPU_GET(cpuid) + IDXSEL(frame->tf_cs & 0xffff)], 896 printf("cpuid = %d; ", PCPU_GET(cpuid)); 897 printf("apic id = %02x\n", PCPU_GET(apic_id)); 999 printf("cpuid = %d; ", PCPU_GET(cpuid)); in dblfault_handler() 1000 printf("apic id = %02x\n", PCPU_GET(apic_id)); in dblfault_handler()
|
| /freebsd-12.1/sys/sparc64/sparc64/ |
| H A D | spitfire.c | 77 for (addr = 0; addr < PCPU_GET(cache.dc_size); in spitfire_cache_flush() 78 addr += PCPU_GET(cache.dc_linesize)) in spitfire_cache_flush() 80 for (addr = 0; addr < PCPU_GET(cache.ic_size); in spitfire_cache_flush() 81 addr += PCPU_GET(cache.ic_linesize)) in spitfire_cache_flush() 100 for (addr = 0; addr < PCPU_GET(cache.dc_size); in spitfire_dcache_page_inval() 101 addr += PCPU_GET(cache.dc_linesize)) { in spitfire_dcache_page_inval() 129 for (addr = 0; addr < PCPU_GET(cache.ic_size); in spitfire_icache_page_inval() 130 addr += PCPU_GET(cache.ic_linesize)) { in spitfire_icache_page_inval()
|
| H A D | tick.c | 156 clock = PCPU_GET(clock); in cpu_initclocks() 158 if (PCPU_GET(impl) == CPU_IMPL_SPARC64V || in cpu_initclocks() 159 PCPU_GET(impl) >= CPU_IMPL_ULTRASPARCIII) { in cpu_initclocks() 179 if (PCPU_GET(impl) >= CPU_IMPL_ULTRASPARCI && in cpu_initclocks() 180 PCPU_GET(impl) < CPU_IMPL_ULTRASPARCIII) in cpu_initclocks() 266 tick_increment = PCPU_GET(tickincrement); in tick_intr() 277 adj = PCPU_GET(tickadj); in tick_intr() 281 ref = PCPU_GET(tickref); in tick_intr() 392 tick_stop(PCPU_GET(impl)); in tick_et_stop()
|
| H A D | cheetah.c | 164 for (addr = 0; addr < PCPU_GET(cache.dc_size); in cheetah_cache_flush() 165 addr += PCPU_GET(cache.dc_linesize)) in cheetah_cache_flush() 181 addr < PCPU_GET(cache.ic_size) * 2; in cheetah_cache_flush() 182 addr += PCPU_GET(cache.ic_linesize) * 2) in cheetah_cache_flush() 205 pa += PCPU_GET(cache.dc_linesize)) in cheetah_dcache_page_inval() 283 if (PCPU_GET(impl) == CPU_IMPL_ULTRASPARCIVp) { in cheetah_tlb_flush_user()
|
| H A D | tlb.c | 84 if (CPU_ISSET(PCPU_GET(cpuid), &pm->pm_active)) { in tlb_context_demap() 105 if (CPU_ISSET(PCPU_GET(cpuid), &pm->pm_active)) { in tlb_page_demap() 132 if (CPU_ISSET(PCPU_GET(cpuid), &pm->pm_active)) { in tlb_range_demap()
|
| /freebsd-12.1/sys/x86/x86/ |
| H A D | mca.c | 479 rec->mr_apic_id = PCPU_GET(apic_id); in mca_check_status() 484 rec->mr_cpu = PCPU_GET(cpuid); in mca_check_status() 625 cc = &cmc_state[PCPU_GET(cpuid)][bank]; in cmci_update() 721 if (PCPU_GET(cmci_mask) & 1 << i) { in mca_scan() 929 cc = &cmc_state[PCPU_GET(cpuid)][i]; in cmci_monitor() 960 if (!(PCPU_GET(cmci_mask) & 1 << i)) in cmci_resume() 963 cc = &cmc_state[PCPU_GET(cpuid)][i]; in cmci_resume() 1055 cc = &amd_et_state[PCPU_GET(cpuid)][i]; in amd_thresholding_monitor() 1071 if (!(PCPU_GET(cmci_mask) & 1 << i)) in amd_thresholding_resume() 1074 cc = &amd_et_state[PCPU_GET(cpuid)][i]; in amd_thresholding_resume() [all …]
|
| H A D | mp_x86.c | 1002 cpuid = PCPU_GET(cpuid); in init_secondary_tail() 1003 if (PCPU_GET(apic_id) != lapic_id()) { in init_secondary_tail() 1238 int cpu = PCPU_GET(cpuid); in ipi_bitmap_handler() 1351 cpuid = PCPU_GET(cpuid); in ipi_nmi_handler() 1368 cpu = PCPU_GET(cpuid); in nmi_call_kdb_smp() 1393 cpu = PCPU_GET(cpuid); in cpustop_handler() 1441 cpu = PCPU_GET(cpuid); in cpususpend_handler() 1623 CPU_CLR(PCPU_GET(cpuid), &mask); in smp_targeted_tlb_shootdown() 1717 xhits_gbl[PCPU_GET(cpuid)]++; in invltlb_handler() 1743 xhits_pg[PCPU_GET(cpuid)]++; in invlpg_handler() [all …]
|
| /freebsd-12.1/sys/mips/mips/ |
| H A D | mp_machdep.c | 84 CPU_CLR(PCPU_GET(cpuid), &other_cpus); in ipi_all_but_self() 121 cpu = PCPU_GET(cpuid); in mips_ipi_handler() 312 KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); in smp_init_secondary() 313 PCPU_SET(curthread, PCPU_GET(idlethread)); in smp_init_secondary() 319 CTR1(KTR_SMP, "SMP: AP CPU #%d launched", PCPU_GET(cpuid)); in smp_init_secondary() 322 printf("SMP: AP CPU #%d launched.\n", PCPU_GET(cpuid)); in smp_init_secondary()
|
| /freebsd-12.1/sys/arm64/arm64/ |
| H A D | debug_monitor.c | 185 if (dbg_ref_count_mde[PCPU_GET(cpuid)] > 0) { in kdb_cpu_set_singlestep() 199 if (dbg_ref_count_mde[PCPU_GET(cpuid)] > 0) { in kdb_cpu_clear_singlestep() 204 if (dbg_ref_count_kde[PCPU_GET(cpuid)] > 0) { in kdb_cpu_clear_singlestep() 339 if (atomic_fetchadd_int(&dbg_ref_count_mde[PCPU_GET(cpuid)], 1) == 0) in dbg_enable_monitor() 343 atomic_fetchadd_int(&dbg_ref_count_kde[PCPU_GET(cpuid)], 1) == 0) in dbg_enable_monitor() 355 if (atomic_fetchadd_int(&dbg_ref_count_mde[PCPU_GET(cpuid)], -1) == 1) in dbg_disable_monitor() 359 atomic_fetchadd_int(&dbg_ref_count_kde[PCPU_GET(cpuid)], -1) == 1) in dbg_disable_monitor() 460 if (bootverbose && PCPU_GET(cpuid) == 0) { in dbg_monitor_init()
|
| H A D | vfp.c | 95 if (PCPU_GET(fpcurthread) == td) in vfp_discard() 191 KASSERT(PCPU_GET(fpcurthread) == td, in vfp_save_state() 209 cpu = PCPU_GET(cpuid); in vfp_restore_state() 220 if (PCPU_GET(fpcurthread) != curthread || cpu != curpcb->pcb_vfpcpu) { in vfp_restore_state() 282 if (curthread == PCPU_GET(fpcurthread)) { in fpu_kern_enter() 323 KASSERT(PCPU_GET(fpcurthread) == NULL, in fpu_kern_leave()
|
| H A D | gic_v3.c | 206 bus_write_4(sc->gic_redists.pcpu[PCPU_GET(cpuid)], offset, val); in gic_r_write_4() 215 bus_write_8(sc->gic_redists.pcpu[PCPU_GET(cpuid)], offset, val); in gic_r_write_8() 387 sc->gic_redists.pcpu[PCPU_GET(cpuid)]); in gic_v3_read_ivar() 698 CPU_SET(PCPU_GET(cpuid), &isrc->isrc_cpu); in gic_v3_setup_intr() 865 cpu = PCPU_GET(cpuid); in gic_v3_init_secondary() 958 CPU_SET(PCPU_GET(cpuid), &isrc->isrc_cpu); in gic_v3_ipi_setup() 975 cpuid = PCPU_GET(cpuid); in gic_v3_wait_for_rwp() 1011 cpuid = PCPU_GET(cpuid); in gic_v3_cpu_enable_sre() 1142 cpuid = PCPU_GET(cpuid); in gic_v3_redist_find() 1217 PCPU_GET(cpuid)); in gic_v3_redist_wake() [all …]
|
| /freebsd-12.1/sys/i386/i386/ |
| H A D | npx.c | 562 if (curthread == PCPU_GET(fpcurthread)) { in npxexit() 804 if (PCPU_GET(fpcurthread) != curthread) { in npxtrap_x87() 827 if (PCPU_GET(fpcurthread) != curthread) in npxtrap_sse() 887 if (__predict_false(PCPU_GET(fpcurthread) == td)) { in npxdna() 899 PCPU_GET(fpcurthread), in npxdna() 900 PCPU_GET(fpcurthread)->td_proc->p_pid, in npxdna() 935 } else if (PCPU_GET(fpcurthread) != td) { in npxswitch() 951 if (PCPU_GET(fpcurthread) == NULL) { in npxsuspend() 988 td = PCPU_GET(fpcurthread); in npxdrop() 1023 if (td == PCPU_GET(fpcurthread)) { in npxgetregs() [all …]
|
| /freebsd-12.1/sys/powerpc/pseries/ |
| H A D | xics.c | 362 regs = xicp_mem_for_cpu(PCPU_GET(hwref)); in xicp_dispatch() 364 ("Can't find regs for CPU %ld", (uintptr_t)PCPU_GET(hwref))); in xicp_dispatch() 374 opal_call(OPAL_INT_GET_XIRR, &cpu_xirr[PCPU_GET(cpuid)], in xicp_dispatch() 376 xirr = cpu_xirr[PCPU_GET(cpuid)]; in xicp_dispatch() 396 PCPU_GET(hwref), 0xff); in xicp_dispatch() 399 phyp_hcall(H_IPI, (uint64_t)(PCPU_GET(hwref)), in xicp_dispatch() 426 cpu = PCPU_GET(hwref); in xicp_enable() 474 bus_write_4(xicp_mem_for_cpu(PCPU_GET(hwref)), 4, xirr); in xicp_eoi()
|
| /freebsd-12.1/sys/sys/ |
| H A D | callout.h | 111 callout_reset_sbt_on((c), (sbt), (pr), (fn), (arg), PCPU_GET(cpuid),\ 119 callout_reset_on((c), (on_tick), (fn), (arg), PCPU_GET(cpuid)) 126 callout_schedule_sbt_on((c), (sbt), (pr), PCPU_GET(cpuid), (flags)) 130 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) 215 #define curcpu PCPU_GET(cpuid) 218 #define curthread PCPU_GET(curthread) 220 #define curvidata PCPU_GET(vidata)
|
| /freebsd-12.1/sys/sparc64/include/ |
| H A D | smp.h | 153 CPU_CLR(PCPU_GET(cpuid), &cpus); in ipi_all_but_self() 196 CPU_CLR(PCPU_GET(cpuid), &ica->ica_mask); in ipi_dcache_page_inval() 213 CPU_CLR(PCPU_GET(cpuid), &ica->ica_mask); in ipi_icache_page_inval() 246 CPU_CLR(PCPU_GET(cpuid), &cpus); in ipi_tlb_context_demap() 271 CPU_CLR(PCPU_GET(cpuid), &cpus); in ipi_tlb_page_demap() 296 CPU_CLR(PCPU_GET(cpuid), &cpus); in ipi_tlb_range_demap()
|
| /freebsd-12.1/sys/arm/arm/ |
| H A D | vfp.c | 141 if (PCPU_GET(cpuid) == 0) { in vfp_init() 227 cpu = PCPU_GET(cpuid); in vfp_bounce() 228 if (curpcb->pcb_vfpcpu != cpu || curthread != PCPU_GET(fpcurthread)) { in vfp_bounce() 318 if (PCPU_GET(fpcurthread) == td) in vfp_discard()
|
| /freebsd-12.1/sys/arm64/include/ |
| H A D | cpu.h | 127 (((mask) & PCPU_GET(midr)) == \ 131 (((mask) & PCPU_GET(midr)) == ((mask) & (devid))) 171 (CPU_AFF2(CPU_AFFINITY(PCPU_GET(cpuid))))
|
| /freebsd-12.1/sys/riscv/riscv/ |
| H A D | plic.c | 99 cpu = PCPU_GET(cpuid); in plic_intr() 122 cpu = PCPU_GET(cpuid); in plic_disable_intr() 142 cpu = PCPU_GET(cpuid); in plic_enable_intr() 229 cpu = PCPU_GET(cpuid); in plic_attach()
|
| /freebsd-12.1/sys/kern/ |
| H A D | sched_4bsd.c | 989 CPU_CLR(PCPU_GET(cpuid), &idle_cpus_mask); in sched_switch() 1082 CPU_SET(PCPU_GET(cpuid), &idle_cpus_mask); in sched_switch() 1085 td->td_oncpu = PCPU_GET(cpuid); in sched_switch() 1132 me = PCPU_GET(cpuid); in forward_wakeup() 1334 cpuid = PCPU_GET(cpuid); in sched_add() 1443 PCPU_GET(cpuid)); in sched_choose() 1445 rq = &runq_pcpu[PCPU_GET(cpuid)]; in sched_choose() 1458 runq_length[PCPU_GET(cpuid)]--; in sched_choose() 1467 return (PCPU_GET(idlethread)); in sched_choose() 1506 if (PCPU_GET(cpuid) == cpu) in sched_bind() [all …]
|
| /freebsd-12.1/sys/powerpc/powerpc/ |
| H A D | interrupt.c | 121 if (pmc_hook && (PCPU_GET(curthread)->td_pflags & TDP_CALLCHAIN)) in powerpc_interrupt() 122 pmc_hook(PCPU_GET(curthread), PMC_FN_USER_CALLCHAIN, framep); in powerpc_interrupt()
|
| /freebsd-12.1/sys/dev/xen/control/ |
| H A D | control.c | 221 KASSERT((PCPU_GET(cpuid) == 0), ("Not running on CPU#0")); in xctrl_suspend() 248 CPU_CLR(PCPU_GET(cpuid), &cpu_suspend_map); in xctrl_suspend() 260 CPU_CLR(PCPU_GET(cpuid), &cpu_suspend_map); in xctrl_suspend()
|
| /freebsd-12.1/sys/mips/cavium/ |
| H A D | octeon_mp.c | 62 action = cvmx_read_csr(CVMX_CIU_MBOX_CLRX(PCPU_GET(cpuid))); in platform_ipi_clear() 64 cvmx_write_csr(CVMX_CIU_MBOX_CLRX(PCPU_GET(cpuid)), action); in platform_ipi_clear()
|