Home
last modified time | relevance | path

Searched refs:pcpu (Results 1 – 25 of 118) sorted by relevance

12345

/freebsd-14-stable/sys/kern/
HDsubr_pcpu.c77 struct pcpu *cpuid_to_pcpu[MAXCPU];
84 pcpu_init(struct pcpu *pcpu, int cpuid, size_t size) in pcpu_init() argument
87 bzero(pcpu, size); in pcpu_init()
90 pcpu->pc_cpuid = cpuid; in pcpu_init()
91 cpuid_to_pcpu[cpuid] = pcpu; in pcpu_init()
92 STAILQ_INSERT_TAIL(&cpuhead, pcpu, pc_allcpu); in pcpu_init()
93 cpu_pcpu_init(pcpu, cpuid, size); in pcpu_init()
94 pcpu->pc_rm_queue.rmq_next = &pcpu->pc_rm_queue; in pcpu_init()
95 pcpu->pc_rm_queue.rmq_prev = &pcpu->pc_rm_queue; in pcpu_init()
96 pcpu->pc_zpcpu_offset = zpcpu_offset_cpu(cpuid); in pcpu_init()
[all …]
HDkern_rmlock.c140 struct pcpu *pc; in unlock_rm()
202 rm_tracker_add(struct pcpu *pc, struct rm_priotracker *tracker) in rm_tracker_add()
223 rm_trackers_present(const struct pcpu *pc, const struct rmlock *rm, in rm_trackers_present()
241 rm_tracker_remove(struct pcpu *pc, struct rm_priotracker *tracker) in rm_tracker_remove()
258 struct pcpu *pc; in rm_cleanIPI()
351 struct pcpu *pc; in _rm_rlock_hard()
437 struct pcpu *pc; in _rm_rlock()
507 struct pcpu *pc; in _rm_runlock()
839 struct pcpu *pc; in db_show_rm()
904 return (zpcpu_get(rms->pcpu)); in rms_int_pcpu()
[all …]
/freebsd-14-stable/sys/cddl/dev/profile/
HDprofile.c265 profile_probe_percpu_t *pcpu = arg; in profile_fire() local
266 profile_probe_t *prof = pcpu->profc_probe; in profile_fire()
269 late = sbt_to_nsec(sbinuptime() - pcpu->profc_expected); in profile_fire()
272 pcpu->profc_expected += pcpu->profc_interval; in profile_fire()
273 callout_schedule_sbt_curcpu(&pcpu->profc_cyclic, in profile_fire()
274 pcpu->profc_expected, 0, C_DIRECT_EXEC | C_ABSOLUTE); in profile_fire()
475 profile_probe_percpu_t *pcpu; in profile_online() local
477 pcpu = kmem_zalloc(sizeof (profile_probe_percpu_t), KM_SLEEP); in profile_online()
478 pcpu->profc_probe = prof; in profile_online()
481 hdlr->cyh_arg = pcpu; in profile_online()
[all …]
/freebsd-14-stable/sys/i386/i386/
HDgenassym.c189 ASSYM(PC_SIZEOF, sizeof(struct pcpu));
190 ASSYM(PC_PRVSPACE, offsetof(struct pcpu, pc_prvspace));
191 ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread));
192 ASSYM(PC_FPCURTHREAD, offsetof(struct pcpu, pc_fpcurthread));
193 ASSYM(PC_IDLETHREAD, offsetof(struct pcpu, pc_idlethread));
194 ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb));
195 ASSYM(PC_COMMON_TSSP, offsetof(struct pcpu, pc_common_tssp));
196 ASSYM(PC_COMMON_TSSD, offsetof(struct pcpu, pc_common_tssd));
197 ASSYM(PC_TSS_GDT, offsetof(struct pcpu, pc_tss_gdt));
198 ASSYM(PC_FSGS_GDT, offsetof(struct pcpu, pc_fsgs_gdt));
[all …]
/freebsd-14-stable/sys/amd64/amd64/
HDgenassym.c237 ASSYM(PC_SIZEOF, sizeof(struct pcpu));
238 ASSYM(PC_PRVSPACE, offsetof(struct pcpu, pc_prvspace));
239 ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread));
240 ASSYM(PC_FPCURTHREAD, offsetof(struct pcpu, pc_fpcurthread));
241 ASSYM(PC_IDLETHREAD, offsetof(struct pcpu, pc_idlethread));
242 ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb));
243 ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid));
244 ASSYM(PC_SCRATCH_RSP, offsetof(struct pcpu, pc_scratch_rsp));
245 ASSYM(PC_SCRATCH_RAX, offsetof(struct pcpu, pc_scratch_rax));
246 ASSYM(PC_CURPMAP, offsetof(struct pcpu, pc_curpmap));
[all …]
/freebsd-14-stable/sys/arm64/include/
HDpcpu.h59 struct pcpu;
61 register struct pcpu *pcpup __asm ("x18");
63 static inline struct pcpu *
66 struct pcpu *pcpu; in get_pcpu() local
68 __asm __volatile("mov %0, x18" : "=&r"(pcpu)); in get_pcpu()
69 return (pcpu); in get_pcpu()
/freebsd-14-stable/sys/sys/
HDpcpu.h175 struct pcpu { struct
185 STAILQ_ENTRY(pcpu) pc_allcpu; argument
213 STAILQ_HEAD(cpuhead, pcpu);
216 extern struct pcpu *cpuid_to_pcpu[];
316 void cpu_pcpu_init(struct pcpu *pcpu, int cpuid, size_t size);
317 void db_show_mdpcpu(struct pcpu *pcpu);
323 void pcpu_destroy(struct pcpu *pcpu);
324 struct pcpu *pcpu_find(u_int cpuid);
325 void pcpu_init(struct pcpu *pcpu, int cpuid, size_t size);
/freebsd-14-stable/sys/riscv/include/
HDpcpu.h54 struct pcpu;
56 static inline struct pcpu *
59 struct pcpu *pcpu; in get_pcpu() local
61 __asm __volatile("mv %0, tp" : "=&r"(pcpu)); in get_pcpu()
63 return (pcpu); in get_pcpu()
HDpcpu_aux.h46 _Static_assert(PAGE_SIZE % sizeof(struct pcpu) == 0, "fix pcpu size");
47 _Static_assert(offsetof(struct pcpu, __pad) +
48 sizeof(((struct pcpu *)0)->__pad) == sizeof(struct pcpu),
51 extern struct pcpu __pcpu[];
/freebsd-14-stable/libexec/kgdb/
HDacttrace.py29 pcpu = cpuid_to_pcpu[cpu]
30 if pcpu:
31 yield pcpu
43 for pcpu in all_pcpus():
44 td = pcpu['pc_curthread']
55 p['p_comm'], p['p_pid'], td['td_tid'], pcpu['pc_cpuid']))
/freebsd-14-stable/sys/powerpc/powerpc/
HDgenassym.c59 ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread));
60 ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb));
61 ASSYM(PC_CURPMAP, offsetof(struct pcpu, pc_curpmap));
62 ASSYM(PC_TEMPSAVE, offsetof(struct pcpu, pc_tempsave));
63 ASSYM(PC_DISISAVE, offsetof(struct pcpu, pc_disisave));
64 ASSYM(PC_DBSAVE, offsetof(struct pcpu, pc_dbsave));
65 ASSYM(PC_RESTORE, offsetof(struct pcpu, pc_restore));
66 ASSYM(PC_FLAGS, offsetof(struct pcpu, pc_flags));
69 ASSYM(PC_BOOKE_CRITSAVE, offsetof(struct pcpu, pc_booke.critsave));
70 ASSYM(PC_BOOKE_MCHKSAVE, offsetof(struct pcpu, pc_booke.mchksave));
[all …]
HDmp_machdep.c148 struct pcpu *pc; in cpu_mp_start()
204 struct pcpu *pc; in cpu_mp_announce()
224 struct pcpu *pc; in cpu_mp_unleash()
342 ipi_send(struct pcpu *pc, int ipi) in ipi_send()
359 struct pcpu *pc; in ipi_selected()
379 struct pcpu *pc; in ipi_all_but_self()
/freebsd-14-stable/sys/amd64/include/
HDpcpu.h58 struct pcpu *pc_prvspace; /* Self-reference */ \
118 __typeof(((struct pcpu *)0)->name)
122 static struct pcpu __seg_gs *__pc = 0; \
131 struct pcpu *__pc = get_pcpu(); \
140 static struct pcpu __seg_gs *__pc = 0; \
150 static struct pcpu __seg_gs *__pc = 0; \
165 static struct pcpu __seg_gs *__pc = 0; \
180 __offsetof(struct pcpu, name)
190 : "m" (*(struct pcpu *)(__pcpu_offset(pc_prvspace))), \
260 struct pcpu *__pc; \
[all …]
HDpcpu_aux.h47 _Static_assert(sizeof(struct pcpu) == UMA_PCPU_ALLOC_SIZE, "fix pcpu size");
49 extern struct pcpu *__pcpu;
50 extern struct pcpu temp_bsp_pcpu;
57 __asm("movq %%gs:%P1,%0" : "=r" (td) : "n" (offsetof(struct pcpu, in __curthread()
/freebsd-14-stable/sys/dev/xen/bus/
HDxen_intr.c168 struct xen_intr_pcpu_data *pcpu; in evtchn_cpu_mask_port() local
170 pcpu = DPCPU_ID_PTR(cpu, xen_intr_pcpu); in evtchn_cpu_mask_port()
171 xen_clear_bit(port, pcpu->evtchn_enabled); in evtchn_cpu_mask_port()
190 struct xen_intr_pcpu_data *pcpu; in evtchn_cpu_unmask_port() local
192 pcpu = DPCPU_ID_PTR(cpu, xen_intr_pcpu); in evtchn_cpu_unmask_port()
193 xen_set_bit(port, pcpu->evtchn_enabled); in evtchn_cpu_unmask_port()
327 xen_intr_active_ports(const struct xen_intr_pcpu_data *const pcpu, in xen_intr_active_ports() argument
333 CTASSERT(sizeof(sh->evtchn_mask[0]) == sizeof(pcpu->evtchn_enabled[0])); in xen_intr_active_ports()
335 CTASSERT(sizeof(sh->evtchn_mask) == sizeof(pcpu->evtchn_enabled)); in xen_intr_active_ports()
338 & pcpu->evtchn_enabled[idx]); in xen_intr_active_ports()
[all …]
/freebsd-14-stable/sys/dev/xen/timer/
HDxen_timer.c275 struct xentimer_pcpu_data *pcpu = DPCPU_PTR(xentimer_pcpu); in xentimer_intr() local
277 pcpu->last_processed = xen_fetch_vcpu_time(DPCPU_GET(vcpu_info)); in xentimer_intr()
278 if (pcpu->timer != 0 && sc->et.et_active) in xentimer_intr()
321 struct xentimer_pcpu_data *pcpu = DPCPU_PTR(xentimer_pcpu); in xentimer_et_start() local
341 pcpu->timer = next_time; in xentimer_et_start()
352 struct xentimer_pcpu_data *pcpu = DPCPU_PTR(xentimer_pcpu); in xentimer_et_stop() local
354 pcpu->timer = 0; in xentimer_et_stop()
376 struct xentimer_pcpu_data *pcpu; in xentimer_attach() local
378 pcpu = DPCPU_ID_PTR(i, xentimer_pcpu); in xentimer_attach()
387 NULL, sc, INTR_TYPE_CLK, &pcpu->irq_handle); in xentimer_attach()
[all …]
/freebsd-14-stable/sys/i386/include/
HDpcpu_aux.h43 _Static_assert(sizeof(struct pcpu) == UMA_PCPU_ALLOC_SIZE, "fix pcpu size");
45 extern struct pcpu __pcpu[];
53 : "m" (*(char *)offsetof(struct pcpu, pc_curthread))); in __curthread()
64 : "m" (*(char *)offsetof(struct pcpu, pc_curpcb))); in __curpcb()
HDpcpu.h55 struct pcpu *pc_prvspace; /* Self-reference */ \
100 __offsetof(struct pcpu, name)
106 __typeof(((struct pcpu *)0)->name)
116 : "m" (*(struct pcpu *)(__pcpu_offset(pc_prvspace))), \
186 struct pcpu *__pc; \
190 : "m" (*(struct pcpu *)(__pcpu_offset(pc_prvspace)))); \
/freebsd-14-stable/usr.sbin/bhyve/
HDbhyverun.c285 int vcpu, pcpu; in pincpu_parse() local
287 if (sscanf(opt, "%d:%d", &vcpu, &pcpu) != 2) { in pincpu_parse()
297 if (pcpu < 0 || pcpu >= CPU_SETSIZE) { in pincpu_parse()
299 "0 to %d\n", pcpu, CPU_SETSIZE - 1); in pincpu_parse()
307 value != NULL ? "," : "", pcpu) == -1) { in pincpu_parse()
321 int pcpu, start; in parse_cpuset() local
327 pcpu = strtoul(token, &cp, 0); in parse_cpuset()
330 if (pcpu < 0 || pcpu >= CPU_SETSIZE) in parse_cpuset()
332 pcpu, CPU_SETSIZE - 1); in parse_cpuset()
337 if (start > pcpu) in parse_cpuset()
[all …]
/freebsd-14-stable/sys/dev/random/fenestrasX/
HDfx_main.c147 struct pcpu *pcpu; in _fxrng_alg_read() local
149 pcpu = get_pcpu(); in _fxrng_alg_read()
156 pcpu_brng_p = _DPCPU_PTR(pcpu->pc_dynamic, fxrng_brng); in _fxrng_alg_read()
170 domain = pcpu->pc_domain; in _fxrng_alg_read()
/freebsd-14-stable/sys/arm64/arm64/
HDgic_v3_var.h57 struct redist_pcpu *pcpu; member
141 (sc)->gic_redists.pcpu[cpu].res, \
142 (sc)->gic_redists.pcpu[cpu].offset + (reg)); \
150 (sc)->gic_redists.pcpu[cpu].res, \
151 (sc)->gic_redists.pcpu[cpu].offset + (reg), \
HDgenassym.c48 ASSYM(PCPU_SIZE, sizeof(struct pcpu));
49 ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb));
50 ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread));
51 ASSYM(PC_SSBD, offsetof(struct pcpu, pc_ssbd));
/freebsd-14-stable/sys/arm/arm/
HDgenassym.c81 ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb));
82 ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread));
109 ASSYM(PC_CURPMAP, offsetof(struct pcpu, pc_curpmap));
110 ASSYM(PC_BP_HARDEN_KIND, offsetof(struct pcpu, pc_bp_harden_kind));
123 ASSYM(PCPU_SIZE, sizeof(struct pcpu));
127 ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid));
HDpmu_fdt.c91 struct pcpu *pcpu; in pmu_parse_affinity() local
105 pcpu = pcpu_find(i); in pmu_parse_affinity()
106 if (pcpu != NULL && PCPU_GET_MPIDR(pcpu) == mpidr) { in pmu_parse_affinity()
HDpmu_acpi.c56 struct pcpu *pcpu; in madt_handler() local
74 pcpu = pcpu_find(i); in madt_handler()
75 if (pcpu != NULL && PCPU_GET_MPIDR(pcpu) == intr->ArmMpidr) { in madt_handler()

12345