ACPI fix for 5.16-rc2

Revert tbe change attempting to release PM resources blocked by
 unused ACPI objects after device enumeration, because it caused
 boot issues to appear on multiple systems.
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmGWo/wSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxl/4P/1yAX8MB1tlBF4BjbE7AV4KHQ12YUkXp
 xN4X5sQhPf6TuL6zbsoZFA8J3DVS6RTGtK3sKVWxLYTtMXaPJ9rW5qG911vJTaEO
 4Ptkh0vDtiNyyjMOSuNDo3/CnXfNGzm5qWXtkIgHhFHLRNf0WvCc91J+Au+LuyqI
 eXsR1o45rc2T1RKvD67gXRFH4z6AbmYo/H2UTDphTtMLEeSoeC5XcZQ7KxRJ7D2b
 p5NEIbNpd/QgGP5WPNFx8zKUqOa0qGqVCVMsuZdGxEo94kplEEC+BBuxP4Ek0ZAl
 8oYqPMeWsghhc8iooEj4tarDFK+cPzac8UCT+RFb5NCT4m3aBuLI/l+rS4+PK+UT
 heA3moxrhU16uxdqgmyE/UsI0dm0z1DqxLkYWoE9aP/3MxX2eYNl/TaxcB9qNkCM
 cghVFNVyOf4JGXTQBN5VuwJuBNk+gYzhyw2ZGiVvZIX5KDy8AfIbvMAezEzb11nf
 DQkBh+0fa/9V5w94OZwGRvgRAj/Ua5F6NwuVQ/7KM7wo4IIvPcqhDF3g1vtKk4E+
 MyvFFOIWiKTlXoJvlLDHDclclq6ALZ8FKpeQBLg8eeDZWlrqvrop9ZMiisgkOnva
 wfjtiM+3l67WH6AHeXqoMCMmwOBV8TjxG3pg1pwhyIiIakDBf/c0y3dEZRd4w2BK
 CWyMHDX6RDTx
 =EyNC
 -----END PGP SIGNATURE-----

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

Pull ACPI fix from Rafael Wysocki:
 "Revert the change attempting to release PM resources blocked by unused
  ACPI objects after device enumeration, because it caused boot issues
  to appear on multiple systems"

* tag 'acpi-5.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  Revert "ACPI: scan: Release PM resources blocked by unused objects"
This commit is contained in:
Linus Torvalds 2021-11-18 14:42:36 -08:00
commit 17e1070705
3 changed files with 0 additions and 32 deletions

View File

@ -347,28 +347,3 @@ void acpi_device_notify_remove(struct device *dev)
acpi_unbind_one(dev);
}
int acpi_dev_turn_off_if_unused(struct device *dev, void *not_used)
{
struct acpi_device *adev = to_acpi_device(dev);
/*
* Skip device objects with device IDs, because they may be in use even
* if they are not companions of any physical device objects.
*/
if (adev->pnp.type.hardware_id)
return 0;
mutex_lock(&adev->physical_node_lock);
/*
* Device objects without device IDs are not in use if they have no
* corresponding physical device objects.
*/
if (list_empty(&adev->physical_node_list))
acpi_device_set_power(adev, ACPI_STATE_D3_COLD);
mutex_unlock(&adev->physical_node_lock);
return 0;
}

View File

@ -117,7 +117,6 @@ bool acpi_device_is_battery(struct acpi_device *adev);
bool acpi_device_is_first_physical_node(struct acpi_device *adev,
const struct device *dev);
int acpi_bus_register_early_device(int type);
int acpi_dev_turn_off_if_unused(struct device *dev, void *not_used);
/* --------------------------------------------------------------------------
Device Matching and Notification

View File

@ -2564,12 +2564,6 @@ int __init acpi_scan_init(void)
}
}
/*
* Make sure that power management resources are not blocked by ACPI
* device objects with no users.
*/
bus_for_each_dev(&acpi_bus_type, NULL, NULL, acpi_dev_turn_off_if_unused);
acpi_turn_off_unused_power_resources();
acpi_scan_initialized = true;