xref: /illumos-gate/usr/src/uts/i86pc/io/cbe.c (revision 7a364d25fde47aa82704b12b5251bf7fac37f02e)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
57c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
67c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
77c478bd9Sstevel@tonic-gate  * with the License.
87c478bd9Sstevel@tonic-gate  *
97c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
107c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
117c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
127c478bd9Sstevel@tonic-gate  * and limitations under the License.
137c478bd9Sstevel@tonic-gate  *
147c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
157c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
167c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
177c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
187c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
197c478bd9Sstevel@tonic-gate  *
207c478bd9Sstevel@tonic-gate  * CDDL HEADER END
217c478bd9Sstevel@tonic-gate  */
227c478bd9Sstevel@tonic-gate /*
237c478bd9Sstevel@tonic-gate  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
257c478bd9Sstevel@tonic-gate  */
267c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
277c478bd9Sstevel@tonic-gate 
287c478bd9Sstevel@tonic-gate #include <sys/systm.h>
297c478bd9Sstevel@tonic-gate #include <sys/cyclic.h>
307c478bd9Sstevel@tonic-gate #include <sys/cyclic_impl.h>
317c478bd9Sstevel@tonic-gate #include <sys/spl.h>
327c478bd9Sstevel@tonic-gate #include <sys/x_call.h>
337c478bd9Sstevel@tonic-gate #include <sys/kmem.h>
347c478bd9Sstevel@tonic-gate #include <sys/machsystm.h>
357c478bd9Sstevel@tonic-gate #include <sys/smp_impldefs.h>
367c478bd9Sstevel@tonic-gate #include <sys/psm_types.h>
377c478bd9Sstevel@tonic-gate #include <sys/atomic.h>
387c478bd9Sstevel@tonic-gate #include <sys/clock.h>
397c478bd9Sstevel@tonic-gate #include <sys/ddi_impldefs.h>
407c478bd9Sstevel@tonic-gate #include <sys/ddi_intr.h>
417c478bd9Sstevel@tonic-gate 
427c478bd9Sstevel@tonic-gate static int cbe_vector;
437c478bd9Sstevel@tonic-gate static int cbe_ticks = 0;
447c478bd9Sstevel@tonic-gate 
457c478bd9Sstevel@tonic-gate static cyc_func_t volatile cbe_xcall_func;
467c478bd9Sstevel@tonic-gate static cpu_t *volatile cbe_xcall_cpu;
477c478bd9Sstevel@tonic-gate static void *cbe_xcall_farg;
487c478bd9Sstevel@tonic-gate static cpuset_t cbe_enabled;
497c478bd9Sstevel@tonic-gate 
507c478bd9Sstevel@tonic-gate static ddi_softint_hdl_impl_t cbe_low_hdl =
517c478bd9Sstevel@tonic-gate 	{0, NULL, NULL, 0, 0, NULL, NULL, NULL};
527c478bd9Sstevel@tonic-gate static ddi_softint_hdl_impl_t cbe_clock_hdl =
537c478bd9Sstevel@tonic-gate 	{0, NULL, NULL, 0, 0, NULL, NULL, NULL};
547c478bd9Sstevel@tonic-gate 
557c478bd9Sstevel@tonic-gate cyclic_id_t cbe_hres_cyclic;
567c478bd9Sstevel@tonic-gate int cbe_psm_timer_mode = TIMER_ONESHOT;
577c478bd9Sstevel@tonic-gate 
587c478bd9Sstevel@tonic-gate void cbe_hres_tick(void);
597c478bd9Sstevel@tonic-gate 
607c478bd9Sstevel@tonic-gate int
617c478bd9Sstevel@tonic-gate cbe_softclock(void)
627c478bd9Sstevel@tonic-gate {
637c478bd9Sstevel@tonic-gate 	cyclic_softint(CPU, CY_LOCK_LEVEL);
647c478bd9Sstevel@tonic-gate 	return (1);
657c478bd9Sstevel@tonic-gate }
667c478bd9Sstevel@tonic-gate 
677c478bd9Sstevel@tonic-gate int
687c478bd9Sstevel@tonic-gate cbe_low_level(void)
697c478bd9Sstevel@tonic-gate {
707c478bd9Sstevel@tonic-gate 	cpu_t *cpu = CPU;
717c478bd9Sstevel@tonic-gate 
727c478bd9Sstevel@tonic-gate 	cyclic_softint(cpu, CY_LOW_LEVEL);
737c478bd9Sstevel@tonic-gate 	return (1);
747c478bd9Sstevel@tonic-gate }
757c478bd9Sstevel@tonic-gate 
767c478bd9Sstevel@tonic-gate /*
777c478bd9Sstevel@tonic-gate  * We can be in cbe_fire() either due to a cyclic-induced cross call, or due
787c478bd9Sstevel@tonic-gate  * to the timer firing at level-14.  Because cyclic_fire() can tolerate
797c478bd9Sstevel@tonic-gate  * spurious calls, it would not matter if we called cyclic_fire() in both
807c478bd9Sstevel@tonic-gate  * cases.
817c478bd9Sstevel@tonic-gate  *
827c478bd9Sstevel@tonic-gate  */
837c478bd9Sstevel@tonic-gate int
847c478bd9Sstevel@tonic-gate cbe_fire(void)
857c478bd9Sstevel@tonic-gate {
867c478bd9Sstevel@tonic-gate 	cpu_t *cpu = CPU;
877c478bd9Sstevel@tonic-gate 	processorid_t me = cpu->cpu_id, i;
887c478bd9Sstevel@tonic-gate 	int cross_call = (cbe_xcall_func != NULL && cbe_xcall_cpu == cpu);
897c478bd9Sstevel@tonic-gate 
907c478bd9Sstevel@tonic-gate 	cyclic_fire(cpu);
917c478bd9Sstevel@tonic-gate 
927c478bd9Sstevel@tonic-gate 	if (cbe_psm_timer_mode != TIMER_ONESHOT && me == 0 && !cross_call) {
937c478bd9Sstevel@tonic-gate 		for (i = 1; i < NCPU; i++) {
947c478bd9Sstevel@tonic-gate 			if (CPU_IN_SET(cbe_enabled, i))
957c478bd9Sstevel@tonic-gate 				send_dirint(i, CBE_HIGH_PIL);
967c478bd9Sstevel@tonic-gate 		}
977c478bd9Sstevel@tonic-gate 	}
987c478bd9Sstevel@tonic-gate 
997c478bd9Sstevel@tonic-gate 	if (cross_call) {
1007c478bd9Sstevel@tonic-gate 		ASSERT(cbe_xcall_func != NULL && cbe_xcall_cpu == cpu);
1017c478bd9Sstevel@tonic-gate 		(*cbe_xcall_func)(cbe_xcall_farg);
1027c478bd9Sstevel@tonic-gate 		cbe_xcall_func = NULL;
1037c478bd9Sstevel@tonic-gate 		cbe_xcall_cpu = NULL;
1047c478bd9Sstevel@tonic-gate 	}
1057c478bd9Sstevel@tonic-gate 
1067c478bd9Sstevel@tonic-gate 	return (1);
1077c478bd9Sstevel@tonic-gate }
1087c478bd9Sstevel@tonic-gate 
1097c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1107c478bd9Sstevel@tonic-gate void
1117c478bd9Sstevel@tonic-gate cbe_softint(void *arg, cyc_level_t level)
1127c478bd9Sstevel@tonic-gate {
1137c478bd9Sstevel@tonic-gate 	switch (level) {
1147c478bd9Sstevel@tonic-gate 	case CY_LOW_LEVEL:
1157c478bd9Sstevel@tonic-gate 		cbe_low_hdl.ih_pending = 1;
1167c478bd9Sstevel@tonic-gate 		(*setsoftint)(CBE_LOW_PIL);
1177c478bd9Sstevel@tonic-gate 		break;
1187c478bd9Sstevel@tonic-gate 	case CY_LOCK_LEVEL:
1197c478bd9Sstevel@tonic-gate 		cbe_clock_hdl.ih_pending = 1;
1207c478bd9Sstevel@tonic-gate 		(*setsoftint)(CBE_LOCK_PIL);
1217c478bd9Sstevel@tonic-gate 		break;
1227c478bd9Sstevel@tonic-gate 	default:
1237c478bd9Sstevel@tonic-gate 		panic("cbe_softint: unexpected soft level %d", level);
1247c478bd9Sstevel@tonic-gate 	}
1257c478bd9Sstevel@tonic-gate }
1267c478bd9Sstevel@tonic-gate 
1277c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1287c478bd9Sstevel@tonic-gate void
1297c478bd9Sstevel@tonic-gate cbe_reprogram(void *arg, hrtime_t time)
1307c478bd9Sstevel@tonic-gate {
1317c478bd9Sstevel@tonic-gate 	if (cbe_psm_timer_mode == TIMER_ONESHOT)
1327c478bd9Sstevel@tonic-gate 		(*psm_timer_reprogram)(time);
1337c478bd9Sstevel@tonic-gate }
1347c478bd9Sstevel@tonic-gate 
1357c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1367c478bd9Sstevel@tonic-gate cyc_cookie_t
1377c478bd9Sstevel@tonic-gate cbe_set_level(void *arg, cyc_level_t level)
1387c478bd9Sstevel@tonic-gate {
1397c478bd9Sstevel@tonic-gate 	int ipl;
1407c478bd9Sstevel@tonic-gate 
1417c478bd9Sstevel@tonic-gate 	switch (level) {
1427c478bd9Sstevel@tonic-gate 	case CY_LOW_LEVEL:
1437c478bd9Sstevel@tonic-gate 		ipl = CBE_LOW_PIL;
1447c478bd9Sstevel@tonic-gate 		break;
1457c478bd9Sstevel@tonic-gate 	case CY_LOCK_LEVEL:
1467c478bd9Sstevel@tonic-gate 		ipl = CBE_LOCK_PIL;
1477c478bd9Sstevel@tonic-gate 		break;
1487c478bd9Sstevel@tonic-gate 	case CY_HIGH_LEVEL:
1497c478bd9Sstevel@tonic-gate 		ipl = CBE_HIGH_PIL;
1507c478bd9Sstevel@tonic-gate 		break;
1517c478bd9Sstevel@tonic-gate 	default:
1527c478bd9Sstevel@tonic-gate 		panic("cbe_set_level: unexpected level %d", level);
1537c478bd9Sstevel@tonic-gate 	}
1547c478bd9Sstevel@tonic-gate 
1557c478bd9Sstevel@tonic-gate 	return (splr(ipltospl(ipl)));
1567c478bd9Sstevel@tonic-gate }
1577c478bd9Sstevel@tonic-gate 
1587c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1597c478bd9Sstevel@tonic-gate void
1607c478bd9Sstevel@tonic-gate cbe_restore_level(void *arg, cyc_cookie_t cookie)
1617c478bd9Sstevel@tonic-gate {
1627c478bd9Sstevel@tonic-gate 	splx(cookie);
1637c478bd9Sstevel@tonic-gate }
1647c478bd9Sstevel@tonic-gate 
1657c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1667c478bd9Sstevel@tonic-gate void
1677c478bd9Sstevel@tonic-gate cbe_xcall(void *arg, cpu_t *dest, cyc_func_t func, void *farg)
1687c478bd9Sstevel@tonic-gate {
1697c478bd9Sstevel@tonic-gate 	kpreempt_disable();
1707c478bd9Sstevel@tonic-gate 
1717c478bd9Sstevel@tonic-gate 	if (dest == CPU) {
1727c478bd9Sstevel@tonic-gate 		(*func)(farg);
1737c478bd9Sstevel@tonic-gate 		kpreempt_enable();
1747c478bd9Sstevel@tonic-gate 		return;
1757c478bd9Sstevel@tonic-gate 	}
1767c478bd9Sstevel@tonic-gate 
1777c478bd9Sstevel@tonic-gate 	ASSERT(cbe_xcall_func == NULL);
1787c478bd9Sstevel@tonic-gate 
1797c478bd9Sstevel@tonic-gate 	cbe_xcall_farg = farg;
1807c478bd9Sstevel@tonic-gate 	membar_producer();
1817c478bd9Sstevel@tonic-gate 	cbe_xcall_cpu = dest;
1827c478bd9Sstevel@tonic-gate 	cbe_xcall_func = func;
1837c478bd9Sstevel@tonic-gate 
1847c478bd9Sstevel@tonic-gate 	send_dirint(dest->cpu_id, CBE_HIGH_PIL);
1857c478bd9Sstevel@tonic-gate 
1867c478bd9Sstevel@tonic-gate 	while (cbe_xcall_func != NULL || cbe_xcall_cpu != NULL)
1877c478bd9Sstevel@tonic-gate 		continue;
1887c478bd9Sstevel@tonic-gate 
1897c478bd9Sstevel@tonic-gate 	kpreempt_enable();
1907c478bd9Sstevel@tonic-gate 
1917c478bd9Sstevel@tonic-gate 	ASSERT(cbe_xcall_func == NULL && cbe_xcall_cpu == NULL);
1927c478bd9Sstevel@tonic-gate }
1937c478bd9Sstevel@tonic-gate 
1947c478bd9Sstevel@tonic-gate void *
1957c478bd9Sstevel@tonic-gate cbe_configure(cpu_t *cpu)
1967c478bd9Sstevel@tonic-gate {
1977c478bd9Sstevel@tonic-gate 	return (cpu);
1987c478bd9Sstevel@tonic-gate }
1997c478bd9Sstevel@tonic-gate 
2007c478bd9Sstevel@tonic-gate void
2017c478bd9Sstevel@tonic-gate cbe_enable(void *arg)
2027c478bd9Sstevel@tonic-gate {
2037c478bd9Sstevel@tonic-gate 	processorid_t me = ((cpu_t *)arg)->cpu_id;
2047c478bd9Sstevel@tonic-gate 
2057c478bd9Sstevel@tonic-gate 	if ((cbe_psm_timer_mode != TIMER_ONESHOT) && (me == 0))
2067c478bd9Sstevel@tonic-gate 		return;
2077c478bd9Sstevel@tonic-gate 
2087c478bd9Sstevel@tonic-gate 	ASSERT(!CPU_IN_SET(cbe_enabled, me));
2097c478bd9Sstevel@tonic-gate 	CPUSET_ADD(cbe_enabled, me);
2107c478bd9Sstevel@tonic-gate 	if (cbe_psm_timer_mode == TIMER_ONESHOT)
2117c478bd9Sstevel@tonic-gate 		(*psm_timer_enable)();
2127c478bd9Sstevel@tonic-gate }
2137c478bd9Sstevel@tonic-gate 
2147c478bd9Sstevel@tonic-gate void
2157c478bd9Sstevel@tonic-gate cbe_disable(void *arg)
2167c478bd9Sstevel@tonic-gate {
2177c478bd9Sstevel@tonic-gate 	processorid_t me = ((cpu_t *)arg)->cpu_id;
2187c478bd9Sstevel@tonic-gate 
2197c478bd9Sstevel@tonic-gate 	if (me == 0) {
2207c478bd9Sstevel@tonic-gate 		/*
2217c478bd9Sstevel@tonic-gate 		 * If this is the boot CPU, we'll quietly refuse to disable
2227c478bd9Sstevel@tonic-gate 		 * our clock interrupt.
2237c478bd9Sstevel@tonic-gate 		 */
2247c478bd9Sstevel@tonic-gate 		return;
2257c478bd9Sstevel@tonic-gate 	}
2267c478bd9Sstevel@tonic-gate 
2277c478bd9Sstevel@tonic-gate 	ASSERT(CPU_IN_SET(cbe_enabled, me));
2287c478bd9Sstevel@tonic-gate 	CPUSET_DEL(cbe_enabled, me);
2297c478bd9Sstevel@tonic-gate 	if (cbe_psm_timer_mode == TIMER_ONESHOT)
2307c478bd9Sstevel@tonic-gate 		(*psm_timer_disable)();
2317c478bd9Sstevel@tonic-gate }
2327c478bd9Sstevel@tonic-gate 
2337c478bd9Sstevel@tonic-gate /*
2347c478bd9Sstevel@tonic-gate  * Called only on CPU 0. This is done since TSCs can have deltas between
2357c478bd9Sstevel@tonic-gate  * different cpus see tsc_tick()
2367c478bd9Sstevel@tonic-gate  */
2377c478bd9Sstevel@tonic-gate void
2387c478bd9Sstevel@tonic-gate cbe_hres_tick(void)
2397c478bd9Sstevel@tonic-gate {
2407c478bd9Sstevel@tonic-gate 	int s;
2417c478bd9Sstevel@tonic-gate 
2427c478bd9Sstevel@tonic-gate 	dtrace_hres_tick();
2437c478bd9Sstevel@tonic-gate 
2447c478bd9Sstevel@tonic-gate 	/*
2457c478bd9Sstevel@tonic-gate 	 * Because hres_tick effectively locks hres_lock, we must be at the
2467c478bd9Sstevel@tonic-gate 	 * same PIL as that used for CLOCK_LOCK.
2477c478bd9Sstevel@tonic-gate 	 */
2487c478bd9Sstevel@tonic-gate 	s = splr(ipltospl(XC_HI_PIL));
2497c478bd9Sstevel@tonic-gate 	hres_tick();
2507c478bd9Sstevel@tonic-gate 	splx(s);
2517c478bd9Sstevel@tonic-gate 
2527c478bd9Sstevel@tonic-gate 	if ((cbe_ticks % hz) == 0)
2537c478bd9Sstevel@tonic-gate 		(*hrtime_tick)();
2547c478bd9Sstevel@tonic-gate 
2557c478bd9Sstevel@tonic-gate 	cbe_ticks++;
2567c478bd9Sstevel@tonic-gate 
2577c478bd9Sstevel@tonic-gate }
2587c478bd9Sstevel@tonic-gate 
2597c478bd9Sstevel@tonic-gate void
2607c478bd9Sstevel@tonic-gate cbe_init(void)
2617c478bd9Sstevel@tonic-gate {
2627c478bd9Sstevel@tonic-gate 	cyc_backend_t cbe = {
2637c478bd9Sstevel@tonic-gate 		cbe_configure,		/* cyb_configure */
2647c478bd9Sstevel@tonic-gate 		NULL,			/* cyb_unconfigure */
2657c478bd9Sstevel@tonic-gate 		cbe_enable,		/* cyb_enable */
2667c478bd9Sstevel@tonic-gate 		cbe_disable,		/* cyb_disable */
2677c478bd9Sstevel@tonic-gate 		cbe_reprogram,		/* cyb_reprogram */
2687c478bd9Sstevel@tonic-gate 		cbe_softint,		/* cyb_softint */
2697c478bd9Sstevel@tonic-gate 		cbe_set_level,		/* cyb_set_level */
2707c478bd9Sstevel@tonic-gate 		cbe_restore_level,	/* cyb_restore_level */
2717c478bd9Sstevel@tonic-gate 		cbe_xcall,		/* cyb_xcall */
2727c478bd9Sstevel@tonic-gate 		NULL,			/* cyb_suspend */
2737c478bd9Sstevel@tonic-gate 		NULL			/* cyb_resume */
2747c478bd9Sstevel@tonic-gate 	};
2757c478bd9Sstevel@tonic-gate 	hrtime_t resolution;
2767c478bd9Sstevel@tonic-gate 	cyc_handler_t hdlr;
2777c478bd9Sstevel@tonic-gate 	cyc_time_t when;
2787c478bd9Sstevel@tonic-gate 
2797c478bd9Sstevel@tonic-gate 	cbe_vector = (*psm_get_clockirq)(CBE_HIGH_PIL);
2807c478bd9Sstevel@tonic-gate 
2817c478bd9Sstevel@tonic-gate 	CPUSET_ZERO(cbe_enabled);
2827c478bd9Sstevel@tonic-gate 
2837c478bd9Sstevel@tonic-gate 	resolution = (*clkinitf)(TIMER_ONESHOT, &cbe_psm_timer_mode);
2847c478bd9Sstevel@tonic-gate 
2857c478bd9Sstevel@tonic-gate 	mutex_enter(&cpu_lock);
2867c478bd9Sstevel@tonic-gate 	cyclic_init(&cbe, resolution);
2877c478bd9Sstevel@tonic-gate 	mutex_exit(&cpu_lock);
2887c478bd9Sstevel@tonic-gate 
2897c478bd9Sstevel@tonic-gate 	(void) add_avintr(NULL, CBE_HIGH_PIL, (avfunc)cbe_fire,
290*7a364d25Sschwartz 	    "cbe_fire_master", cbe_vector, 0, NULL, NULL, NULL);
2917c478bd9Sstevel@tonic-gate 
2927c478bd9Sstevel@tonic-gate 	if (psm_get_ipivect != NULL) {
2937c478bd9Sstevel@tonic-gate 		(void) add_avintr(NULL, CBE_HIGH_PIL, (avfunc)cbe_fire,
2947c478bd9Sstevel@tonic-gate 		    "cbe_fire_slave",
2957c478bd9Sstevel@tonic-gate 		    (*psm_get_ipivect)(CBE_HIGH_PIL, PSM_INTR_IPI_HI),
296*7a364d25Sschwartz 		    0, NULL, NULL, NULL);
2977c478bd9Sstevel@tonic-gate 	}
2987c478bd9Sstevel@tonic-gate 
2997c478bd9Sstevel@tonic-gate 	(void) add_avsoftintr((void *)&cbe_clock_hdl, CBE_LOCK_PIL,
3007c478bd9Sstevel@tonic-gate 	    (avfunc)cbe_softclock, "softclock", NULL, NULL);
3017c478bd9Sstevel@tonic-gate 
3027c478bd9Sstevel@tonic-gate 	(void) add_avsoftintr((void *)&cbe_low_hdl, CBE_LOW_PIL,
3037c478bd9Sstevel@tonic-gate 	    (avfunc)cbe_low_level, "low level", NULL, NULL);
3047c478bd9Sstevel@tonic-gate 
3057c478bd9Sstevel@tonic-gate 	mutex_enter(&cpu_lock);
3067c478bd9Sstevel@tonic-gate 
3077c478bd9Sstevel@tonic-gate 	hdlr.cyh_level = CY_HIGH_LEVEL;
3087c478bd9Sstevel@tonic-gate 	hdlr.cyh_func = (cyc_func_t)cbe_hres_tick;
3097c478bd9Sstevel@tonic-gate 	hdlr.cyh_arg = NULL;
3107c478bd9Sstevel@tonic-gate 
3117c478bd9Sstevel@tonic-gate 	when.cyt_when = 0;
3127c478bd9Sstevel@tonic-gate 	when.cyt_interval = nsec_per_tick;
3137c478bd9Sstevel@tonic-gate 
3147c478bd9Sstevel@tonic-gate 	cbe_hres_cyclic = cyclic_add(&hdlr, &when);
3157c478bd9Sstevel@tonic-gate 
3167c478bd9Sstevel@tonic-gate 	/* bind to cpu 0, which is also the boot cpu */
3177c478bd9Sstevel@tonic-gate 	cyclic_bind(cbe_hres_cyclic, CPU, NULL);
3187c478bd9Sstevel@tonic-gate 
3197c478bd9Sstevel@tonic-gate 	if (psm_post_cyclic_setup != NULL)
3207c478bd9Sstevel@tonic-gate 		(*psm_post_cyclic_setup)(NULL);
3217c478bd9Sstevel@tonic-gate 
3227c478bd9Sstevel@tonic-gate 	mutex_exit(&cpu_lock);
3237c478bd9Sstevel@tonic-gate 
3247c478bd9Sstevel@tonic-gate }
325