Lines Matching refs:cpu
696 #define CYC_TRACE(cpu, level, why, arg0, arg1) \ argument
697 CYC_TRACE_IMPL(&cpu->cyp_trace[level], level, why, arg0, arg1)
720 #define CYC_TRACE(cpu, level, why, arg0, arg1) argument
725 #define CYC_TRACE0(cpu, level, why) CYC_TRACE(cpu, level, why, 0, 0) argument
726 #define CYC_TRACE1(cpu, level, why, arg0) CYC_TRACE(cpu, level, why, arg0, 0) argument
742 cyclic_upheap(cyc_cpu_t *cpu, cyc_index_t ndx) in cyclic_upheap() argument
752 heap = cpu->cyp_heap; in cyclic_upheap()
753 cyclics = cpu->cyp_cyclics; in cyclic_upheap()
785 cyclic_downheap(cyc_cpu_t *cpu, cyc_index_t ndx) in cyclic_downheap() argument
787 cyclic_t *cyclics = cpu->cyp_cyclics; in cyclic_downheap()
788 cyc_index_t *heap = cpu->cyp_heap; in cyclic_downheap()
792 cyc_index_t nelems = cpu->cyp_nelems; in cyclic_downheap()
860 cyclic_expire(cyc_cpu_t *cpu, cyc_index_t ndx, cyclic_t *cyclic) in cyclic_expire() argument
862 cyc_backend_t *be = cpu->cyp_backend; in cyclic_expire()
873 CYC_TRACE(cpu, CY_HIGH_LEVEL, "handler-in", handler, arg); in cyclic_expire()
879 CYC_TRACE(cpu, CY_HIGH_LEVEL, "handler-out", handler, arg); in cyclic_expire()
890 cyc_softbuf_t *softbuf = &cpu->cyp_softbuf[level]; in cyclic_expire()
896 CYC_TRACE(cpu, CY_HIGH_LEVEL, "expire-enq", cyclic, in cyclic_expire()
909 CYC_TRACE1(cpu, CY_HIGH_LEVEL, "expire-wrap", cyclic); in cyclic_expire()
913 CYC_TRACE(cpu, CY_HIGH_LEVEL, "expire-bump", cyclic, 0); in cyclic_expire()
951 cyc_cpu_t *cpu = c->cpu_cyclic; in cyclic_fire() local
952 cyc_backend_t *be = cpu->cyp_backend; in cyclic_fire()
953 cyc_index_t *heap = cpu->cyp_heap; in cyclic_fire()
954 cyclic_t *cyclic, *cyclics = cpu->cyp_cyclics; in cyclic_fire()
959 CYC_TRACE(cpu, CY_HIGH_LEVEL, "fire", now, 0); in cyclic_fire()
961 if (cpu->cyp_nelems == 0) { in cyclic_fire()
966 CYC_TRACE0(cpu, CY_HIGH_LEVEL, "fire-spurious"); in cyclic_fire()
977 CYC_TRACE(cpu, CY_HIGH_LEVEL, "fire-check", cyclic, in cyclic_fire()
983 cyclic_expire(cpu, ndx, cyclic); in cyclic_fire()
1029 CYC_TRACE(cpu, CY_HIGH_LEVEL, exp == interval ? in cyclic_fire()
1036 cyclic_downheap(cpu, 0); in cyclic_fire()
1047 cyclic_remove_pend(cyc_cpu_t *cpu, cyc_level_t level, cyclic_t *cyclic) in cyclic_remove_pend() argument
1051 uint32_t i, rpend = cpu->cyp_rpend - 1; in cyclic_remove_pend()
1055 ASSERT(cpu->cyp_state == CYS_REMOVING); in cyclic_remove_pend()
1056 ASSERT(cpu->cyp_rpend > 0); in cyclic_remove_pend()
1058 CYC_TRACE(cpu, level, "remove-rpend", cyclic, cpu->cyp_rpend); in cyclic_remove_pend()
1065 CYC_TRACE(cpu, level, "rpend-in", handler, arg); in cyclic_remove_pend()
1071 CYC_TRACE(cpu, level, "rpend-out", handler, arg); in cyclic_remove_pend()
1077 sema_v(&cpu->cyp_modify_wait); in cyclic_remove_pend()
1131 cyc_cpu_t *cpu = c->cpu_cyclic; in cyclic_softint() local
1135 cyclic_t *cyclics = cpu->cyp_cyclics; in cyclic_softint()
1138 CYC_TRACE(cpu, level, "softint", cyclics, 0); in cyclic_softint()
1142 softbuf = &cpu->cyp_softbuf[level]; in cyclic_softint()
1152 CYC_TRACE(cpu, level, "softint-top", cyclics, pc); in cyclic_softint()
1161 ASSERT(buf[consmasked] < cpu->cyp_size); in cyclic_softint()
1162 CYC_TRACE(cpu, level, "consuming", consndx, cyclic); in cyclic_softint()
1186 CYC_TRACE(cpu, level, "handler-in", handler, arg); in cyclic_softint()
1192 CYC_TRACE(cpu, level, "handler-out", handler, arg); in cyclic_softint()
1198 if (cpu->cyp_state == CYS_REMOVING) { in cyclic_softint()
1210 cyclic_remove_pend(cpu, level, cyclic); in cyclic_softint()
1217 CYC_TRACE(cpu, level, "resize-int", cyclics, 0); in cyclic_softint()
1218 ASSERT(cpu->cyp_state == CYS_EXPANDING); in cyclic_softint()
1219 ASSERT(cyclics != cpu->cyp_cyclics); in cyclic_softint()
1223 cyclics = cpu->cyp_cyclics; in cyclic_softint()
1257 CYC_TRACE(cpu, level, "cas-fail", opend, pend); in cyclic_softint()
1259 ((cyclics != cpu->cyp_cyclics && in cyclic_softint()
1260 cpu->cyp_state == CYS_EXPANDING) || in cyclic_softint()
1261 (cpu->cyp_state == CYS_REMOVING && in cyclic_softint()
1286 CYC_TRACE(cpu, level, "buffer-grow", 0, 0); in cyclic_softint()
1287 ASSERT(cpu->cyp_state == CYS_EXPANDING); in cyclic_softint()
1298 if (cpu->cyp_cyclics != cyclics) { in cyclic_softint()
1299 CYC_TRACE1(cpu, level, "resize-int-int", consndx); in cyclic_softint()
1300 cyclics = cpu->cyp_cyclics; in cyclic_softint()
1319 ASSERT(cpu->cyp_state == CYS_EXPANDING); in cyclic_softint()
1322 lev = cpu->cyp_modify_levels; in cyclic_softint()
1324 } while (atomic_cas_32(&cpu->cyp_modify_levels, lev, nlev) != in cyclic_softint()
1333 CYC_TRACE0(cpu, level, "resize-kick"); in cyclic_softint()
1334 sema_v(&cpu->cyp_modify_wait); in cyclic_softint()
1338 cyc_backend_t *be = cpu->cyp_backend; in cyclic_softint()
1340 CYC_TRACE0(cpu, level, "resize-post"); in cyclic_softint()
1350 cyc_cpu_t *cpu = arg->cyx_cpu; in cyclic_expand_xcall() local
1351 cyc_backend_t *be = cpu->cyp_backend; in cyclic_expand_xcall()
1354 cyc_index_t new_size = arg->cyx_size, size = cpu->cyp_size, i; in cyclic_expand_xcall()
1356 cyclic_t *cyclics = cpu->cyp_cyclics, *new_cyclics = arg->cyx_cyclics; in cyclic_expand_xcall()
1358 ASSERT(cpu->cyp_state == CYS_EXPANDING); in cyclic_expand_xcall()
1369 CYC_TRACE(cpu, CY_HIGH_LEVEL, "expand", new_size, 0); in cyclic_expand_xcall()
1376 ASSERT(cpu->cyp_heap != NULL && cpu->cyp_cyclics != NULL); in cyclic_expand_xcall()
1378 bcopy(cpu->cyp_heap, new_heap, sizeof (cyc_index_t) * size); in cyclic_expand_xcall()
1402 cpu->cyp_heap = new_heap; in cyclic_expand_xcall()
1403 cpu->cyp_cyclics = new_cyclics; in cyclic_expand_xcall()
1404 cpu->cyp_size = new_size; in cyclic_expand_xcall()
1411 cyc_softbuf_t *softbuf = &cpu->cyp_softbuf[i]; in cyclic_expand_xcall()
1446 cyclic_expand(cyc_cpu_t *cpu) in cyclic_expand() argument
1452 cyc_backend_t *be = cpu->cyp_backend; in cyclic_expand()
1457 ASSERT(cpu->cyp_state == CYS_ONLINE); in cyclic_expand()
1459 cpu->cyp_state = CYS_EXPANDING; in cyclic_expand()
1461 old_heap = cpu->cyp_heap; in cyclic_expand()
1462 old_cyclics = cpu->cyp_cyclics; in cyclic_expand()
1464 if ((new_size = ((old_size = cpu->cyp_size) << 1)) == 0) { in cyclic_expand()
1481 old_hard = cpu->cyp_softbuf[0].cys_hard; in cyclic_expand()
1484 cyc_softbuf_t *softbuf = &cpu->cyp_softbuf[i]; in cyclic_expand()
1498 arg.cyx_cpu = cpu; in cyclic_expand()
1503 cpu->cyp_modify_levels = 0; in cyclic_expand()
1505 be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu, in cyclic_expand()
1511 sema_p(&cpu->cyp_modify_wait); in cyclic_expand()
1512 ASSERT(cpu->cyp_modify_levels == CY_SOFT_LEVELS); in cyclic_expand()
1518 cyc_softbuf_t *softbuf = &cpu->cyp_softbuf[i]; in cyclic_expand()
1542 ASSERT(cpu->cyp_state == CYS_EXPANDING); in cyclic_expand()
1543 cpu->cyp_state = CYS_ONLINE; in cyclic_expand()
1658 cyc_cpu_t *cpu = arg->cyx_cpu; in cyclic_add_xcall() local
1661 cyc_backend_t *be = cpu->cyp_backend; in cyclic_add_xcall()
1667 ASSERT(cpu->cyp_nelems < cpu->cyp_size); in cyclic_add_xcall()
1671 CYC_TRACE(cpu, CY_HIGH_LEVEL, in cyclic_add_xcall()
1674 nelems = cpu->cyp_nelems++; in cyclic_add_xcall()
1681 CYC_TRACE0(cpu, CY_HIGH_LEVEL, "enabled"); in cyclic_add_xcall()
1685 ndx = cpu->cyp_heap[nelems]; in cyclic_add_xcall()
1686 cyclic = &cpu->cyp_cyclics[ndx]; in cyclic_add_xcall()
1707 if (cyclic_upheap(cpu, nelems)) { in cyclic_add_xcall()
1710 CYC_TRACE(cpu, CY_HIGH_LEVEL, "add-reprog", cyclic, exp); in cyclic_add_xcall()
1724 cyclic_add_here(cyc_cpu_t *cpu, cyc_handler_t *hdlr, in cyclic_add_here() argument
1727 cyc_backend_t *be = cpu->cyp_backend; in cyclic_add_here()
1731 CYC_PTRACE("add-cpu", cpu, hdlr->cyh_func); in cyclic_add_here()
1733 ASSERT(cpu->cyp_state == CYS_ONLINE); in cyclic_add_here()
1734 ASSERT(!(cpu->cyp_cpu->cpu_flags & CPU_OFFLINE)); in cyclic_add_here()
1737 if (cpu->cyp_nelems == cpu->cyp_size) { in cyclic_add_here()
1742 cyclic_expand(cpu); in cyclic_add_here()
1743 ASSERT(cpu->cyp_nelems < cpu->cyp_size); in cyclic_add_here()
1751 arg.cyx_cpu = cpu; in cyclic_add_here()
1756 be->cyb_xcall(bar, cpu->cyp_cpu, (cyc_func_t)cyclic_add_xcall, &arg); in cyclic_add_here()
1758 CYC_PTRACE("add-cpu-done", cpu, arg.cyx_ndx); in cyclic_add_here()
1766 cyc_cpu_t *cpu = arg->cyx_cpu; in cyclic_remove_xcall() local
1767 cyc_backend_t *be = cpu->cyp_backend; in cyclic_remove_xcall()
1777 ASSERT(cpu->cyp_state == CYS_REMOVING); in cyclic_remove_xcall()
1781 CYC_TRACE1(cpu, CY_HIGH_LEVEL, "remove-xcall", ndx); in cyclic_remove_xcall()
1783 heap = cpu->cyp_heap; in cyclic_remove_xcall()
1784 nelems = cpu->cyp_nelems; in cyclic_remove_xcall()
1786 cyclic = &cpu->cyp_cyclics[ndx]; in cyclic_remove_xcall()
1815 CYC_TRACE1(cpu, CY_HIGH_LEVEL, "remove-pend", cyclic->cy_pend); in cyclic_remove_xcall()
1816 cpu->cyp_rpend = cyclic->cy_pend; in cyclic_remove_xcall()
1836 cpu->cyp_nelems = --nelems; in cyclic_remove_xcall()
1843 CYC_TRACE0(cpu, CY_HIGH_LEVEL, "disabled"); in cyclic_remove_xcall()
1852 CYC_TRACE0(cpu, CY_HIGH_LEVEL, "remove-bottom"); in cyclic_remove_xcall()
1869 CYC_TRACE0(cpu, CY_HIGH_LEVEL, "remove-root"); in cyclic_remove_xcall()
1870 cyclic_downheap(cpu, 0); in cyclic_remove_xcall()
1872 if (cyclic_upheap(cpu, i) == 0) { in cyclic_remove_xcall()
1877 CYC_TRACE0(cpu, CY_HIGH_LEVEL, "remove-no-root"); in cyclic_remove_xcall()
1879 CYC_TRACE0(cpu, CY_HIGH_LEVEL, "remove-no-up"); in cyclic_remove_xcall()
1880 cyclic_downheap(cpu, i); in cyclic_remove_xcall()
1891 cyclic = &cpu->cyp_cyclics[heap[0]]; in cyclic_remove_xcall()
1893 CYC_TRACE0(cpu, CY_HIGH_LEVEL, "remove-reprog"); in cyclic_remove_xcall()
1902 cyclic_remove_here(cyc_cpu_t *cpu, cyc_index_t ndx, cyc_time_t *when, int wait) in cyclic_remove_here() argument
1904 cyc_backend_t *be = cpu->cyp_backend; in cyclic_remove_here()
1906 cyclic_t *cyclic = &cpu->cyp_cyclics[ndx]; in cyclic_remove_here()
1910 ASSERT(cpu->cyp_rpend == 0); in cyclic_remove_here()
1914 arg.cyx_cpu = cpu; in cyclic_remove_here()
1918 ASSERT(cpu->cyp_state == CYS_ONLINE); in cyclic_remove_here()
1919 cpu->cyp_state = CYS_REMOVING; in cyclic_remove_here()
1921 be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu, in cyclic_remove_here()
1929 ASSERT(!(level == CY_HIGH_LEVEL && cpu->cyp_rpend != 0)); in cyclic_remove_here()
1930 ASSERT(!(wait == CY_NOWAIT && cpu->cyp_rpend != 0)); in cyclic_remove_here()
1931 ASSERT(!(arg.cyx_wait == CY_NOWAIT && cpu->cyp_rpend != 0)); in cyclic_remove_here()
1940 ASSERT(cpu->cyp_state == CYS_REMOVING); in cyclic_remove_here()
1941 cpu->cyp_state = CYS_ONLINE; in cyclic_remove_here()
1946 if (cpu->cyp_rpend != 0) in cyclic_remove_here()
1947 sema_p(&cpu->cyp_modify_wait); in cyclic_remove_here()
1949 ASSERT(cpu->cyp_state == CYS_REMOVING); in cyclic_remove_here()
1951 cpu->cyp_rpend = 0; in cyclic_remove_here()
1952 cpu->cyp_state = CYS_ONLINE; in cyclic_remove_here()
1963 cyclic_reprogram_cyclic(cyc_cpu_t *cpu, cyc_index_t ndx, hrtime_t expire, in cyclic_reprogram_cyclic() argument
1966 cyc_backend_t *be = cpu->cyp_backend; in cyclic_reprogram_cyclic()
1977 CYC_TRACE1(cpu, CY_HIGH_LEVEL, "reprog-xcall", ndx); in cyclic_reprogram_cyclic()
1979 nelems = cpu->cyp_nelems; in cyclic_reprogram_cyclic()
1981 heap = cpu->cyp_heap; in cyclic_reprogram_cyclic()
2004 cpu->cyp_state == CYS_REMOVING && cpu->cyp_rpend > 0) { in cyclic_reprogram_cyclic()
2010 cyclic = &cpu->cyp_cyclics[ndx]; in cyclic_reprogram_cyclic()
2016 CYC_TRACE1(cpu, CY_HIGH_LEVEL, "reprog-down", i); in cyclic_reprogram_cyclic()
2017 cyclic_downheap(cpu, i); in cyclic_reprogram_cyclic()
2019 CYC_TRACE1(cpu, CY_HIGH_LEVEL, "reprog-up", i); in cyclic_reprogram_cyclic()
2020 reprog = cyclic_upheap(cpu, i); in cyclic_reprogram_cyclic()
2023 if (reprog && (cpu->cyp_state != CYS_SUSPENDED)) { in cyclic_reprogram_cyclic()
2027 CYC_TRACE0(cpu, CY_HIGH_LEVEL, "reprog-root"); in cyclic_reprogram_cyclic()
2028 cyclic = &cpu->cyp_cyclics[heap[0]]; in cyclic_reprogram_cyclic()
2048 cyclic_reprogram_here(cyc_cpu_t *cpu, cyc_index_t ndx, hrtime_t expiration) in cyclic_reprogram_here() argument
2050 cyc_backend_t *be = cpu->cyp_backend; in cyclic_reprogram_here()
2057 arg.cyx_cpu = cpu; in cyclic_reprogram_here()
2061 be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu, in cyclic_reprogram_here()
2174 cyc_cpu_t *cpu = idp->cyi_cpu, *dest; in cyclic_juggle_one() local
2175 cyclic_t *cyclic = &cpu->cyp_cyclics[ndx]; in cyclic_juggle_one()
2176 cpu_t *c = cpu->cyp_cpu; in cyclic_juggle_one()
2179 CYC_PTRACE("juggle-one", idp, cpu); in cyclic_juggle_one()
2182 ASSERT(cpu->cyp_state == CYS_ONLINE); in cyclic_juggle_one()
2189 CYC_PTRACE("juggle-fail", idp, cpu) in cyclic_juggle_one()
2202 cyc_cpu_t *cpu = idp->cyi_cpu; in cyclic_unbind_cpu() local
2203 cpu_t *c = cpu->cyp_cpu; in cyclic_unbind_cpu()
2204 cyclic_t *cyclic = &cpu->cyp_cyclics[idp->cyi_ndx]; in cyclic_unbind_cpu()
2206 CYC_PTRACE("unbind-cpu", id, cpu); in cyclic_unbind_cpu()
2208 ASSERT(cpu->cyp_state == CYS_ONLINE); in cyclic_unbind_cpu()
2223 ASSERT((res && idp->cyi_cpu != cpu) || in cyclic_unbind_cpu()
2232 cyc_cpu_t *dest = d->cpu_cyclic, *cpu = idp->cyi_cpu; in cyclic_bind_cpu() local
2233 cpu_t *c = cpu->cyp_cpu; in cyclic_bind_cpu()
2234 cyclic_t *cyclic = &cpu->cyp_cyclics[idp->cyi_ndx]; in cyclic_bind_cpu()
2241 ASSERT(cpu->cyp_state == CYS_ONLINE); in cyclic_bind_cpu()
2249 if (dest != cpu) { in cyclic_bind_cpu()
2261 cyc_cpu_t *cpu = idp->cyi_cpu; in cyclic_unbind_cpupart() local
2262 cpu_t *c = cpu->cyp_cpu; in cyclic_unbind_cpupart()
2263 cyclic_t *cyc = &cpu->cyp_cyclics[idp->cyi_ndx]; in cyclic_unbind_cpupart()
2267 ASSERT(cpu->cyp_state == CYS_ONLINE); in cyclic_unbind_cpupart()
2280 ASSERT(res && idp->cyi_cpu != cpu); in cyclic_unbind_cpupart()
2288 cyc_cpu_t *cpu = idp->cyi_cpu, *dest; in cyclic_bind_cpupart() local
2289 cpu_t *c = cpu->cyp_cpu; in cyclic_bind_cpupart()
2290 cyclic_t *cyc = &cpu->cyp_cyclics[idp->cyi_ndx]; in cyclic_bind_cpupart()
2295 ASSERT(cpu->cyp_state == CYS_ONLINE); in cyclic_bind_cpupart()
2302 if (dest != cpu) { in cyclic_bind_cpupart()
2313 cyc_cpu_t *cpu = kmem_zalloc(sizeof (cyc_cpu_t), KM_SLEEP); in cyclic_configure() local
2317 CYC_PTRACE1("configure", cpu); in cyclic_configure()
2324 cpu->cyp_cpu = c; in cyclic_configure()
2326 sema_init(&cpu->cyp_modify_wait, 0, NULL, SEMA_DEFAULT, NULL); in cyclic_configure()
2328 cpu->cyp_size = 1; in cyclic_configure()
2329 cpu->cyp_heap = kmem_zalloc(sizeof (cyc_index_t), KM_SLEEP); in cyclic_configure()
2330 cpu->cyp_cyclics = kmem_zalloc(sizeof (cyclic_t), KM_SLEEP); in cyclic_configure()
2331 cpu->cyp_cyclics->cy_flags = CYF_FREE; in cyclic_configure()
2338 cpu->cyp_softbuf[i].cys_buf[0].cypc_buf = in cyclic_configure()
2342 cpu->cyp_state = CYS_OFFLINE; in cyclic_configure()
2349 cpu->cyp_backend = nbe; in cyclic_configure()
2358 c->cpu_cyclic = cpu; in cyclic_configure()
2364 cyc_cpu_t *cpu = c->cpu_cyclic; in cyclic_unconfigure() local
2365 cyc_backend_t *be = cpu->cyp_backend; in cyclic_unconfigure()
2369 CYC_PTRACE1("unconfigure", cpu); in cyclic_unconfigure()
2371 ASSERT(cpu->cyp_state == CYS_OFFLINE); in cyclic_unconfigure()
2372 ASSERT(cpu->cyp_nelems == 0); in cyclic_unconfigure()
2380 cpu->cyp_backend = NULL; in cyclic_unconfigure()
2386 cyc_softbuf_t *softbuf = &cpu->cyp_softbuf[i]; in cyclic_unconfigure()
2407 kmem_free(cpu->cyp_cyclics, cpu->cyp_size * sizeof (cyclic_t)); in cyclic_unconfigure()
2408 kmem_free(cpu->cyp_heap, cpu->cyp_size * sizeof (cyc_index_t)); in cyclic_unconfigure()
2409 kmem_free(cpu, sizeof (cyc_cpu_t)); in cyclic_unconfigure()
2421 cpu_t *c = cpu[id]; in cyclic_cpu_setup()
2447 cyc_cpu_t *cpu = arg->cyx_cpu; in cyclic_suspend_xcall() local
2448 cyc_backend_t *be = cpu->cyp_backend; in cyclic_suspend_xcall()
2454 CYC_TRACE1(cpu, CY_HIGH_LEVEL, "suspend-xcall", cpu->cyp_nelems); in cyclic_suspend_xcall()
2455 ASSERT(cpu->cyp_state == CYS_ONLINE || cpu->cyp_state == CYS_OFFLINE); in cyclic_suspend_xcall()
2462 if (cpu->cyp_nelems > 0) { in cyclic_suspend_xcall()
2463 ASSERT(cpu->cyp_state == CYS_ONLINE); in cyclic_suspend_xcall()
2467 if (cpu->cyp_state == CYS_ONLINE) in cyclic_suspend_xcall()
2468 cpu->cyp_state = CYS_SUSPENDED; in cyclic_suspend_xcall()
2477 cyc_cpu_t *cpu = arg->cyx_cpu; in cyclic_resume_xcall() local
2478 cyc_backend_t *be = cpu->cyp_backend; in cyclic_resume_xcall()
2481 cyc_state_t state = cpu->cyp_state; in cyclic_resume_xcall()
2485 CYC_TRACE1(cpu, CY_HIGH_LEVEL, "resume-xcall", cpu->cyp_nelems); in cyclic_resume_xcall()
2494 if (cpu->cyp_nelems > 0) { in cyclic_resume_xcall()
2495 cyclic_t *cyclic = &cpu->cyp_cyclics[cpu->cyp_heap[0]]; in cyclic_resume_xcall()
2498 CYC_TRACE(cpu, CY_HIGH_LEVEL, "resume-reprog", cyclic, exp); in cyclic_resume_xcall()
2505 cpu->cyp_state = CYS_ONLINE; in cyclic_resume_xcall()
2507 CYC_TRACE1(cpu, CY_HIGH_LEVEL, "resume-done", cpu->cyp_nelems); in cyclic_resume_xcall()
2512 cyclic_omni_start(cyc_id_t *idp, cyc_cpu_t *cpu) in cyclic_omni_start() argument
2519 CYC_PTRACE("omni-start", cpu, idp); in cyclic_omni_start()
2521 ASSERT(cpu->cyp_state == CYS_ONLINE); in cyclic_omni_start()
2531 omni->cyo_online(omni->cyo_arg, cpu->cyp_cpu, &hdlr, &when); in cyclic_omni_start()
2537 ocpu->cyo_cpu = cpu; in cyclic_omni_start()
2539 ocpu->cyo_ndx = cyclic_add_here(cpu, &hdlr, &when, 0); in cyclic_omni_start()
2545 cyclic_omni_stop(cyc_id_t *idp, cyc_cpu_t *cpu) in cyclic_omni_stop() argument
2552 CYC_PTRACE("omni-stop", cpu, idp); in cyclic_omni_stop()
2554 ASSERT(cpu->cyp_state == CYS_ONLINE); in cyclic_omni_stop()
2565 while (ocpu != NULL && ocpu->cyo_cpu != cpu) { in cyclic_omni_stop()
2634 omni->cyo_offline(omni->cyo_arg, cpu->cyp_cpu, ocpu->cyo_arg); in cyclic_omni_stop()
2861 cyc_cpu_t *cpu; in cyclic_add_omni() local
2871 if ((cpu = c->cpu_cyclic) == NULL) in cyclic_add_omni()
2874 if (cpu->cyp_state != CYS_ONLINE) { in cyclic_add_omni()
2875 ASSERT(cpu->cyp_state == CYS_OFFLINE); in cyclic_add_omni()
2879 cyclic_omni_start(idp, cpu); in cyclic_add_omni()
2927 cyc_cpu_t *cpu = idp->cyi_cpu; in cyclic_remove() local
2932 if (cpu != NULL) { in cyclic_remove()
2933 (void) cyclic_remove_here(cpu, idp->cyi_ndx, NULL, CY_WAIT); in cyclic_remove()
3027 cyc_cpu_t *cpu = idp->cyi_cpu; in cyclic_bind() local
3035 if (cpu == NULL) { in cyclic_bind()
3040 c = cpu->cyp_cpu; in cyclic_bind()
3041 flags = cpu->cyp_cyclics[idp->cyi_ndx].cy_flags; in cyclic_bind()
3051 cpu = idp->cyi_cpu; in cyclic_bind()
3052 c = cpu->cyp_cpu; in cyclic_bind()
3062 cpu = idp->cyi_cpu; in cyclic_bind()
3063 c = cpu->cyp_cpu; in cyclic_bind()
3064 flags = cpu->cyp_cyclics[idp->cyi_ndx].cy_flags; in cyclic_bind()
3079 cyc_cpu_t *cpu; in cyclic_reprogram() local
3097 cpu = CPU->cpu_cyclic; in cyclic_reprogram()
3105 if (ocpu->cyo_cpu == cpu) in cyclic_reprogram()
3124 cpu = idp->cyi_cpu; in cyclic_reprogram()
3128 if (cpu->cyp_cpu == CPU) { in cyclic_reprogram()
3134 if (!cyclic_reprogram_cyclic(cpu, ndx, expiration, B_TRUE)) { in cyclic_reprogram()
3138 cyclic_reprogram_here(cpu, ndx, expiration); in cyclic_reprogram()
3297 cyc_cpu_t *cpu = c->cpu_cyclic; in cyclic_juggle() local
3309 if (idp->cyi_cpu != cpu) in cyclic_juggle()
3317 ASSERT(idp->cyi_cpu != cpu); in cyclic_juggle()
3358 cyc_cpu_t *cpu = c->cpu_cyclic; in cyclic_offline() local
3361 CYC_PTRACE1("offline", cpu); in cyclic_offline()
3380 cyclic_omni_stop(idp, cpu); in cyclic_offline()
3383 ASSERT(cpu->cyp_state == CYS_ONLINE); in cyclic_offline()
3384 cpu->cyp_state = CYS_OFFLINE; in cyclic_offline()
3415 cyc_cpu_t *cpu = c->cpu_cyclic; in cyclic_online() local
3418 CYC_PTRACE1("online", cpu); in cyclic_online()
3421 ASSERT(cpu->cyp_state == CYS_OFFLINE); in cyclic_online()
3423 cpu->cyp_state = CYS_ONLINE; in cyclic_online()
3433 cyclic_omni_start(idp, cpu); in cyclic_online()
3487 cyc_cpu_t *cpu = idp->cyi_cpu; in cyclic_move_in() local
3493 if (cpu == NULL) in cyclic_move_in()
3496 c = cpu->cyp_cpu; in cyclic_move_in()
3501 cyclic = &cpu->cyp_cyclics[idp->cyi_ndx]; in cyclic_move_in()
3562 cyc_cpu_t *cpu = c->cpu_cyclic, *dest; in cyclic_move_out() local
3563 cyclic_t *cyclic, *cyclics = cpu->cyp_cyclics; in cyclic_move_out()
3566 CYC_PTRACE1("move-out", cpu); in cyclic_move_out()
3575 if (idp->cyi_cpu != cpu) in cyclic_move_out()
3591 CYC_PTRACE("move-out-fail", cpu, idp); in cyclic_move_out()
3597 CYC_PTRACE1("move-out-done", cpu); in cyclic_move_out()
3653 cyc_cpu_t *cpu; in cyclic_suspend() local
3662 cpu = c->cpu_cyclic; in cyclic_suspend()
3663 be = cpu->cyp_backend; in cyclic_suspend()
3664 arg.cyx_cpu = cpu; in cyclic_suspend()
3705 cyc_cpu_t *cpu; in cyclic_resume() local
3715 cpu = c->cpu_cyclic; in cyclic_resume()
3716 be = cpu->cyp_backend; in cyclic_resume()
3717 arg.cyx_cpu = cpu; in cyclic_resume()