Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "ACPI: scan: Release PM resources blocked by unused objects"

Revert commit c10383e8ddf4 ("ACPI: scan: Release PM resources blocked
by unused objects"), because it causes boot issues to appear on some
platforms.

Reported-by: Kyle D. Pelton <kyle.d.pelton@intel.com>
Reported-by: Saranya Gopal <saranya.gopal@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

-32
-25
drivers/acpi/glue.c
··· 347 347 348 348 acpi_unbind_one(dev); 349 349 } 350 - 351 - int acpi_dev_turn_off_if_unused(struct device *dev, void *not_used) 352 - { 353 - struct acpi_device *adev = to_acpi_device(dev); 354 - 355 - /* 356 - * Skip device objects with device IDs, because they may be in use even 357 - * if they are not companions of any physical device objects. 358 - */ 359 - if (adev->pnp.type.hardware_id) 360 - return 0; 361 - 362 - mutex_lock(&adev->physical_node_lock); 363 - 364 - /* 365 - * Device objects without device IDs are not in use if they have no 366 - * corresponding physical device objects. 367 - */ 368 - if (list_empty(&adev->physical_node_list)) 369 - acpi_device_set_power(adev, ACPI_STATE_D3_COLD); 370 - 371 - mutex_unlock(&adev->physical_node_lock); 372 - 373 - return 0; 374 - }
-1
drivers/acpi/internal.h
··· 117 117 bool acpi_device_is_first_physical_node(struct acpi_device *adev, 118 118 const struct device *dev); 119 119 int acpi_bus_register_early_device(int type); 120 - int acpi_dev_turn_off_if_unused(struct device *dev, void *not_used); 121 120 122 121 /* -------------------------------------------------------------------------- 123 122 Device Matching and Notification
-6
drivers/acpi/scan.c
··· 2564 2564 } 2565 2565 } 2566 2566 2567 - /* 2568 - * Make sure that power management resources are not blocked by ACPI 2569 - * device objects with no users. 2570 - */ 2571 - bus_for_each_dev(&acpi_bus_type, NULL, NULL, acpi_dev_turn_off_if_unused); 2572 - 2573 2567 acpi_turn_off_unused_power_resources(); 2574 2568 2575 2569 acpi_scan_initialized = true;