提交 2c730785 编写于 作者: S Sebastian Capella 提交者: Rafael J. Wysocki

PM / hibernate: no kernel_power_off when pm_power_off NULL

Reboot logic in kernel/reboot will avoid calling kernel_power_off
when pm_power_off is null, and instead uses kernel_halt.  Change
hibernate's power_down to follow the behavior in the reboot call.

Calling the notifier twice (once for SYS_POWER_OFF and again for
SYS_HALT) causes a panic during hibernation on Kirkwood
Openblocks A6 board.
Signed-off-by: NSebastian Capella <sebastian.capella@linaro.org>
Reported-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Reviewed-by: NPavel Machek <pavel@ucw.cz>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 4881f603
...@@ -599,7 +599,8 @@ static void power_down(void) ...@@ -599,7 +599,8 @@ static void power_down(void)
case HIBERNATION_PLATFORM: case HIBERNATION_PLATFORM:
hibernation_platform_enter(); hibernation_platform_enter();
case HIBERNATION_SHUTDOWN: case HIBERNATION_SHUTDOWN:
kernel_power_off(); if (pm_power_off)
kernel_power_off();
break; break;
#ifdef CONFIG_SUSPEND #ifdef CONFIG_SUSPEND
case HIBERNATION_SUSPEND: case HIBERNATION_SUSPEND:
...@@ -627,7 +628,8 @@ static void power_down(void) ...@@ -627,7 +628,8 @@ static void power_down(void)
* corruption after resume. * corruption after resume.
*/ */
printk(KERN_CRIT "PM: Please power down manually\n"); printk(KERN_CRIT "PM: Please power down manually\n");
while(1); while (1)
cpu_relax();
} }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册