Skip to content

Commit

Permalink
ACPI: processor: idle: Only flush cache on entering C3
Browse files Browse the repository at this point in the history
According to ACPI 6.4, Section 8.2, CPU cache flushing required on
entering the C3 power state.

Avoid flushing the cache on entering other C-states.

Signed-off-by: Kirill A. Shutemov <[email protected]>
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
kiryl authored and rafaeljw committed Dec 17, 2021
1 parent 0e6078c commit 87ebbb8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,8 @@ static int acpi_idle_play_dead(struct cpuidle_device *dev, int index)
{
struct acpi_processor_cx *cx = per_cpu(acpi_cstate[index], dev->cpu);

ACPI_FLUSH_CPU_CACHE();
if (cx->type == ACPI_STATE_C3)
ACPI_FLUSH_CPU_CACHE();

while (1) {

Expand Down

0 comments on commit 87ebbb8

Please sign in to comment.