ACPI fixes for 5.14-rc7

- Prevent confusing messages from being printed if the PRMT table
    is not present or there are no PRM modules (Aubrey Li).
 
  - Fix the handling of suspend-to-idle entry and exit in the case
    when the Microsoft UUID is used with the Low-Power S0 Idle _DSM
    interface (Mario Limonciello).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmEgAlESHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxqtUP/17Ij8yvXGV2INb2S744FyLgvjk0FdgZ
 xcRhqEdYdPVqaZ75myTo+pSl7uArusO5HrKG4nRx7ATWovpb6+xK9H+ZmxyZfDkx
 Y1tb4kM3ms17JOFs8KGFtcQA9V+qJZPK7JRXGaVw9rh1B7fAf/8T/gKH2/9Yh2hn
 F0QrZUo0ihvcRBGeznoT/LxHy4hs5NEaEKf4AUcwdkOFPl/T+HspUESXY9SgVK4p
 jKdumPe9ws/GukiLsRFNMPCj73W4Ejab7E4JqCWfvFyAkDih0Ud9MPNpdCb2nxhl
 XJb1TGkXuW7PR2K+lgJBWTgRUmf4K/AbH3v7dR0B33PQfQru+BP9X6x8dDBn47Uu
 Etpoxoh8is+AQ66x3yc8P4dWH297/zF9XkYGr5S9y73QJFs9+UKDTpZNIEKrRllF
 sHCAueZmj45f3vjJeoNBzbOg6cu/TPNqPizGUphQU4t6SMEbCMU8sAlq12lLCM+4
 doQDq7nS4x2hYpDSsR8m+61TNdzclsa64L2AZGUuwzFht2EqHt+aKpzv3cVS3rES
 M8Q1w3ViTmOEKp4SlfRNaFh0NUDT7/kH+i7UzwFMqvny/CVbW0LX50RCois+bYMQ
 3wUUCOMwGgmdIe+/LkiFV+deKcETR2bsFPbIdmvzjqCU5AhQRS8ihwKeZk5ozjnM
 Ae70TtKyM1R7
 =GBtH
 -----END PGP SIGNATURE-----

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

Pull ACPI fixes from Rafael Wysocki:
 "These fix two mistakes in new code.

  Specifics:

   - Prevent confusing messages from being printed if the PRMT table is
     not present or there are no PRM modules (Aubrey Li).

   - Fix the handling of suspend-to-idle entry and exit in the case when
     the Microsoft UUID is used with the Low-Power S0 Idle _DSM
     interface (Mario Limonciello)"

* tag 'acpi-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: PM: s2idle: Invert Microsoft UUID entry and exit
  ACPI: PRM: Deal with table not present or no module found
This commit is contained in:
Linus Torvalds 2021-08-20 13:44:25 -07:00
commit fa54d366a6
2 changed files with 8 additions and 2 deletions

View File

@ -292,6 +292,12 @@ void __init init_prmt(void)
int mc = acpi_table_parse_entries(ACPI_SIG_PRMT, sizeof(struct acpi_table_prmt) +
sizeof (struct acpi_table_prmt_header),
0, acpi_parse_prmt, 0);
/*
* Return immediately if PRMT table is not present or no PRM module found.
*/
if (mc <= 0)
return;
pr_info("PRM: found %u modules\n", mc);
status = acpi_install_address_space_handler(ACPI_ROOT_OBJECT,

View File

@ -452,7 +452,7 @@ int acpi_s2idle_prepare_late(void)
if (lps0_dsm_func_mask_microsoft > 0) {
acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF,
lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft);
acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_EXIT,
acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_ENTRY,
lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft);
acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY,
lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft);
@ -479,7 +479,7 @@ void acpi_s2idle_restore_early(void)
if (lps0_dsm_func_mask_microsoft > 0) {
acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT,
lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft);
acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_ENTRY,
acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_EXIT,
lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft);
acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON,
lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft);