diff --git a/kernel/sys.c b/kernel/sys.c index 449b81b..9578e3f 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -875,10 +875,20 @@ EXPORT_SYMBOL_GPL(kernel_halt); */ void kernel_power_off(void) { + printk(KERN_EMERG "XXX: pre-shutdown prepare\n"); kernel_shutdown_prepare(SYSTEM_POWER_OFF); - if (pm_power_off_prepare) + printk(KERN_EMERG "XXX: post-shutdown prepare, sleeping 5\n"); + ssleep(5); + if (pm_power_off_prepare) { + printk(KERN_EMERG "XXX: pre-power_off_prepare\n"); pm_power_off_prepare(); + printk(KERN_EMERG "XXX: post-power_off_prepare, sleeping 5\n"); + ssleep(5); + } + printk(KERN_EMERG "XXX: pre-sysdev_shutdown\n"); sysdev_shutdown(); + printk(KERN_EMERG "XXX: post-sysdev_shutdown, sleeping 5\n"); + ssleep(5); printk(KERN_EMERG "Power down.\n"); machine_power_off(); }