From 46a5d61d7cd1c951424c9e38684c359eca87d0f6 Mon Sep 17 00:00:00 2001 From: Raghavendra Kakarla Date: Thu, 9 Jan 2020 19:09:13 +0530 Subject: [PATCH] drivers: lpm-levels: Use cpu_do_idle for shallower LPM entry dsb should be invoked before wfi instruction without which core can get stuck or do not respond to IPIs. Use cpu_do_idle that invokes both dsb and wfi instructions for shallower mode entry. Change-Id: I2e9d2317048781590a626a0b3d93f23bbf9eb496 Signed-off-by: Raghavendra Kakarla --- drivers/cpuidle/lpm-levels.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cpuidle/lpm-levels.c b/drivers/cpuidle/lpm-levels.c index ef7676f41313..6d024e4f7188 100644 --- a/drivers/cpuidle/lpm-levels.c +++ b/drivers/cpuidle/lpm-levels.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only -/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. * Copyright (C) 2006-2007 Adam Belay * Copyright (C) 2009 Intel Corporation */ @@ -1118,7 +1118,7 @@ static bool psci_enter_sleep(struct lpm_cpu *cpu, int idx, bool from_idle) if (!idx) { stop_critical_timings(); - wfi(); + cpu_do_idle(); start_critical_timings(); return true; }