/* Special call, doesn't claim any locks. This is only to be called at panic or halt time, in run-to-completion mode, when the caller is the only CPU and the only thing that will be going is these IPMI calls.  */
static void panic_halt_ipmi_set_timeout(void)
/* Special call, doesn't claim any locks. This is only to be called at panic or halt time, in run-to-completion mode, when the caller is the only CPU and the only thing that will be going is these IPMI calls.  */
static void panic_halt_ipmi_set_timeout(void)
{
	int send_heartbeat_now;
	int rv;
	while (atomic_read(&panic_done_count) != 0)
		ipmi_poll_interface(watchdog_user);
	rv = i_ipmi_set_timeout(&panic_halt_smi_msg,
				&panic_halt_recv_msg,
				&send_heartbeat_now);
	if (!rv) {
		atomic_add(2, &panic_done_count);
		if (send_heartbeat_now)
			panic_halt_ipmi_heartbeat();
	} else
		printk(KERN_WARNING PFX
		       "Unable to extend the watchdog timeout.");
	while (atomic_read(&panic_done_count) != 0)
		ipmi_poll_interface(watchdog_user);
}