Lines Matching refs:smt
261 cpu_smt_t *smt = &CPU->cpu_m.mcpu_smt; in smt_acquire() local
268 if (smt->cs_sib == NULL) { in smt_acquire()
274 sibsmt = &smt->cs_sib->cpu_m.mcpu_smt; in smt_acquire()
277 ASSERT3U(CS_ZONE(smt->cs_state), ==, zoneid); in smt_acquire()
278 ASSERT3U(CS_MARK(smt->cs_state), ==, CM_VCPU); in smt_acquire()
284 if (yield_to_vcpu(smt->cs_sib, zoneid)) { in smt_acquire()
293 smt->cs_state = CS_MK(CM_POISONED, zoneid); in smt_acquire()
319 cpu_smt_t *smt = &CPU->cpu_m.mcpu_smt; in smt_release() local
325 if (smt->cs_sib == NULL) in smt_release()
328 ASSERT3U(CS_ZONE(smt->cs_state), ==, zoneid); in smt_release()
329 ASSERT3U(CS_MARK(smt->cs_state), ==, CM_POISONED); in smt_release()
332 sibsmt = &smt->cs_sib->cpu_m.mcpu_smt; in smt_release()
336 smt->cs_state = CS_MK(CM_VCPU, zoneid); in smt_release()
344 smt_kick(cpu_smt_t *smt, zoneid_t zoneid) in smt_kick() argument
348 ASSERT(LOCK_HELD(&smt->cs_lock)); in smt_kick()
351 poke_cpu(smt->cs_sib->cpu_id); in smt_kick()
354 sibstate = smt->cs_sibstate; in smt_kick()
359 lock_clear(&smt->cs_lock); in smt_kick()
367 sibstate = smt->cs_sibstate; in smt_kick()
376 lock_set(&smt->cs_lock); in smt_kick()
389 cpu_smt_t *smt; in smt_begin_intr() local
394 smt = &CPU->cpu_m.mcpu_smt; in smt_begin_intr()
396 if (smt->cs_sib == NULL) { in smt_begin_intr()
401 if (atomic_inc_64_nv(&smt->cs_intr_depth) == 1 && pil_needs_kick(pil)) { in smt_begin_intr()
402 lock_set(&smt->cs_lock); in smt_begin_intr()
406 if (CS_MARK(smt->cs_sibstate) == CM_POISONED) in smt_begin_intr()
407 smt_kick(smt, GLOBAL_ZONEID); in smt_begin_intr()
409 lock_clear(&smt->cs_lock); in smt_begin_intr()
419 cpu_smt_t *smt; in smt_end_intr() local
422 smt = &CPU->cpu_m.mcpu_smt; in smt_end_intr()
424 if (smt->cs_sib == NULL) { in smt_end_intr()
429 ASSERT3U(smt->cs_intr_depth, >, 0); in smt_end_intr()
430 atomic_dec_64(&smt->cs_intr_depth); in smt_end_intr()
436 smt_need_kick(cpu_smt_t *smt, zoneid_t zoneid) in smt_need_kick() argument
440 if (CS_MARK(smt->cs_sibstate) != CM_POISONED) in smt_need_kick()
443 if (CS_MARK(smt->cs_state) == CM_UNSAFE) in smt_need_kick()
446 return (CS_ZONE(smt->cs_sibstate) != zoneid); in smt_need_kick()
455 cpu_smt_t *smt; in smt_mark() local
461 smt = &cp->cpu_m.mcpu_smt; in smt_mark()
463 if (smt->cs_sib == NULL) { in smt_mark()
468 lock_set(&smt->cs_lock); in smt_mark()
475 if (smt->cs_intr_depth > 0) { in smt_mark()
478 if (smt_need_kick(smt, zoneid)) in smt_mark()
479 smt_kick(smt, zoneid); in smt_mark()
485 smt->cs_state = CS_MK(CM_IDLE, zoneid); in smt_mark()
494 smt->cs_state = CS_MK(state, zoneid); in smt_mark()
496 if (smt_need_kick(smt, zoneid)) in smt_mark()
497 smt_kick(smt, zoneid); in smt_mark()
502 lock_clear(&smt->cs_lock); in smt_mark()