206 volatile int quiesce_active = 0;
207
208 void
209 panicsys(const char *format, va_list alist, struct regs *rp, int on_panic_stack)
210 {
211 int s = spl8();
212 kthread_t *t = curthread;
213 cpu_t *cp = CPU;
214
215 caddr_t intr_stack = NULL;
216 uint_t intr_actv;
217
218 ushort_t schedflag = t->t_schedflag;
219 cpu_t *bound_cpu = t->t_bound_cpu;
220 char preempt = t->t_preempt;
221 label_t pcb = t->t_pcb;
222
223 (void) setjmp(&t->t_pcb);
224 t->t_flag |= T_PANIC;
225
226 t->t_schedflag |= TS_DONT_SWAP;
227 t->t_bound_cpu = cp;
228 t->t_preempt++;
229
230 panic_enter_hw(s);
231
232 /*
233 * If we're on the interrupt stack and an interrupt thread is available
234 * in this CPU's pool, preserve the interrupt stack by detaching an
235 * interrupt thread and making its stack the intr_stack.
236 */
237 if (CPU_ON_INTR(cp) && cp->cpu_intr_thread != NULL) {
238 kthread_t *it = cp->cpu_intr_thread;
239
240 intr_stack = cp->cpu_intr_stack;
241 intr_actv = cp->cpu_intr_actv;
242
243 cp->cpu_intr_stack = thread_stk_init(it->t_stk);
244 cp->cpu_intr_thread = it->t_link;
245
246 /*
|
206 volatile int quiesce_active = 0;
207
208 void
209 panicsys(const char *format, va_list alist, struct regs *rp, int on_panic_stack)
210 {
211 int s = spl8();
212 kthread_t *t = curthread;
213 cpu_t *cp = CPU;
214
215 caddr_t intr_stack = NULL;
216 uint_t intr_actv;
217
218 ushort_t schedflag = t->t_schedflag;
219 cpu_t *bound_cpu = t->t_bound_cpu;
220 char preempt = t->t_preempt;
221 label_t pcb = t->t_pcb;
222
223 (void) setjmp(&t->t_pcb);
224 t->t_flag |= T_PANIC;
225
226 t->t_bound_cpu = cp;
227 t->t_preempt++;
228
229 panic_enter_hw(s);
230
231 /*
232 * If we're on the interrupt stack and an interrupt thread is available
233 * in this CPU's pool, preserve the interrupt stack by detaching an
234 * interrupt thread and making its stack the intr_stack.
235 */
236 if (CPU_ON_INTR(cp) && cp->cpu_intr_thread != NULL) {
237 kthread_t *it = cp->cpu_intr_thread;
238
239 intr_stack = cp->cpu_intr_stack;
240 intr_actv = cp->cpu_intr_actv;
241
242 cp->cpu_intr_stack = thread_stk_init(it->t_stk);
243 cp->cpu_intr_thread = it->t_link;
244
245 /*
|