--- old/usr/src/uts/common/cpr/cpr_main.c	2014-01-03 22:11:52.275529566 -0500
+++ new/usr/src/uts/common/cpr/cpr_main.c	2014-01-03 22:11:52.283118038 -0500
@@ -90,7 +90,6 @@
 int curthreadremapped;
 
 extern cpuset_t cpu_ready_set;
-extern void *(*cpu_pause_func)(void *);
 
 extern processorid_t i_cpr_bootcpuid(void);
 extern cpu_t *i_cpr_bootcpu(void);
@@ -416,8 +415,7 @@
 	/*
 	 * pause all other running CPUs and save the CPU state at the sametime
 	 */
-	cpu_pause_func = i_cpr_save_context;
-	pause_cpus(NULL);
+	pause_cpus(NULL, i_cpr_save_context);
 
 	mutex_exit(&cpu_lock);
 
@@ -792,12 +790,6 @@
 
 	mutex_enter(&cpu_lock);
 	/*
-	 * Restore this cpu to use the regular cpu_pause(), so that
-	 * online and offline will work correctly
-	 */
-	cpu_pause_func = NULL;
-
-	/*
 	 * clear the affinity set in cpr_suspend_cpus()
 	 */
 	affinity_clear();
@@ -820,13 +812,6 @@
 	PMD(PMD_SX, ("cpr_unpause_cpus: restoring system\n"))
 
 	mutex_enter(&cpu_lock);
-
-	/*
-	 * Restore this cpu to use the regular cpu_pause(), so that
-	 * online and offline will work correctly
-	 */
-	cpu_pause_func = NULL;
-
 	/*
 	 * Restart the paused cpus
 	 */
@@ -1094,7 +1079,7 @@
 	 */
 	if (cpr_resume_uniproc) {
 		mutex_enter(&cpu_lock);
-		pause_cpus(NULL);
+		pause_cpus(NULL, NULL);
 		mutex_exit(&cpu_lock);
 	}
 #endif
--- old/usr/src/uts/common/disp/cmt.c	2014-01-03 22:11:52.479190552 -0500
+++ new/usr/src/uts/common/disp/cmt.c	2014-01-03 22:11:52.485618194 -0500
@@ -355,7 +355,7 @@
 	 * We're changing around the hierarchy, which is actively traversed
 	 * by the dispatcher. Pause CPUS to ensure exclusivity.
 	 */
-	pause_cpus(NULL);
+	pause_cpus(NULL, NULL);
 
 	/*
 	 * If necessary, update the parent's sibling set, replacing parent
@@ -1555,7 +1555,7 @@
 	 * We're operating on the PG hierarchy. Pause CPUs to ensure
 	 * exclusivity with respect to the dispatcher.
 	 */
-	pause_cpus(NULL);
+	pause_cpus(NULL, NULL);
 
 	/*
 	 * Prune all PG instances of the hardware sharing relationship
@@ -1675,7 +1675,7 @@
 
 	ASSERT(MUTEX_HELD(&cpu_lock));
 
-	pause_cpus(NULL);
+	pause_cpus(NULL, NULL);
 	cpu = cpu_list;
 
 	do {
--- old/usr/src/uts/common/disp/cpupart.c	2014-01-03 22:11:52.697650264 -0500
+++ new/usr/src/uts/common/disp/cpupart.c	2014-01-03 22:11:52.704132196 -0500
@@ -441,7 +441,7 @@
 		return (EBUSY);
 	}
 
-	pause_cpus(cp);
+	pause_cpus(cp, NULL);
 
 	if (move_threads) {
 		/*
@@ -865,7 +865,7 @@
 	 * the clock thread (which traverses the list without holding
 	 * cpu_lock) isn't running.
 	 */
-	pause_cpus(NULL);
+	pause_cpus(NULL, NULL);
 	pp->cp_next = cp_list_head;
 	pp->cp_prev = cp_list_head->cp_prev;
 	cp_list_head->cp_prev->cp_next = pp;
@@ -1011,7 +1011,7 @@
 	 * the clock thread (which traverses the list without holding
 	 * cpu_lock) isn't running.
 	 */
-	pause_cpus(NULL);
+	pause_cpus(NULL, NULL);
 	pp->cp_prev->cp_next = pp->cp_next;
 	pp->cp_next->cp_prev = pp->cp_prev;
 	if (cp_list_head == pp)
--- old/usr/src/uts/common/disp/disp.c	2014-01-03 22:11:52.889751666 -0500
+++ new/usr/src/uts/common/disp/disp.c	2014-01-03 22:11:52.895297046 -0500
@@ -340,7 +340,7 @@
 	} while (cpup != cpu_list);
 	num = i;
 
-	pause_cpus(NULL);
+	pause_cpus(NULL, NULL);
 	for (i = 0; i < num; i++)
 		disp_dq_assign(&disp_mem[i], numpris);
 	start_cpus();
@@ -1169,22 +1169,23 @@
 #define	THREAD_HAS_CACHE_WARMTH(thread)	\
 	((thread == curthread) ||	\
 	((ddi_get_lbolt() - thread->t_disp_time) <= rechoose_interval))
+
 /*
- * Put the specified thread on the back of the dispatcher
- * queue corresponding to its current priority.
+ * Put the specified thread on the front/back of the dispatcher queue
+ * corresponding to its current priority.
  *
- * Called with the thread in transition, onproc or stopped state
- * and locked (transition implies locked) and at high spl.
- * Returns with the thread in TS_RUN state and still locked.
+ * Called with the thread in transition, onproc or stopped state and locked
+ * (transition implies locked) and at high spl.  Returns with the thread in
+ * TS_RUN state and still locked.
  */
-void
-setbackdq(kthread_t *tp)
+static void
+setfrontbackdq(kthread_t *tp, boolean_t front)
 {
-	dispq_t	*dq;
+	dispq_t		*dq;
 	disp_t		*dp;
 	cpu_t		*cp;
 	pri_t		tpri;
-	int		bound;
+	boolean_t	bound;
 	boolean_t	self;
 
 	ASSERT(THREAD_LOCK_HELD(tp));
@@ -1200,69 +1201,90 @@
 		return;
 	}
 
-	self = (tp == curthread);
-
-	if (tp->t_bound_cpu || tp->t_weakbound_cpu)
-		bound = 1;
-	else
-		bound = 0;
+	self  = (tp == curthread);
+	bound = (tp->t_bound_cpu || tp->t_weakbound_cpu);
 
 	tpri = DISP_PRIO(tp);
 	if (ncpus == 1)
 		cp = tp->t_cpu;
 	else if (!bound) {
 		if (tpri >= kpqpri) {
-			setkpdq(tp, SETKP_BACK);
+			setkpdq(tp, front ? SETKP_FRONT : SETKP_BACK);
 			return;
 		}
 
-		/*
-		 * We'll generally let this thread continue to run where
-		 * it last ran...but will consider migration if:
-		 * - We thread probably doesn't have much cache warmth.
-		 * - The CPU where it last ran is the target of an offline
-		 *   request.
-		 * - The thread last ran outside it's home lgroup.
-		 */
-		if ((!THREAD_HAS_CACHE_WARMTH(tp)) ||
-		    (tp->t_cpu == cpu_inmotion)) {
-			cp = disp_lowpri_cpu(tp->t_cpu, tp->t_lpl, tpri, NULL);
-		} else if (!LGRP_CONTAINS_CPU(tp->t_lpl->lpl_lgrp, tp->t_cpu)) {
-			cp = disp_lowpri_cpu(tp->t_cpu, tp->t_lpl, tpri,
-			    self ? tp->t_cpu : NULL);
-		} else {
-			cp = tp->t_cpu;
-		}
-
-		if (tp->t_cpupart == cp->cpu_part) {
-			int	qlen;
+		cp = tp->t_cpu;
 
+		if (!front) {
 			/*
-			 * Perform any CMT load balancing
+			 * We'll generally let this thread continue to run where
+			 * it last ran...but will consider migration if:
+			 * - We thread probably doesn't have much cache warmth.
+			 * - The CPU where it last ran is the target of an offline
+			 *   request.
+			 * - The thread last ran outside it's home lgroup.
 			 */
-			cp = cmt_balance(tp, cp);
+			if ((!THREAD_HAS_CACHE_WARMTH(tp)) || (cp == cpu_inmotion)) {
+				cp = disp_lowpri_cpu(tp->t_cpu, tp->t_lpl, tpri, NULL);
+			} else if (!LGRP_CONTAINS_CPU(tp->t_lpl->lpl_lgrp, tp->t_cpu)) {
+				cp = disp_lowpri_cpu(tp->t_cpu, tp->t_lpl, tpri,
+				    self ? tp->t_cpu : NULL);
+			}
 
-			/*
-			 * Balance across the run queues
-			 */
-			qlen = RUNQ_LEN(cp, tpri);
-			if (tpri >= RUNQ_MATCH_PRI &&
-			    !(tp->t_schedflag & TS_RUNQMATCH))
-				qlen -= RUNQ_MAX_DIFF;
-			if (qlen > 0) {
-				cpu_t *newcp;
-
-				if (tp->t_lpl->lpl_lgrpid == LGRP_ROOTID) {
-					newcp = cp->cpu_next_part;
-				} else if ((newcp = cp->cpu_next_lpl) == cp) {
-					newcp = cp->cpu_next_part;
+		}
+
+		if (tp->t_cpupart == cp->cpu_part) {
+			if (front) {
+				/*
+				 * We'll generally let this thread continue to run
+				 * where it last ran, but will consider migration if:
+				 * - The thread last ran outside it's home lgroup.
+				 * - The CPU where it last ran is the target of an
+				 *   offline request (a thread_nomigrate() on the in
+				 *   motion CPU relies on this when forcing a preempt).
+				 * - The thread isn't the highest priority thread where
+				 *   it last ran, and it is considered not likely to
+				 *   have significant cache warmth.
+				 */
+				if ((!LGRP_CONTAINS_CPU(tp->t_lpl->lpl_lgrp, cp)) ||
+				    (cp == cpu_inmotion)) {
+					cp = disp_lowpri_cpu(tp->t_cpu, tp->t_lpl, tpri,
+					    self ? cp : NULL);
+				} else if ((tpri < cp->cpu_disp->disp_maxrunpri) &&
+				    (!THREAD_HAS_CACHE_WARMTH(tp))) {
+					cp = disp_lowpri_cpu(tp->t_cpu, tp->t_lpl, tpri,
+					    NULL);
 				}
+			} else {
+				int	qlen;
 
-				if (RUNQ_LEN(newcp, tpri) < qlen) {
-					DTRACE_PROBE3(runq__balance,
-					    kthread_t *, tp,
-					    cpu_t *, cp, cpu_t *, newcp);
-					cp = newcp;
+				/*
+				 * Perform any CMT load balancing
+				 */
+				cp = cmt_balance(tp, cp);
+
+				/*
+				 * Balance across the run queues
+				 */
+				qlen = RUNQ_LEN(cp, tpri);
+				if (tpri >= RUNQ_MATCH_PRI &&
+				    !(tp->t_schedflag & TS_RUNQMATCH))
+					qlen -= RUNQ_MAX_DIFF;
+				if (qlen > 0) {
+					cpu_t *newcp;
+
+					if (tp->t_lpl->lpl_lgrpid == LGRP_ROOTID) {
+						newcp = cp->cpu_next_part;
+					} else if ((newcp = cp->cpu_next_lpl) == cp) {
+						newcp = cp->cpu_next_part;
+					}
+
+					if (RUNQ_LEN(newcp, tpri) < qlen) {
+						DTRACE_PROBE3(runq__balance,
+						    kthread_t *, tp,
+						    cpu_t *, cp, cpu_t *, newcp);
+						cp = newcp;
+					}
 				}
 			}
 		} else {
@@ -1272,6 +1294,7 @@
 			cp = disp_lowpri_cpu(tp->t_cpupart->cp_cpulist,
 			    tp->t_lpl, tp->t_pri, NULL);
 		}
+
 		ASSERT((cp->cpu_flags & CPU_QUIESCED) == 0);
 	} else {
 		/*
@@ -1283,6 +1306,7 @@
 		cp = tp->t_weakbound_cpu ?
 		    tp->t_weakbound_cpu : tp->t_bound_cpu;
 	}
+
 	/*
 	 * A thread that is ONPROC may be temporarily placed on the run queue
 	 * but then chosen to run again by disp.  If the thread we're placing on
@@ -1304,9 +1328,14 @@
 	dp = cp->cpu_disp;
 	disp_lock_enter_high(&dp->disp_lock);
 
-	DTRACE_SCHED3(enqueue, kthread_t *, tp, disp_t *, dp, int, 0);
-	TRACE_3(TR_FAC_DISP, TR_BACKQ, "setbackdq:pri %d cpu %p tid %p",
-	    tpri, cp, tp);
+	DTRACE_SCHED3(enqueue, kthread_t *, tp, disp_t *, dp, int, front);
+	if (front) {
+		TRACE_2(TR_FAC_DISP, TR_FRONTQ, "frontq:pri %d tid %p", tpri,
+			tp);
+	} else {
+		TRACE_3(TR_FAC_DISP, TR_BACKQ, "setbackdq:pri %d cpu %p tid %p",
+			tpri, cp, tp);
+	}
 
 #ifndef NPROBE
 	/* Kernel probe */
@@ -1327,9 +1356,15 @@
 	membar_enter();
 
 	if (dq->dq_sruncnt++ != 0) {
-		ASSERT(dq->dq_first != NULL);
-		dq->dq_last->t_link = tp;
-		dq->dq_last = tp;
+		if (front) {
+			ASSERT(dq->dq_last != NULL);
+			tp->t_link = dq->dq_first;
+			dq->dq_first = tp;
+		} else {
+			ASSERT(dq->dq_first != NULL);
+			dq->dq_last->t_link = tp;
+			dq->dq_last = tp;
+		}
 	} else {
 		ASSERT(dq->dq_first == NULL);
 		ASSERT(dq->dq_last == NULL);
@@ -1356,10 +1391,25 @@
 		}
 		dp->disp_max_unbound_pri = tpri;
 	}
+
 	(*disp_enq_thread)(cp, bound);
 }
 
 /*
+ * Put the specified thread on the back of the dispatcher
+ * queue corresponding to its current priority.
+ *
+ * Called with the thread in transition, onproc or stopped state
+ * and locked (transition implies locked) and at high spl.
+ * Returns with the thread in TS_RUN state and still locked.
+ */
+void
+setbackdq(kthread_t *tp)
+{
+	setfrontbackdq(tp, B_FALSE);
+}
+
+/*
  * Put the specified thread on the front of the dispatcher
  * queue corresponding to its current priority.
  *
@@ -1370,153 +1420,7 @@
 void
 setfrontdq(kthread_t *tp)
 {
-	disp_t		*dp;
-	dispq_t		*dq;
-	cpu_t		*cp;
-	pri_t		tpri;
-	int		bound;
-
-	ASSERT(THREAD_LOCK_HELD(tp));
-	ASSERT((tp->t_schedflag & TS_ALLSTART) == 0);
-	ASSERT(!thread_on_queue(tp));	/* make sure tp isn't on a runq */
-
-	/*
-	 * If thread is "swapped" or on the swap queue don't
-	 * queue it, but wake sched.
-	 */
-	if ((tp->t_schedflag & (TS_LOAD | TS_ON_SWAPQ)) != TS_LOAD) {
-		disp_swapped_setrun(tp);
-		return;
-	}
-
-	if (tp->t_bound_cpu || tp->t_weakbound_cpu)
-		bound = 1;
-	else
-		bound = 0;
-
-	tpri = DISP_PRIO(tp);
-	if (ncpus == 1)
-		cp = tp->t_cpu;
-	else if (!bound) {
-		if (tpri >= kpqpri) {
-			setkpdq(tp, SETKP_FRONT);
-			return;
-		}
-		cp = tp->t_cpu;
-		if (tp->t_cpupart == cp->cpu_part) {
-			/*
-			 * We'll generally let this thread continue to run
-			 * where it last ran, but will consider migration if:
-			 * - The thread last ran outside it's home lgroup.
-			 * - The CPU where it last ran is the target of an
-			 *   offline request (a thread_nomigrate() on the in
-			 *   motion CPU relies on this when forcing a preempt).
-			 * - The thread isn't the highest priority thread where
-			 *   it last ran, and it is considered not likely to
-			 *   have significant cache warmth.
-			 */
-			if ((!LGRP_CONTAINS_CPU(tp->t_lpl->lpl_lgrp, cp)) ||
-			    (cp == cpu_inmotion)) {
-				cp = disp_lowpri_cpu(tp->t_cpu, tp->t_lpl, tpri,
-				    (tp == curthread) ? cp : NULL);
-			} else if ((tpri < cp->cpu_disp->disp_maxrunpri) &&
-			    (!THREAD_HAS_CACHE_WARMTH(tp))) {
-				cp = disp_lowpri_cpu(tp->t_cpu, tp->t_lpl, tpri,
-				    NULL);
-			}
-		} else {
-			/*
-			 * Migrate to a cpu in the new partition.
-			 */
-			cp = disp_lowpri_cpu(tp->t_cpupart->cp_cpulist,
-			    tp->t_lpl, tp->t_pri, NULL);
-		}
-		ASSERT((cp->cpu_flags & CPU_QUIESCED) == 0);
-	} else {
-		/*
-		 * It is possible that t_weakbound_cpu != t_bound_cpu (for
-		 * a short time until weak binding that existed when the
-		 * strong binding was established has dropped) so we must
-		 * favour weak binding over strong.
-		 */
-		cp = tp->t_weakbound_cpu ?
-		    tp->t_weakbound_cpu : tp->t_bound_cpu;
-	}
-
-	/*
-	 * A thread that is ONPROC may be temporarily placed on the run queue
-	 * but then chosen to run again by disp.  If the thread we're placing on
-	 * the queue is in TS_ONPROC state, don't set its t_waitrq until a
-	 * replacement process is actually scheduled in swtch().  In this
-	 * situation, curthread is the only thread that could be in the ONPROC
-	 * state.
-	 */
-	if ((tp != curthread) && (tp->t_waitrq == 0)) {
-		hrtime_t curtime;
-
-		curtime = gethrtime_unscaled();
-		(void) cpu_update_pct(tp, curtime);
-		tp->t_waitrq = curtime;
-	} else {
-		(void) cpu_update_pct(tp, gethrtime_unscaled());
-	}
-
-	dp = cp->cpu_disp;
-	disp_lock_enter_high(&dp->disp_lock);
-
-	TRACE_2(TR_FAC_DISP, TR_FRONTQ, "frontq:pri %d tid %p", tpri, tp);
-	DTRACE_SCHED3(enqueue, kthread_t *, tp, disp_t *, dp, int, 1);
-
-#ifndef NPROBE
-	/* Kernel probe */
-	if (tnf_tracing_active)
-		tnf_thread_queue(tp, cp, tpri);
-#endif /* NPROBE */
-
-	ASSERT(tpri >= 0 && tpri < dp->disp_npri);
-
-	THREAD_RUN(tp, &dp->disp_lock);		/* set TS_RUN state and lock */
-	tp->t_disp_queue = dp;
-
-	dq = &dp->disp_q[tpri];
-	dp->disp_nrunnable++;
-	if (!bound)
-		dp->disp_steal = 0;
-	membar_enter();
-
-	if (dq->dq_sruncnt++ != 0) {
-		ASSERT(dq->dq_last != NULL);
-		tp->t_link = dq->dq_first;
-		dq->dq_first = tp;
-	} else {
-		ASSERT(dq->dq_last == NULL);
-		ASSERT(dq->dq_first == NULL);
-		tp->t_link = NULL;
-		dq->dq_first = dq->dq_last = tp;
-		BT_SET(dp->disp_qactmap, tpri);
-		if (tpri > dp->disp_maxrunpri) {
-			dp->disp_maxrunpri = tpri;
-			membar_enter();
-			cpu_resched(cp, tpri);
-		}
-	}
-
-	if (!bound && tpri > dp->disp_max_unbound_pri) {
-		if (tp == curthread && dp->disp_max_unbound_pri == -1 &&
-		    cp == CPU) {
-			/*
-			 * If there are no other unbound threads on the
-			 * run queue, don't allow other CPUs to steal
-			 * this thread while we are in the middle of a
-			 * context switch. We may just switch to it
-			 * again right away. CPU_DISP_DONTSTEAL is cleared
-			 * in swtch and swtch_to.
-			 */
-			cp->cpu_disp_flags |= CPU_DISP_DONTSTEAL;
-		}
-		dp->disp_max_unbound_pri = tpri;
-	}
-	(*disp_enq_thread)(cp, bound);
+	setfrontbackdq(tp, B_TRUE);
 }
 
 /*
--- old/usr/src/uts/common/os/cpu.c	2014-01-03 22:11:53.147279443 -0500
+++ new/usr/src/uts/common/os/cpu.c	2014-01-03 22:11:53.154313640 -0500
@@ -167,13 +167,12 @@
 	int		cp_count;	/* # of CPUs to pause */
 	ksema_t		cp_sem;		/* synch pause_cpus & cpu_pause */
 	kthread_id_t	cp_paused;
+	void		*(*cp_func)(void *);
 } cpu_pause_info;
 
 static kmutex_t pause_free_mutex;
 static kcondvar_t pause_free_cv;
 
-void *(*cpu_pause_func)(void *) = NULL;
-
 
 static struct cpu_sys_stats_ks_data {
 	kstat_named_t cpu_ticks_idle;
@@ -792,15 +791,15 @@
 		 */
 		s = splhigh();
 		/*
-		 * if cpu_pause_func() has been set then call it using
-		 * index as the argument, currently only used by
-		 * cpr_suspend_cpus().  This function is used as the
-		 * code to execute on the "paused" cpu's when a machine
-		 * comes out of a sleep state and CPU's were powered off.
-		 * (could also be used for hotplugging CPU's).
+		 * if cp_func has been set then call it using index as the
+		 * argument, currently only used by cpr_suspend_cpus().
+		 * This function is used as the code to execute on the
+		 * "paused" cpu's when a machine comes out of a sleep state
+		 * and CPU's were powered off.  (could also be used for
+		 * hotplugging CPU's).
 		 */
-		if (cpu_pause_func != NULL)
-			(*cpu_pause_func)((void *)lindex);
+		if (cpi->cp_func != NULL)
+			(*cpi->cp_func)((void *)lindex);
 
 		mach_cpu_pause(safe);
 
@@ -988,7 +987,7 @@
  * context.
  */
 void
-pause_cpus(cpu_t *off_cp)
+pause_cpus(cpu_t *off_cp, void *(*func)(void *))
 {
 	processorid_t	cpu_id;
 	int		i;
@@ -1002,6 +1001,8 @@
 		safe_list[i] = PAUSE_IDLE;
 	kpreempt_disable();
 
+	cpi->cp_func = func;
+
 	/*
 	 * If running on the cpu that is going offline, get off it.
 	 * This is so that it won't be necessary to rechoose a CPU
@@ -1206,7 +1207,7 @@
 	error = mp_cpu_start(cp);	/* arch-dep hook */
 	if (error == 0) {
 		pg_cpupart_in(cp, cp->cpu_part);
-		pause_cpus(NULL);
+		pause_cpus(NULL, NULL);
 		cpu_add_active_internal(cp);
 		if (cp->cpu_flags & CPU_FAULTED) {
 			cp->cpu_flags &= ~CPU_FAULTED;
@@ -1405,7 +1406,7 @@
 		 * Put all the cpus into a known safe place.
 		 * No mutexes can be entered while CPUs are paused.
 		 */
-		pause_cpus(cp);
+		pause_cpus(cp, NULL);
 		/*
 		 * Repeat the operation, if necessary, to make sure that
 		 * all outstanding low-level interrupts run to completion
@@ -1758,7 +1759,7 @@
 	 * adding the cpu to the list.
 	 */
 	cp->cpu_part = &cp_default;
-	(void) pause_cpus(NULL);
+	(void) pause_cpus(NULL, NULL);
 	cp->cpu_next = cpu_list;
 	cp->cpu_prev = cpu_list->cpu_prev;
 	cpu_list->cpu_prev->cpu_next = cp;
@@ -1853,7 +1854,7 @@
 	 * has been updated so that we don't waste time
 	 * trying to pause the cpu we're trying to delete.
 	 */
-	(void) pause_cpus(NULL);
+	(void) pause_cpus(NULL, NULL);
 
 	cpnext = cp->cpu_next;
 	cp->cpu_prev->cpu_next = cp->cpu_next;
@@ -1925,7 +1926,7 @@
 {
 	pg_cpupart_in(cp, cp->cpu_part);
 
-	pause_cpus(NULL);
+	pause_cpus(NULL, NULL);
 	cpu_add_active_internal(cp);
 	start_cpus();
 
--- old/usr/src/uts/common/os/cpu_event.c	2014-01-03 22:11:53.420628828 -0500
+++ new/usr/src/uts/common/os/cpu_event.c	2014-01-03 22:11:53.427949007 -0500
@@ -396,7 +396,7 @@
 	 * after pause_cpus().
 	 */
 	if (!cpus_paused()) {
-		pause_cpus(NULL);
+		pause_cpus(NULL, NULL);
 		unpause = 1;
 	}
 
@@ -462,7 +462,7 @@
 	 * after pause_cpus().
 	 */
 	if (!cpus_paused()) {
-		pause_cpus(NULL);
+		pause_cpus(NULL, NULL);
 		unpause = 1;
 	}
 
--- old/usr/src/uts/common/os/cpu_pm.c	2014-01-03 22:11:53.609633496 -0500
+++ new/usr/src/uts/common/os/cpu_pm.c	2014-01-03 22:11:53.616240871 -0500
@@ -188,7 +188,7 @@
 	 */
 	switch (new_policy) {
 	case CPUPM_POLICY_DISABLED:
-		pause_cpus(NULL);
+		pause_cpus(NULL, NULL);
 		cpupm_policy = CPUPM_POLICY_DISABLED;
 		start_cpus();
 
@@ -228,7 +228,7 @@
 			gov_init = 1;
 		}
 
-		pause_cpus(NULL);
+		pause_cpus(NULL, NULL);
 		cpupm_policy = CPUPM_POLICY_ELASTIC;
 		start_cpus();
 
--- old/usr/src/uts/common/os/lgrp.c	2014-01-03 22:11:53.786205179 -0500
+++ new/usr/src/uts/common/os/lgrp.c	2014-01-03 22:11:53.793459828 -0500
@@ -1297,7 +1297,7 @@
 		klgrpset_add(my_lgrp->lgrp_set[LGRP_RSRC_MEM], lgrpid);
 
 		if (need_synch)
-			pause_cpus(NULL);
+			pause_cpus(NULL, NULL);
 		count = lgrp_leaf_add(my_lgrp, lgrp_table, lgrp_alloc_max + 1,
 		    &changed);
 		if (need_synch)
@@ -1316,7 +1316,7 @@
 		    lgrpid))
 			klgrpset_add(my_lgrp->lgrp_set[LGRP_RSRC_MEM], lgrpid);
 		if (need_synch)
-			pause_cpus(NULL);
+			pause_cpus(NULL, NULL);
 		count = lgrp_leaf_add(my_lgrp, lgrp_table, lgrp_alloc_max + 1,
 		    &changed);
 		if (need_synch)
@@ -1477,7 +1477,7 @@
 		 * Delete lgroup when no more resources
 		 */
 		if (need_synch)
-			pause_cpus(NULL);
+			pause_cpus(NULL, NULL);
 		count = lgrp_leaf_delete(my_lgrp, lgrp_table,
 		    lgrp_alloc_max + 1, &changed);
 		ASSERT(count > 0);
--- old/usr/src/uts/common/os/lgrp_topo.c	2014-01-03 22:11:54.089841421 -0500
+++ new/usr/src/uts/common/os/lgrp_topo.c	2014-01-03 22:11:54.096291863 -0500
@@ -1480,7 +1480,7 @@
 	}
 
 	mutex_enter(&cpu_lock);
-	pause_cpus(NULL);
+	pause_cpus(NULL, NULL);
 
 	/*
 	 * Look for any leaf lgroup without its latency set, finish adding it
--- old/usr/src/uts/common/os/mem_config.c	2014-01-03 22:11:54.290907880 -0500
+++ new/usr/src/uts/common/os/mem_config.c	2014-01-03 22:11:54.297731426 -0500
@@ -3302,7 +3302,7 @@
 	vm_cpu_data_t *vc;
 
 	mutex_enter(&cpu_lock);
-	pause_cpus(NULL);
+	pause_cpus(NULL, NULL);
 
 	cp = cpu_list;
 	do {
--- old/usr/src/uts/common/sys/cpuvar.h	2014-01-03 22:11:54.544326033 -0500
+++ new/usr/src/uts/common/sys/cpuvar.h	2014-01-03 22:11:54.550893025 -0500
@@ -659,7 +659,7 @@
 
 void	mach_cpu_pause(volatile char *);
 
-void	pause_cpus(cpu_t *off_cp);
+void	pause_cpus(cpu_t *off_cp, void *(*func)(void *));
 void	start_cpus(void);
 int	cpus_paused(void);
 
--- old/usr/src/uts/i86pc/i86hvm/io/xpv/xpv_support.c	2014-01-03 22:11:54.727381715 -0500
+++ new/usr/src/uts/i86pc/i86hvm/io/xpv/xpv_support.c	2014-01-03 22:11:54.733813794 -0500
@@ -472,7 +472,7 @@
 	kpreempt_disable();
 
 	if (ncpus > 1)
-		pause_cpus(NULL);
+		pause_cpus(NULL, NULL);
 	/*
 	 * We can grab the ec_lock as it's a spinlock with a high SPL. Hence
 	 * any holder would have dropped it to get through pause_cpus().
--- old/usr/src/uts/i86pc/io/dr/dr_quiesce.c	2014-01-03 22:11:54.899635412 -0500
+++ new/usr/src/uts/i86pc/io/dr/dr_quiesce.c	2014-01-03 22:11:54.906206423 -0500
@@ -872,7 +872,7 @@
 	srh->sr_suspend_state = DR_SRSTATE_FULL;
 
 	mutex_enter(&cpu_lock);
-	pause_cpus(NULL);
+	pause_cpus(NULL, NULL);
 	dr_stop_intr();
 
 	return (rc);
--- old/usr/src/uts/i86pc/io/pcplusmp/apic.c	2014-01-03 22:11:55.084436805 -0500
+++ new/usr/src/uts/i86pc/io/pcplusmp/apic.c	2014-01-03 22:11:55.090444905 -0500
@@ -143,10 +143,6 @@
 uchar_t	apic_ipltopri[MAXIPL + 1];	/* unix ipl to apic pri	*/
 	/* The taskpri to be programmed into apic to mask given ipl */
 
-#if defined(__amd64)
-uchar_t	apic_cr8pri[MAXIPL + 1];	/* unix ipl to cr8 pri	*/
-#endif
-
 /*
  * Correlation of the hardware vector to the IPL in use, initialized
  * from apic_vectortoipl[] in apic_init().  The final IPLs may not correlate
@@ -300,17 +296,10 @@
 		/* fill up any empty ipltopri slots */
 		apic_ipltopri[j] = (i << APIC_IPL_SHIFT) + APIC_BASE_VECT;
 	apic_init_common();
-#if defined(__amd64)
-	/*
-	 * Make cpu-specific interrupt info point to cr8pri vector
-	 */
-	for (i = 0; i <= MAXIPL; i++)
-		apic_cr8pri[i] = apic_ipltopri[i] >> APIC_IPL_SHIFT;
-	CPU->cpu_pri_data = apic_cr8pri;
-#else
+#ifndef __amd64
 	if (cpuid_have_cr8access(CPU))
 		apic_have_32bit_cr8 = 1;
-#endif	/* __amd64 */
+#endif	/* !__amd64 */
 }
 
 static void
@@ -581,23 +570,9 @@
 		nipl = apic_ipls[vector];
 
 		*vectorp = apic_vector_to_irq[vector + APIC_BASE_VECT];
-		if (apic_mode == LOCAL_APIC) {
-#if defined(__amd64)
-			setcr8((ulong_t)(apic_ipltopri[nipl] >>
-			    APIC_IPL_SHIFT));
-#else
-			if (apic_have_32bit_cr8)
-				setcr8((ulong_t)(apic_ipltopri[nipl] >>
-				    APIC_IPL_SHIFT));
-			else
-				LOCAL_APIC_WRITE_REG(APIC_TASK_REG,
-				    (uint32_t)apic_ipltopri[nipl]);
-#endif
-			LOCAL_APIC_WRITE_REG(APIC_EOI_REG, 0);
-		} else {
-			X2APIC_WRITE(APIC_TASK_REG, apic_ipltopri[nipl]);
-			X2APIC_WRITE(APIC_EOI_REG, 0);
-		}
+
+		apic_reg_ops->apic_write_task_reg(apic_ipltopri[nipl]);
+		apic_reg_ops->apic_send_eoi(0);
 
 		return (nipl);
 	}
@@ -628,20 +603,7 @@
 	nipl = apic_ipls[vector];
 	*vectorp = irq = apic_vector_to_irq[vector + APIC_BASE_VECT];
 
-	if (apic_mode == LOCAL_APIC) {
-#if defined(__amd64)
-		setcr8((ulong_t)(apic_ipltopri[nipl] >> APIC_IPL_SHIFT));
-#else
-		if (apic_have_32bit_cr8)
-			setcr8((ulong_t)(apic_ipltopri[nipl] >>
-			    APIC_IPL_SHIFT));
-		else
-			LOCAL_APIC_WRITE_REG(APIC_TASK_REG,
-			    (uint32_t)apic_ipltopri[nipl]);
-#endif
-	} else {
-		X2APIC_WRITE(APIC_TASK_REG, apic_ipltopri[nipl]);
-	}
+	apic_reg_ops->apic_write_task_reg(apic_ipltopri[nipl]);
 
 	cpu_infop->aci_current[nipl] = (uchar_t)irq;
 	cpu_infop->aci_curipl = (uchar_t)nipl;
@@ -653,11 +615,7 @@
 	 * cache usage. So, we leave it as is.
 	 */
 	if (!apic_level_intr[irq]) {
-		if (apic_mode == LOCAL_APIC) {
-			LOCAL_APIC_WRITE_REG(APIC_EOI_REG, 0);
-		} else {
-			X2APIC_WRITE(APIC_EOI_REG, 0);
-		}
+		apic_reg_ops->apic_send_eoi(0);
 	}
 
 #ifdef	DEBUG
@@ -697,14 +655,7 @@
 {
 	apic_cpus_info_t *cpu_infop;
 
-#if defined(__amd64)
-	setcr8((ulong_t)apic_cr8pri[prev_ipl]);
-#else
-	if (apic_have_32bit_cr8)
-		setcr8((ulong_t)(apic_ipltopri[prev_ipl] >> APIC_IPL_SHIFT));
-	else
-		apicadr[APIC_TASK_REG] = apic_ipltopri[prev_ipl];
-#endif
+	local_apic_write_task_reg(apic_ipltopri[prev_ipl]);
 
 	APIC_INTR_EXIT();
 }
@@ -739,14 +690,7 @@
 static void
 apic_setspl(int ipl)
 {
-#if defined(__amd64)
-	setcr8((ulong_t)apic_cr8pri[ipl]);
-#else
-	if (apic_have_32bit_cr8)
-		setcr8((ulong_t)(apic_ipltopri[ipl] >> APIC_IPL_SHIFT));
-	else
-		apicadr[APIC_TASK_REG] = apic_ipltopri[ipl];
-#endif
+	local_apic_write_task_reg(apic_ipltopri[ipl]);
 
 	/* interrupts at ipl above this cannot be in progress */
 	apic_cpus[psm_get_cpu_id()].aci_ISR_in_progress &= (2 << ipl) - 1;
@@ -1394,7 +1338,7 @@
 	pops->psm_intr_exit = x2apic_intr_exit;
 	pops->psm_setspl = x2apic_setspl;
 
-	pops->psm_send_ipi =  x2apic_send_ipi;
+	pops->psm_send_ipi = x2apic_send_ipi;
 	send_dirintf = pops->psm_send_ipi;
 
 	apic_mode = LOCAL_X2APIC;
--- old/usr/src/uts/i86pc/io/pcplusmp/apic_regops.c	2014-01-03 22:11:55.283545367 -0500
+++ new/usr/src/uts/i86pc/io/pcplusmp/apic_regops.c	2014-01-03 22:11:55.289076879 -0500
@@ -94,7 +94,6 @@
 void apic_send_EOI();
 void apic_send_directed_EOI(uint32_t irq);
 
-#define	X2APIC_CPUID_BIT	21
 #define	X2APIC_ENABLE_BIT	10
 
 /*
@@ -109,7 +108,7 @@
 static void
 local_apic_write(uint32_t reg, uint64_t value)
 {
-	apicadr[reg] = (uint32_t)value;
+	LOCAL_APIC_WRITE_REG(reg, (uint32_t)value);
 }
 
 static int
@@ -133,7 +132,7 @@
 	if (apic_have_32bit_cr8)
 		setcr8((ulong_t)(value >> APIC_IPL_SHIFT));
 	else
-		apicadr[APIC_TASK_REG] = (uint32_t)value;
+		LOCAL_APIC_WRITE_REG(APIC_TASK_REG, (uint32_t)value);
 #endif
 }
 
@@ -233,15 +232,10 @@
 int
 apic_detect_x2apic(void)
 {
-	struct cpuid_regs cp;
-
 	if (x2apic_enable == 0)
 		return (0);
 
-	cp.cp_eax = 1;
-	(void) __cpuid_insn(&cp);
-
-	return ((cp.cp_ecx & (0x1 << X2APIC_CPUID_BIT)) ? 1 : 0);
+	return is_x86_feature(x86_featureset, X86FSET_X2APIC);
 }
 
 void
--- old/usr/src/uts/i86pc/io/ppm/acpisleep.c	2014-01-03 22:11:55.446917406 -0500
+++ new/usr/src/uts/i86pc/io/ppm/acpisleep.c	2014-01-03 22:11:55.453456880 -0500
@@ -70,8 +70,6 @@
 extern int tsc_gethrtime_enable;
 
 extern cpuset_t cpu_ready_set;
-extern void *(*cpu_pause_func)(void *);
-
 
 
 /*
--- old/usr/src/uts/i86pc/os/cpr_impl.c	2014-01-03 22:11:55.602652074 -0500
+++ new/usr/src/uts/i86pc/os/cpr_impl.c	2014-01-03 22:11:55.609257000 -0500
@@ -737,7 +737,7 @@
 		mutex_exit(&cpu_lock);
 		return;
 	}
-	pause_cpus(NULL);
+	pause_cpus(NULL, NULL);
 	cpu_are_paused = 1;
 
 	mutex_exit(&cpu_lock);
--- old/usr/src/uts/i86pc/os/cpuid.c	2014-01-03 22:11:55.789067875 -0500
+++ new/usr/src/uts/i86pc/os/cpuid.c	2014-01-03 22:11:55.794935552 -0500
@@ -22,6 +22,7 @@
  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2011 by Delphix. All rights reserved.
  * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2014 Josef "Jeff" Sipek <jeffpc@josefsipek.net>
  */
 /*
  * Copyright (c) 2010, Intel Corporation.
@@ -120,7 +121,6 @@
 uint_t x86_clflush_size = 0;
 
 uint_t pentiumpro_bug4046376;
-uint_t pentiumpro_bug4064495;
 
 uchar_t x86_featureset[BT_SIZEOFMAP(NUM_X86_FEATURES)];
 
@@ -164,7 +164,8 @@
 	"svm",
 	"topoext",
 	"f16c",
-	"rdrand"
+	"rdrand",
+	"x2apic",
 };
 
 boolean_t
@@ -214,8 +215,6 @@
 	}
 }
 
-uint_t enable486;
-
 static size_t xsave_state_size = 0;
 uint64_t xsave_bv_all = (XFEATURE_LEGACY_FP | XFEATURE_SSE);
 boolean_t xsave_force_disable = B_FALSE;
@@ -1033,7 +1032,6 @@
 		else if (IS_LEGACY_P6(cpi)) {
 			x86_type = X86_TYPE_P6;
 			pentiumpro_bug4046376 = 1;
-			pentiumpro_bug4064495 = 1;
 			/*
 			 * Clear the SEP bit when it was set erroneously
 			 */
@@ -1315,6 +1313,9 @@
 			}
 		}
 	}
+	if (cp->cp_ecx & CPUID_INTC_ECX_X2APIC) {
+		add_x86_feature(featureset, X86FSET_X2APIC);
+	}
 	if (cp->cp_edx & CPUID_INTC_EDX_DE) {
 		add_x86_feature(featureset, X86FSET_DE);
 	}
--- old/usr/src/uts/i86pc/os/machdep.c	2014-01-03 22:11:56.116228562 -0500
+++ new/usr/src/uts/i86pc/os/machdep.c	2014-01-03 22:11:56.122872986 -0500
@@ -283,7 +283,7 @@
 	(void) spl6();
 	if (!panicstr) {
 		mutex_enter(&cpu_lock);
-		pause_cpus(NULL);
+		pause_cpus(NULL, NULL);
 		mutex_exit(&cpu_lock);
 	}
 
--- old/usr/src/uts/i86pc/os/mp_pc.c	2014-01-03 22:11:56.314555034 -0500
+++ new/usr/src/uts/i86pc/os/mp_pc.c	2014-01-03 22:11:56.320908387 -0500
@@ -63,7 +63,6 @@
 extern void real_mode_stop_cpu_stage1_end(void);
 extern void real_mode_stop_cpu_stage2(void);
 extern void real_mode_stop_cpu_stage2_end(void);
-extern void *(*cpu_pause_func)(void *);
 
 void rmp_gdt_init(rm_platter_t *);
 
--- old/usr/src/uts/i86pc/os/x_call.c	2014-01-03 22:11:56.486778114 -0500
+++ new/usr/src/uts/i86pc/os/x_call.c	2014-01-03 22:11:56.493119990 -0500
@@ -279,7 +279,7 @@
 	 * This is used to work around a race condition window in xc_common()
 	 * between checking CPU_READY flag and increasing working item count.
 	 */
-	pause_cpus(cpup);
+	pause_cpus(cpup, NULL);
 	start_cpus();
 
 	for (i = 0; i < XC_FLUSH_MAX_WAITS; i++) {
--- old/usr/src/uts/i86xpv/os/mp_xen.c	2014-01-03 22:11:56.662358438 -0500
+++ new/usr/src/uts/i86xpv/os/mp_xen.c	2014-01-03 22:11:56.668890223 -0500
@@ -586,7 +586,7 @@
 
 	ASSERT(MUTEX_HELD(&cpu_lock));
 
-	pause_cpus(NULL);
+	pause_cpus(NULL, NULL);
 
 	while (!done) {
 		done = 1;
--- old/usr/src/uts/intel/sys/x86_archext.h	2014-01-03 22:11:56.845577287 -0500
+++ new/usr/src/uts/intel/sys/x86_archext.h	2014-01-03 22:11:56.851459357 -0500
@@ -116,6 +116,7 @@
 #define	CPUID_INTC_ECX_DCA	0x00040000	/* direct cache access */
 #define	CPUID_INTC_ECX_SSE4_1	0x00080000	/* SSE4.1 insns */
 #define	CPUID_INTC_ECX_SSE4_2	0x00100000	/* SSE4.2 insns */
+#define	CPUID_INTC_ECX_X2APIC	0x00200000	/* x2APIC */
 #define	CPUID_INTC_ECX_MOVBE	0x00400000	/* MOVBE insn */
 #define	CPUID_INTC_ECX_POPCNT	0x00800000	/* POPCNT insn */
 #define	CPUID_INTC_ECX_AES	0x02000000	/* AES insns */
@@ -130,7 +131,7 @@
 	"\20"							\
 	"\37rdrand\36f16c\35avx\34osxsav\33xsave"		\
 	"\32aes"						\
-	"\30popcnt\27movbe\25sse4.2\24sse4.1\23dca"		\
+	"\30popcnt\27movbe\26x2apic\25sse4.2\24sse4.1\23dca"	\
 	"\20\17etprd\16cx16\13cid\12ssse3\11tm2"		\
 	"\10est\7smx\6vmx\5dscpl\4mon\2pclmulqdq\1sse3"
 
@@ -346,7 +347,7 @@
 #define	X86FSET_PGE		4
 #define	X86FSET_DE		5
 #define	X86FSET_CMOV		6
-#define	X86FSET_MMX 		7
+#define	X86FSET_MMX		7
 #define	X86FSET_MCA		8
 #define	X86FSET_PAE		9
 #define	X86FSET_CX8		10
@@ -379,6 +380,7 @@
 #define	X86FSET_TOPOEXT		37
 #define	X86FSET_F16C		38
 #define	X86FSET_RDRAND		39
+#define	X86FSET_X2APIC		40
 
 /*
  * flags to patch tsc_read routine.
@@ -639,7 +641,7 @@
 
 #if defined(_KERNEL) || defined(_KMEMUSER)
 
-#define	NUM_X86_FEATURES	40
+#define	NUM_X86_FEATURES	41
 extern uchar_t x86_featureset[];
 
 extern void free_x86_featureset(void *featureset);
@@ -655,9 +657,6 @@
 extern uint_t x86_clflush_size;
 
 extern uint_t pentiumpro_bug4046376;
-extern uint_t pentiumpro_bug4064495;
-
-extern uint_t enable486;
 
 extern const char CyrixInstead[];
 
--- old/usr/src/uts/sun4/os/mp_states.c	2014-01-03 22:11:57.027274006 -0500
+++ new/usr/src/uts/sun4/os/mp_states.c	2014-01-03 22:11:57.033820563 -0500
@@ -200,7 +200,7 @@
 	if (ncpus > 1)
 		intr_redist_all_cpus_shutdown();
 
-	pause_cpus(NULL);
+	pause_cpus(NULL, NULL);
 	cpu_are_paused = 1;
 
 	mutex_exit(&cpu_lock);
--- old/usr/src/uts/sun4/os/prom_subr.c	2014-01-03 22:11:57.189903471 -0500
+++ new/usr/src/uts/sun4/os/prom_subr.c	2014-01-03 22:11:57.196184069 -0500
@@ -410,7 +410,7 @@
 void
 promsafe_pause_cpus(void)
 {
-	pause_cpus(NULL);
+	pause_cpus(NULL, NULL);
 
 	/* If some other cpu is entering or is in the prom, spin */
 	while (prom_cpu || mutex_owner(&prom_mutex)) {
@@ -423,7 +423,7 @@
 			cv_wait(&prom_cv, &prom_mutex);
 
 		mutex_exit(&prom_mutex);
-		pause_cpus(NULL);
+		pause_cpus(NULL, NULL);
 	}
 
 	/* At this point all cpus are paused and none are in the prom */
--- old/usr/src/uts/sun4u/io/mem_cache.c	2014-01-03 22:11:57.360628743 -0500
+++ new/usr/src/uts/sun4u/io/mem_cache.c	2014-01-03 22:11:57.368168954 -0500
@@ -815,7 +815,7 @@
 			    << PN_CACHE_LINE_SHIFT);
 			mutex_enter(&cpu_lock);
 			affinity_set(cache_info->cpu_id);
-			(void) pause_cpus(NULL);
+			(void) pause_cpus(NULL, NULL);
 			mutex_exit(&cpu_lock);
 			/*
 			 * We bind ourself to a CPU and send cross trap to
--- old/usr/src/uts/sun4u/ngdr/io/dr_quiesce.c	2014-01-03 22:11:57.547195267 -0500
+++ new/usr/src/uts/sun4u/ngdr/io/dr_quiesce.c	2014-01-03 22:11:57.553576065 -0500
@@ -935,7 +935,7 @@
 	CPU_SIGNATURE(OS_SIG, SIGST_QUIESCED, SIGSUBST_NULL, CPU->cpu_id);
 
 	mutex_enter(&cpu_lock);
-	pause_cpus(NULL);
+	pause_cpus(NULL, NULL);
 	dr_stop_intr();
 
 	return (rc);
--- old/usr/src/uts/sun4u/os/cpr_impl.c	2014-01-03 22:11:57.754212946 -0500
+++ new/usr/src/uts/sun4u/os/cpr_impl.c	2014-01-03 22:11:57.761034187 -0500
@@ -269,7 +269,7 @@
 		for (cp = CPU->cpu_next; cp != CPU; cp = cp->cpu_next)
 			restart_other_cpu(cp->cpu_id);
 
-		pause_cpus(NULL);
+		pause_cpus(NULL, NULL);
 		mutex_exit(&cpu_lock);
 
 		i_cpr_xcall(i_cpr_clear_entries);
--- old/usr/src/uts/sun4u/serengeti/io/sbdp_quiesce.c	2014-01-03 22:11:57.972220713 -0500
+++ new/usr/src/uts/sun4u/serengeti/io/sbdp_quiesce.c	2014-01-03 22:11:57.978854470 -0500
@@ -844,7 +844,7 @@
 	}
 
 	mutex_enter(&cpu_lock);
-	pause_cpus(NULL);
+	pause_cpus(NULL, NULL);
 	sbdp_stop_intr();
 
 	/*
--- old/usr/src/uts/sun4v/os/mpo.c	2014-01-03 22:11:58.153689736 -0500
+++ new/usr/src/uts/sun4v/os/mpo.c	2014-01-03 22:11:58.160537096 -0500
@@ -220,7 +220,7 @@
 mpo_wr_lock()
 {
 	mutex_enter(&cpu_lock);
-	pause_cpus(NULL);
+	pause_cpus(NULL, NULL);
 	mutex_exit(&cpu_lock);
 }
 
--- old/usr/src/uts/sun4v/os/suspend.c	2014-01-03 22:11:58.374350667 -0500
+++ new/usr/src/uts/sun4v/os/suspend.c	2014-01-03 22:11:58.380864711 -0500
@@ -389,7 +389,7 @@
 	 * inactive in their PGs and shouldn't be reactivated, so we must
 	 * not call pg_cpu_inactive or pg_cpu_active for those CPUs.
 	 */
-	pause_cpus(NULL);
+	pause_cpus(NULL, NULL);
 	for (id = 0; id < NCPU; id++) {
 		if ((cp = cpu_get(id)) == NULL)
 			continue;
@@ -430,7 +430,7 @@
 	 * system, replace the bootstrapped PG structure with the
 	 * initialized PG structure and call pg_cpu_active for each CPU.
 	 */
-	pause_cpus(NULL);
+	pause_cpus(NULL, NULL);
 	for (id = 0; id < NCPU; id++) {
 		if ((cp = cpu_get(id)) == NULL)
 			continue;
@@ -615,7 +615,7 @@
 	mutex_exit(&tod_lock);
 
 	/* Pause all other CPUs */
-	pause_cpus(NULL);
+	pause_cpus(NULL, NULL);
 	DBG_PROM("suspend: CPUs paused\n");
 
 	/* Suspend cyclics */
