ACPI updates for 5.18-rc2

- Revert an ACPI processor driver change related to cache
    invalidation in acpi_idle_play_dead() that clearly was a mistake
    and introduced user-visible regressions (Akihiko Odaki).
 
  - Replace the last instance of acpi_bus_get_device() added during
    the recent merge window and drop the function to prevent more
    users of it from being added (Rafael Wysocki).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmJQeO0SHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxA+oP/0TG/FWT/3V3IkH0tpQuGkKjMbbzEJ2G
 VzzI4PeFcU9jqkzoxm2r5MR+b0L/3mLviUXwE6WtXozPA8SR9NC54Mtj0UKbqING
 11re1xU64xhN+XRpLf2/q7HDq4xk4Nrb2NPFLSV7MGHEp8Loc/iY67F2P4A4KnX4
 2zgZrmxt6Lr99gfdqNqnFkeXHlE8cZa+uedUgeynew+YLPBIJe2L2Trw0kJCCKGg
 oRv1R0d3zDBpWjzIgpTlH2T5FyE1IvCQOjUsSWX+pH2PVEFQsU9YDr8oRXogayy2
 +kUu9K8pTWDTRbi91sEppo/KEUm2cnCeyMFKw7iOYBHrHA6lZBxM1LMk35HWLlTw
 NiHzXTtwXdyyaMe8suNwL0KQX9tV2itUVpBLY/A19Fl/4g+8eyzbxY2tLZBkdHMk
 JGLEI64j+U3djozzXi0kd0RZq0WvC8rv6zaA8N7FqymkUlIQj71uxCRhB1wExurS
 SMbDjhEJdGohjPg7XXGQaGYw3pTV3n6HMSuOJGFv/2RXP60FbWagIu7aCFT+3c4N
 5TdWVCnk/PrHUuFvlJDvtiKV5w6tvRfwhMks1rZqPRGO5GPtNw6YHLPrFuDNprcO
 7f0FRkRJQW0305lI/lOIqutlhc6g+KPeOPJV/qRMh1dMn4VV94mbuVaJqjpBKBIN
 kn9YZG42UCd2
 =BX8R
 -----END PGP SIGNATURE-----

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

Pull ACPI updates from Rafael Wysocki:
 "These revert a problematic commit from the 5.17 development cycle and
  finalize the elimination of acpi_bus_get_device() that mostly took
  place during the recent merge window.

  Specifics:

   - Revert an ACPI processor driver change related to cache
     invalidation in acpi_idle_play_dead() that clearly was a mistake
     and introduced user-visible regressions (Akihiko Odaki).

   - Replace the last instance of acpi_bus_get_device() added during the
     recent merge window and drop the function to prevent more users of
     it from being added (Rafael Wysocki)"

* tag 'acpi-5.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: bus: Eliminate acpi_bus_get_device()
  Revert "ACPI: processor: idle: Only flush cache on entering C3"
This commit is contained in:
Linus Torvalds 2022-04-08 18:23:02 -10:00
commit d017a3167b
4 changed files with 3 additions and 17 deletions

View File

@ -570,8 +570,7 @@ static int acpi_idle_play_dead(struct cpuidle_device *dev, int index)
{
struct acpi_processor_cx *cx = per_cpu(acpi_cstate[index], dev->cpu);
if (cx->type == ACPI_STATE_C3)
ACPI_FLUSH_CPU_CACHE();
ACPI_FLUSH_CPU_CACHE();
while (1) {

View File

@ -588,19 +588,6 @@ static struct acpi_device *handle_to_device(acpi_handle handle,
return adev;
}
int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device)
{
if (!device)
return -EINVAL;
*device = handle_to_device(handle, NULL);
if (!*device)
return -ENODEV;
return 0;
}
EXPORT_SYMBOL(acpi_bus_get_device);
/**
* acpi_fetch_acpi_dev - Retrieve ACPI device object.
* @handle: ACPI handle associated with the requested ACPI device object.

View File

@ -2410,7 +2410,8 @@ static int acpi_spi_add_resource(struct acpi_resource *ares, void *data)
} else {
struct acpi_device *adev;
if (acpi_bus_get_device(parent_handle, &adev))
adev = acpi_fetch_acpi_dev(parent_handle);
if (!adev)
return -ENODEV;
ctlr = acpi_spi_find_controller_by_adev(adev);

View File

@ -509,7 +509,6 @@ extern int unregister_acpi_notifier(struct notifier_block *);
* External Functions
*/
int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device);
struct acpi_device *acpi_fetch_acpi_dev(acpi_handle handle);
acpi_status acpi_bus_get_status_handle(acpi_handle handle,
unsigned long long *sta);