Home
last modified time | relevance | path

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

123456

/trueos/sys/sparc64/sparc64/
HDcache.c114 cache_init(struct pcpu *pcpu) in cache_init() argument
123 if (pcpu->pc_cpuid == 0 && pcpu->pc_impl == CPU_IMPL_SPARC64V) in cache_init()
126 use_new_prop = cache_new_prop(pcpu->pc_impl); in cache_init()
127 if (OF_GET(pcpu->pc_node, !use_new_prop ? "icache-size" : in cache_init()
128 "l1-icache-size", pcpu->pc_cache.ic_size) == -1 || in cache_init()
129 OF_GET(pcpu->pc_node, !use_new_prop ? "icache-line-size" : in cache_init()
130 "l1-icache-line-size", pcpu->pc_cache.ic_linesize) == -1 || in cache_init()
131 OF_GET(pcpu->pc_node, !use_new_prop ? "icache-associativity" : in cache_init()
132 "l1-icache-associativity", pcpu->pc_cache.ic_assoc) == -1 || in cache_init()
133 OF_GET(pcpu->pc_node, !use_new_prop ? "dcache-size" : in cache_init()
[all …]
HDgenassym.c131 ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread));
132 ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb));
133 ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid));
134 ASSYM(PC_IRHEAD, offsetof(struct pcpu, pc_irhead));
135 ASSYM(PC_IRTAIL, offsetof(struct pcpu, pc_irtail));
136 ASSYM(PC_IRFREE, offsetof(struct pcpu, pc_irfree));
137 ASSYM(PC_CNT, offsetof(struct pcpu, pc_cnt));
138 ASSYM(PC_SIZEOF, sizeof(struct pcpu));
140 ASSYM(PC_CACHE, offsetof(struct pcpu, pc_cache));
141 ASSYM(PC_MID, offsetof(struct pcpu, pc_mid));
[all …]
/trueos/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()
101 struct pcpu *pcpu; in dpcpu_init() local
[all …]
/trueos/sys/sys/
HDpcpu.h150 struct pcpu { struct
159 STAILQ_ENTRY(pcpu) pc_allcpu; argument
188 CTASSERT((PAGE_SIZE / sizeof(struct pcpu)) * sizeof(struct pcpu) == PAGE_SIZE);
193 STAILQ_HEAD(cpuhead, pcpu);
196 extern struct pcpu *cpuid_to_pcpu[];
210 return ((char *)(base) + sizeof(struct pcpu) * curcpu); in zpcpu_get()
217 return ((char *)(base) + sizeof(struct pcpu) * cpu); in zpcpu_get_cpu()
226 void cpu_pcpu_init(struct pcpu *pcpu, int cpuid, size_t size);
227 void db_show_mdpcpu(struct pcpu *pcpu);
233 void pcpu_destroy(struct pcpu *pcpu);
[all …]
/trueos/sys/cddl/dev/profile/
HDprofile.c246 profile_probe_percpu_t *pcpu = arg; in profile_fire() local
247 profile_probe_t *prof = pcpu->profc_probe; in profile_fire()
253 late = gethrtime() - pcpu->profc_expected; in profile_fire()
255 late = sbt_to_nsec(sbinuptime() - pcpu->profc_expected); in profile_fire()
275 pcpu->profc_expected += pcpu->profc_interval; in profile_fire()
276 callout_schedule_sbt_curcpu(&pcpu->profc_cyclic, in profile_fire()
277 pcpu->profc_expected, 0, C_DIRECT_EXEC | C_ABSOLUTE); in profile_fire()
496 profile_probe_percpu_t *pcpu; in profile_online() local
498 pcpu = kmem_zalloc(sizeof (profile_probe_percpu_t), KM_SLEEP); in profile_online()
499 pcpu->profc_probe = prof; in profile_online()
[all …]
/trueos/sys/amd64/amd64/
HDgenassym.c210 ASSYM(PC_SIZEOF, sizeof(struct pcpu));
211 ASSYM(PC_PRVSPACE, offsetof(struct pcpu, pc_prvspace));
212 ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread));
213 ASSYM(PC_FPCURTHREAD, offsetof(struct pcpu, pc_fpcurthread));
214 ASSYM(PC_IDLETHREAD, offsetof(struct pcpu, pc_idlethread));
215 ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb));
216 ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid));
217 ASSYM(PC_SCRATCH_RSP, offsetof(struct pcpu, pc_scratch_rsp));
218 ASSYM(PC_CURPMAP, offsetof(struct pcpu, pc_curpmap));
219 ASSYM(PC_TSSP, offsetof(struct pcpu, pc_tssp));
[all …]
/trueos/sys/i386/i386/
HDgenassym.c206 ASSYM(PC_SIZEOF, sizeof(struct pcpu));
207 ASSYM(PC_PRVSPACE, offsetof(struct pcpu, pc_prvspace));
208 ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread));
209 ASSYM(PC_FPCURTHREAD, offsetof(struct pcpu, pc_fpcurthread));
210 ASSYM(PC_IDLETHREAD, offsetof(struct pcpu, pc_idlethread));
211 ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb));
212 ASSYM(PC_COMMON_TSS, offsetof(struct pcpu, pc_common_tss));
213 ASSYM(PC_COMMON_TSSD, offsetof(struct pcpu, pc_common_tssd));
214 ASSYM(PC_TSS_GDT, offsetof(struct pcpu, pc_tss_gdt));
215 ASSYM(PC_FSGS_GDT, offsetof(struct pcpu, pc_fsgs_gdt));
[all …]
/trueos/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));
68 ASSYM(PC_BOOKE_CRITSAVE, offsetof(struct pcpu, pc_booke_critsave));
69 ASSYM(PC_BOOKE_MCHKSAVE, offsetof(struct pcpu, pc_booke_mchksave));
70 ASSYM(PC_BOOKE_TLBSAVE, offsetof(struct pcpu, pc_booke_tlbsave));
[all …]
HDmp_machdep.c62 extern struct pcpu __pcpu[MAXCPU];
147 struct pcpu *pc; in cpu_mp_start()
189 struct pcpu *pc; in cpu_mp_announce()
206 struct pcpu *pc; in cpu_mp_unleash()
332 ipi_send(struct pcpu *pc, int ipi) in ipi_send()
349 struct pcpu *pc; in ipi_selected()
369 struct pcpu *pc; in ipi_all_but_self()
/trueos/sys/cddl/contrib/opensolaris/uts/common/dtrace/
HDprofile.c137 profile_probe_percpu_t *pcpu = arg; in profile_fire() local
138 profile_probe_t *prof = pcpu->profc_probe; in profile_fire()
141 late = dtrace_gethrtime() - pcpu->profc_expected; in profile_fire()
142 pcpu->profc_expected += pcpu->profc_interval; in profile_fire()
337 profile_probe_percpu_t *pcpu; in profile_online() local
339 pcpu = kmem_zalloc(sizeof (profile_probe_percpu_t), KM_SLEEP); in profile_online()
340 pcpu->profc_probe = prof; in profile_online()
343 hdlr->cyh_arg = pcpu; in profile_online()
349 pcpu->profc_expected = when->cyt_when; in profile_online()
350 pcpu->profc_interval = when->cyt_interval; in profile_online()
[all …]
/trueos/sys/mips/mips/
HDmachdep.c139 struct pcpu *pcpup = (struct pcpu *)pcpu_space;
273 pcpu_init(PCPU_ADDR(0), 0, sizeof(struct pcpu)); in mips_pcpu0_init()
452 mips_pcpu_tlb_init(struct pcpu *pcpu) in mips_pcpu_tlb_init() argument
461 pa = vtophys(pcpu); in mips_pcpu_tlb_init()
473 cpu_pcpu_init(struct pcpu *pcpu, int cpuid, size_t size) in cpu_pcpu_init() argument
476 pcpu->pc_next_asid = 1; in cpu_pcpu_init()
477 pcpu->pc_asid_generation = 1; in cpu_pcpu_init()
481 mips_pcpu_tlb_init(pcpu); in cpu_pcpu_init()
/trueos/sys/x86/xen/
HDxen_intr.c196 struct xen_intr_pcpu_data *pcpu; in evtchn_cpu_mask_port() local
198 pcpu = DPCPU_ID_PTR(cpu, xen_intr_pcpu); in evtchn_cpu_mask_port()
199 clear_bit(port, pcpu->evtchn_enabled); in evtchn_cpu_mask_port()
218 struct xen_intr_pcpu_data *pcpu; in evtchn_cpu_unmask_port() local
220 pcpu = DPCPU_ID_PTR(cpu, xen_intr_pcpu); in evtchn_cpu_unmask_port()
221 set_bit(port, pcpu->evtchn_enabled); in evtchn_cpu_unmask_port()
233 struct xen_intr_pcpu_data *pcpu; in xen_intr_intrcnt_add() local
235 pcpu = DPCPU_ID_PTR(cpu, xen_intr_pcpu); in xen_intr_intrcnt_add()
236 if (pcpu->evtchn_intrcnt != NULL) in xen_intr_intrcnt_add()
240 intrcnt_add(buf, &pcpu->evtchn_intrcnt); in xen_intr_intrcnt_add()
[all …]
/trueos/sys/dev/xen/timer/
HDtimer.c355 struct xentimer_pcpu_data *pcpu = DPCPU_PTR(xentimer_pcpu); in xentimer_intr() local
357 pcpu->last_processed = xen_fetch_vcpu_time(); in xentimer_intr()
358 if (pcpu->timer != 0 && sc->et.et_active) in xentimer_intr()
400 struct xentimer_pcpu_data *pcpu = DPCPU_PTR(xentimer_pcpu); in xentimer_et_start() local
426 pcpu->timer = next_time; in xentimer_et_start()
437 struct xentimer_pcpu_data *pcpu = DPCPU_PTR(xentimer_pcpu); in xentimer_et_stop() local
439 pcpu->timer = 0; in xentimer_et_stop()
461 struct xentimer_pcpu_data *pcpu; in xentimer_attach() local
463 pcpu = DPCPU_ID_PTR(i, xentimer_pcpu); in xentimer_attach()
472 NULL, sc, INTR_TYPE_CLK, &pcpu->irq_handle); in xentimer_attach()
[all …]
/trueos/sys/powerpc/include/
HDcounter.h47 return (*(uint64_t *)((char *)p + sizeof(struct pcpu) * cpu)); in counter_u64_read_one()
67 *((uint64_t *)((char *)arg + sizeof(struct pcpu) * in counter_u64_zero_one_cpu()
82 extern struct pcpu __pcpu[MAXCPU];
112 return (*(uint64_t *)((char *)p + sizeof(struct pcpu) * cpu)); in counter_u64_read_one()
133 *((uint64_t *)((char *)arg + sizeof(struct pcpu) * in counter_u64_zero_one_cpu()
/trueos/sys/i386/include/
HDcounter.h49 extern struct pcpu __pcpu[MAXCPU];
103 sizeof(struct pcpu) * i); in counter_u64_fetch_inline()
109 sizeof(struct pcpu) * i)); in counter_u64_fetch_inline()
136 p = (uint64_t *)((char *)arg + sizeof(struct pcpu) * PCPU_GET(cpuid)); in counter_u64_zero_one_cpu()
148 *(uint64_t *)((char *)c + sizeof(struct pcpu) * i) = 0; in counter_u64_zero_inline()
HDprivatespace.h39 struct pcpu pcpu; member
40 char __filler0[PAGE_SIZE - sizeof(struct pcpu)];
HDpcpu.h77 struct pcpu *pc_prvspace; /* Self-reference */ \
95 extern struct pcpu *pcpup;
109 __offsetof(struct pcpu, name)
115 __typeof(((struct pcpu *)0)->name)
125 : "m" (*(struct pcpu *)(__pcpu_offset(pc_prvspace))), \
/trueos/sys/mips/include/
HDpcpu.h62 #define PCPU_ADDR(cpu) (struct pcpu *)(pcpu_space[(cpu)])
64 extern struct pcpu *pcpup;
78 void mips_pcpu_tlb_init(struct pcpu *pcpu);
/trueos/sys/ia64/ia64/
HDmp_machdep.c185 struct pcpu *pc = arg; in ia64_store_mca_state()
304 struct pcpu *pc; in cpu_mp_add()
319 pc = (struct pcpu *)malloc(sizeof(*pc), M_SMP, M_WAITOK); in cpu_mp_add()
335 struct pcpu *pc; in cpu_mp_announce()
359 struct pcpu *pc; in cpu_mp_start()
436 struct pcpu *pc; in cpu_mp_unleash()
495 struct pcpu *pc; in ipi_selected()
519 struct pcpu *pc; in ipi_all_but_self()
531 ipi_send(struct pcpu *cpu, int xiv) in ipi_send()
/trueos/sys/ia64/include/
HDpcpu.h76 struct pcpu;
78 register struct pcpu * volatile pcpup __asm__("r13");
90 #define __pcpu_offset(name) __offsetof(struct pcpu, name)
91 #define __pcpu_type(name) __typeof(((struct pcpu *)0)->name)
HDsmp.h20 struct pcpu;
34 struct pcpu *as_pcpu;
53 void ipi_send(struct pcpu *, int ipi);
/trueos/sys/amd64/include/
HDcounter.h34 extern struct pcpu __pcpu[1];
44 return (*(uint64_t *)((char *)p + sizeof(struct pcpu) * cpu)); in counter_u64_read_one()
64 *((uint64_t *)((char *)arg + sizeof(struct pcpu) * in counter_u64_zero_one_cpu()
HDpcpu.h45 struct pcpu *pc_prvspace; /* Self-reference */ \
76 extern struct pcpu *pcpup;
90 __offsetof(struct pcpu, name)
96 __typeof(((struct pcpu *)0)->name)
106 : "m" (*(struct pcpu *)(__pcpu_offset(pc_prvspace))), \
/trueos/usr.bin/vmstat/
HDvmstat.c413 fill_pcpu(struct pcpu ***pcpup, int* maxcpup) in fill_pcpu()
415 struct pcpu **pcpu; in fill_pcpu() local
428 pcpu = calloc(maxcpu, sizeof(struct pcpu *)); in fill_pcpu()
429 if (pcpu == NULL) in fill_pcpu()
433 pcpu[i] = kvm_getpcpu(kd, i); in fill_pcpu()
434 if (pcpu[i] == (struct pcpu *)-1) in fill_pcpu()
439 *pcpup = pcpu; in fill_pcpu()
443 free_pcpu(struct pcpu **pcpu, int maxcpu) in free_pcpu() argument
448 free(pcpu[i]); in free_pcpu()
449 free(pcpu); in free_pcpu()
[all …]
/trueos/sys/sparc64/include/
HDcache.h94 struct pcpu;
101 void cache_init(struct pcpu *pcpu);

123456