summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki@gmail.com>2022-04-03 15:23:22 +0900
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-04-04 20:51:15 +0200
commitdfbba2518aac4204203b0697a894d3b2f80134d3 (patch)
treed8d48c89b5ad08cbb73171de1d36477eda4841f2 /drivers/acpi
parent3123109284176b1532874591f7c81f3837bbdc17 (diff)
downloadlinux-rpi-dfbba2518aac4204203b0697a894d3b2f80134d3.tar.gz
linux-rpi-dfbba2518aac4204203b0697a894d3b2f80134d3.tar.bz2
linux-rpi-dfbba2518aac4204203b0697a894d3b2f80134d3.zip
Revert "ACPI: processor: idle: Only flush cache on entering C3"
Revert commit 87ebbb8c612b ("ACPI: processor: idle: Only flush cache on entering C3") that broke the assumptions of the acpi_idle_play_dead() callers. Namely, the CPU cache must always be flushed in acpi_idle_play_dead(), regardless of the target C-state that is going to be requested, because this is likely to be part of a CPU offline procedure or preparation for entering a system-wide sleep state and the lack of synchronization between the CPU cache and RAM may lead to problems going forward, for example when the CPU is brought back online. In particular, it breaks resume from suspend-to-RAM on Lenovo ThinkPad C13 which fails occasionally until the problematic commit is reverted. Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/processor_idle.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 32b20efff5f8..4556c86c3465 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) {