提交 beb53e4b 编写于 作者: L Linus Torvalds

Merge tag 'acpi-4.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fixes from Rafael Wysocki:
 "Two ACPI fixes for 4.9-rc7.

  One of them reverts a recent ACPI commit that attempted to improve
  reboot/power-off on some systems, but introduced problems elsewhere,
  and the other one fixes kernel builds with the new WDAT watchdog
  driver enabled in some configurations.

  Specifics:

   - Revert the recent commit that caused the ACPI _PTS method to be
     executed in the power-off/reboot code path (as per the
     specification) in an attempt to improve things on some systems
     (apparently expecting _PTS to be executed in that code path), but
     broke power-off/reboot on at least one other machine (Rafael
     Wysocki).

   - Fix kernel builds with the new WDAT watchdog driver enabled in some
     configurations by explicitly selecting WATCHDOG_CORE when enabling
     the WDAT watchdog driver (Mika Westerberg)"

* tag 'acpi-4.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  watchdog: wdat_wdt: Select WATCHDOG_CORE
  Revert "ACPI: Execute _PTS before system reboot"
...@@ -47,32 +47,15 @@ static void acpi_sleep_tts_switch(u32 acpi_state) ...@@ -47,32 +47,15 @@ static void acpi_sleep_tts_switch(u32 acpi_state)
} }
} }
static void acpi_sleep_pts_switch(u32 acpi_state) static int tts_notify_reboot(struct notifier_block *this,
{
acpi_status status;
status = acpi_execute_simple_method(NULL, "\\_PTS", acpi_state);
if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
/*
* OS can't evaluate the _PTS object correctly. Some warning
* message will be printed. But it won't break anything.
*/
printk(KERN_NOTICE "Failure in evaluating _PTS object\n");
}
}
static int sleep_notify_reboot(struct notifier_block *this,
unsigned long code, void *x) unsigned long code, void *x)
{ {
acpi_sleep_tts_switch(ACPI_STATE_S5); acpi_sleep_tts_switch(ACPI_STATE_S5);
acpi_sleep_pts_switch(ACPI_STATE_S5);
return NOTIFY_DONE; return NOTIFY_DONE;
} }
static struct notifier_block sleep_notifier = { static struct notifier_block tts_notifier = {
.notifier_call = sleep_notify_reboot, .notifier_call = tts_notify_reboot,
.next = NULL, .next = NULL,
.priority = 0, .priority = 0,
}; };
...@@ -916,9 +899,9 @@ int __init acpi_sleep_init(void) ...@@ -916,9 +899,9 @@ int __init acpi_sleep_init(void)
pr_info(PREFIX "(supports%s)\n", supported); pr_info(PREFIX "(supports%s)\n", supported);
/* /*
* Register the sleep_notifier to reboot notifier list so that the _TTS * Register the tts_notifier to reboot notifier list so that the _TTS
* and _PTS object can also be evaluated when the system enters S5. * object can also be evaluated when the system enters S5.
*/ */
register_reboot_notifier(&sleep_notifier); register_reboot_notifier(&tts_notifier);
return 0; return 0;
} }
...@@ -155,6 +155,7 @@ config TANGOX_WATCHDOG ...@@ -155,6 +155,7 @@ config TANGOX_WATCHDOG
config WDAT_WDT config WDAT_WDT
tristate "ACPI Watchdog Action Table (WDAT)" tristate "ACPI Watchdog Action Table (WDAT)"
depends on ACPI depends on ACPI
select WATCHDOG_CORE
select ACPI_WATCHDOG select ACPI_WATCHDOG
help help
This driver adds support for systems with ACPI Watchdog Action This driver adds support for systems with ACPI Watchdog Action
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册