rem: int state;
add: cpu_status state;
context: panic(const char *fmt, ...){	int ret = 0;	va_list args;	char temp[128];	int state;		// XXX by setting kernel_startup = true, we disable	// XXX the interrupt check in semaphore code etc.	// XXX should be renamed?	kernel_startup = true;	dbg_set_serial_debug(true);	state = disable_interrupts();	va_start(args, fmt);	ret = vsprintf(temp, fmt, args);	va_end(args);	dprintf("PANIC%d: %s", smp_get_current_cpu(), temp);	if (debugger_on_cpu != smp_get_current_cpu()) {		// halt all of the other cpus		// XXX need to flush current smp mailbox to make sure this goes		// through. Otherwise it'll hang		smp_send_broadcast_ici(SMP_MSG_CPU_HALT, 0, 0, 0, NULL, SMP_MSG_FLAG_SYNC);	}	kernel_debugger(NULL);	restore_interrupts(state);}