Delay 5 seconds on reboot *after* stopping all CPUs.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
Keir Fraser committed 2008-08-04 10:59:22 +01:00
1 parent 269d43f9a2
commit e7c388db06
6 files changed
+15 -11

No files matched your search

+2 -1
View File
@@ -2212,8 +2212,9 @@ int __init construct_dom0(struct domain *d,
return 0;
}
void machine_restart(void)
void machine_restart(unsigned int delay_millisecs)
{
mdelay(delay_millisecs);
console_start_sync();
if (running_on_sim)
printk ("machine_restart called. spinning...\n");
+8 -3
View File
@@ -291,7 +291,12 @@ __initcall(reboot_init);
#endif
void machine_restart(void)
static void __machine_restart(void *pdelay)
{
machine_restart(*(unsigned int *)pdelay);
}
void machine_restart(unsigned int delay_millisecs)
{
int i;
@@ -304,8 +309,8 @@ void machine_restart(void)
if ( get_apic_id() != boot_cpu_physical_apicid )
{
/* Send IPI to the boot CPU (logical cpu 0). */
on_selected_cpus(cpumask_of_cpu(0), (void *)machine_restart,
NULL, 1, 0);
on_selected_cpus(cpumask_of_cpu(0), __machine_restart,
&delay_millisecs, 1, 0);
for ( ; ; )
halt();
}
+1 -1
View File
@@ -143,7 +143,7 @@ static void dump_dom0_registers(unsigned char key)
static void halt_machine(unsigned char key, struct cpu_user_regs *regs)
{
printk("'%c' pressed -> rebooting machine\n", key);
machine_restart();
machine_restart(0);
}
static void cpuset_print(char *set, int size, cpumask_t mask)
+2 -3
View File
@@ -23,8 +23,7 @@ static void maybe_reboot(void)
{
printk("rebooting machine in 5 seconds.\n");
watchdog_disable();
mdelay(5000);
machine_restart();
machine_restart(5000);
}
}
@@ -50,7 +49,7 @@ void dom0_shutdown(u8 reason)
case SHUTDOWN_reboot:
{
printk("Domain 0 shutdown: rebooting machine.\n");
machine_restart();
machine_restart(0);
break; /* not reached */
}
+1 -2
View File
@@ -939,8 +939,7 @@ void panic(const char *fmt, ...)
else
{
watchdog_disable();
mdelay(5000);
machine_restart();
machine_restart(5000);
}
}
+1 -1
View File
@@ -6,7 +6,7 @@ extern int opt_noreboot;
void dom0_shutdown(u8 reason);
void machine_restart(void);
void machine_restart(unsigned int delay_millisecs);
void machine_halt(void);
void machine_power_off(void);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.