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"
Unified · Split
| @@ -570,8 +570,7 @@ static int acpi_idle_play_dead(struct cpuidle_device *dev, int index) · 569 unmodified lines | ||
| 570 | 570 | { |
| 571 | 571 | struct acpi_processor_cx *cx = per_cpu(acpi_cstate[index], dev->cpu); |
| 572 | 572 | |
| 573 | − if (cx->type == ACPI_STATE_C3) | |
| 574 | − ACPI_FLUSH_CPU_CACHE(); | |
| 573 | + ACPI_FLUSH_CPU_CACHE(); | |
| 575 | 574 | |
| 576 | 575 | while (1) { |
| 577 | 576 | |
| @@ -588,19 +588,6 @@ static struct acpi_device *handle_to_device(acpi_handle handle, · 587 unmodified lines | ||
| 588 | 588 | return adev; |
| 589 | 589 | } |
| 590 | 590 | |
| 591 | −int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device) | |
| 592 | −{ | |
| 593 | − if (!device) | |
| 594 | − return -EINVAL; | |
| 595 | − | |
| 596 | − *device = handle_to_device(handle, NULL); | |
| 597 | − if (!*device) | |
| 598 | − return -ENODEV; | |
| 599 | − | |
| 600 | − return 0; | |
| 601 | −} | |
| 602 | −EXPORT_SYMBOL(acpi_bus_get_device); | |
| 603 | − | |
| 604 | 591 | /** |
| 605 | 592 | * acpi_fetch_acpi_dev - Retrieve ACPI device object. |
| 606 | 593 | * @handle: ACPI handle associated with the requested ACPI device object. |
| @@ -2410,7 +2410,8 @@ static int acpi_spi_add_resource(struct acpi_resource *ares, void *data) · 2409 unmodified lines | ||
| 2410 | 2410 | } else { |
| 2411 | 2411 | struct acpi_device *adev; |
| 2412 | 2412 | |
| 2413 | − if (acpi_bus_get_device(parent_handle, &adev)) | |
| 2413 | + adev = acpi_fetch_acpi_dev(parent_handle); | |
| 2414 | + if (!adev) | |
| 2414 | 2415 | return -ENODEV; |
| 2415 | 2416 | |
| 2416 | 2417 | ctlr = acpi_spi_find_controller_by_adev(adev); |
| @@ -509,7 +509,6 @@ extern int unregister_acpi_notifier(struct notifier_block *); · 508 unmodified lines | ||
| 509 | 509 | * External Functions |
| 510 | 510 | */ |
| 511 | 511 | |
| 512 | −int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device); | |
| 513 | 512 | struct acpi_device *acpi_fetch_acpi_dev(acpi_handle handle); |
| 514 | 513 | acpi_status acpi_bus_get_status_handle(acpi_handle handle, |
| 515 | 514 | unsigned long long *sta); |