[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220403062322.3168-1-akihiko.odaki@gmail.com>
Date: Sun, 3 Apr 2022 15:23:22 +0900
From: Akihiko Odaki <akihiko.odaki@...il.com>
To: unlisted-recipients:; (no To-header on input)
Cc: "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
ak@...ux.intel.com, bp@...en8.de, dan.j.williams@...el.com,
dave.hansen@...ux.intel.com, hpa@...or.com, knsathya@...nel.org,
linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
mingo@...hat.com, rjw@...ysocki.net,
sathyanarayanan.kuppuswamy@...ux.intel.com, tglx@...utronix.de,
tony.luck@...el.com, x86@...nel.org,
Akihiko Odaki <akihiko.odaki@...il.com>
Subject: [PATCH] Revert "ACPI: processor: idle: Only flush cache on entering C3"
This reverts commit 87ebbb8c612b1214f227ebb8f25442c6d163e802.
ACPI processor power states can be transitioned in two distinct
situations: 1. when CPU goes idle and 2. before CPU goes offline
("playing dead") to suspend or hibernate. Case 1 is handled by
acpi_idle_enter or acpi_idle_enter_s2idle. Case 2 is handled by
acpi_idle_play_dead.
It is necessary to flush CPU caches in case 2 even if it is not
required to transit ACPI processor power states as CPU will go
offline soon. However, the reverted commit incorrectly removed CPU
cache flushing in such a condition. In fact, it made resuming from
suspend-to-RAM occasionally fail on Lenovo ThinkPad C13 Yoga.
Signed-off-by: Akihiko Odaki <akihiko.odaki@...il.com>
---
drivers/acpi/processor_idle.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index f8e9fa82cb9b..05b3985a1984 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -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) {
--
2.35.1
Powered by blists - more mailing lists