summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/processor_idle.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2020-09-15 12:31:59 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-09-16 19:36:25 +0200
commita889a23a98fee183c9b6b0b14b2fd70583429c5e (patch)
tree0fb646b22408d9cec184dc49aa29f89cffef5826 /drivers/acpi/processor_idle.c
parentaa6b43d57f995f6eec0e9e744dcb200e09ecb8e0 (diff)
downloadlinux-a889a23a98fee183c9b6b0b14b2fd70583429c5e.tar.bz2
ACPI: processor: Use CPUIDLE_FLAG_TLB_FLUSHED
Make acpi_processor_idle() use the generic TLB flushing code. This again removes RCU usage after rcu_idle_enter(). (XXX make every C3 invalidate TLBs, not just C3-BM) Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Borislav Petkov <bp@suse.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/processor_idle.c')
-rw-r--r--drivers/acpi/processor_idle.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 01ea986b6197..9ec504067f98 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -564,8 +564,6 @@ static DEFINE_RAW_SPINLOCK(c3_lock);
static void acpi_idle_enter_bm(struct acpi_processor *pr,
struct acpi_processor_cx *cx)
{
- acpi_unlazy_tlb(smp_processor_id());
-
/*
* disable bus master
* bm_check implies we need ARB_DIS
@@ -665,6 +663,7 @@ static int acpi_processor_setup_cpuidle_cx(struct acpi_processor *pr,
max_cstate = 1;
for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) {
+ state = &acpi_idle_driver.states[count];
cx = &pr->power.states[i];
if (!cx->valid)
@@ -672,10 +671,11 @@ static int acpi_processor_setup_cpuidle_cx(struct acpi_processor *pr,
per_cpu(acpi_cstate[count], dev->cpu) = cx;
- if (lapic_timer_needs_broadcast(pr, cx)) {
- state = &acpi_idle_driver.states[count];
+ if (lapic_timer_needs_broadcast(pr, cx))
state->flags |= CPUIDLE_FLAG_TIMER_STOP;
- }
+
+ if (cx->type == ACPI_STATE_C3)
+ state->flags |= CPUIDLE_FLAG_TLB_FLUSHED;
count++;
if (count == CPUIDLE_STATE_MAX)