Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1124052pxx; Tue, 27 Oct 2020 08:48:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDLMIVld5Fu6fSlMKr3TFbrLviBu7ML58oI3tXgZ8yzlXr1VI8HkjsG/Ax9oMlgKUBAekn X-Received: by 2002:a17:906:4155:: with SMTP id l21mr3158582ejk.204.1603813689194; Tue, 27 Oct 2020 08:48:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603813689; cv=none; d=google.com; s=arc-20160816; b=jpGovZuBmEC1dHnNsi5tYNDVI3yxwQ2XXkHzw4hcOR/BmvYywNTD6TxiM2dv1ihPqy r7+lRM6uiSQRAUyccGXRzPGDdBqhkq0E7TvZXkkEXjWfsoPKylpWrxBrVZ4jO8VrL4A5 tMXxqe94RiiJEzgYJnQoLudwoJ8g0e4Dscc9g+gNR6ni+QN+8/F1vpaKe6iAPPM/X7dj r0vp1SZiZeqHqE8tpWFddBFOWZ3+HGI1UeLQl4MfZAL9R9T/BfCCvPQ5jjcihX44sThC cQwDpGAezHMU0OsOfkUi+louyGEvApSP46UuQZeuA9qndZrfQ/ArTIyfOBSXJNXe14ne dLfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hcuRCeWY+/sQS0URBCUs7ecpNsvmj5aszYMK797n+uE=; b=bxFx1kuS7bphzAgErUCK2cTN4oRB4t229fXxaUhhCywD5xM7W+Vq2a+guwxYMCizLB wTTBDXfcWUDJMErbwUiwNbqSMdHRStIJGW2/5Ib+APqRTz51jVvNZ4c4bwgHesA/kEyn IS1xMkuFK8KE7WgKA8PXAsbv7dQNRfHefaOULDJAYPS30Q6OouFCuQS8J+2NjYRUpn5k 5MLVdkwUduSpT7y4zhmvJW0MzWSz2akGFIZq+2FPgGnMJMWZi5Ez5H4WNG8o9rEHByW0 By8d7kdwx9c99NHuvTXGss8qRvtSujnFDuM3jmZtjvq5oV0oZaIALPuWh83sw/tzFkxu Sokw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nteua5pI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cz24si1152483edb.518.2020.10.27.08.47.45; Tue, 27 Oct 2020 08:48:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nteua5pI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1744249AbgJ0Oog (ORCPT + 99 others); Tue, 27 Oct 2020 10:44:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:42918 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762518AbgJ0OnO (ORCPT ); Tue, 27 Oct 2020 10:43:14 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 109D5206B2; Tue, 27 Oct 2020 14:43:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603809790; bh=uZxgvXsTuZEVeZJFJRaqPTQhvh18DilCfGbVejeewDM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nteua5pIj2NeEYUCcTtqFZoYPeNVcawJu1Jeb6KJe1d3GwMYpE75XEmcOKobHihYO h8hhFGWNqtqgtGSFv4YKdXjqdbYZeuwe8xt1ITMUlxOecgWzoIW6mv1uC2fDOcKoYA BLZ2jy93gHYlaj3auXHRA7jBqb82DIyos633d0z4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tony Lindgren , Sasha Levin Subject: [PATCH 5.4 313/408] ARM: OMAP2+: Restore MPU power domain if cpu_cluster_pm_enter() fails Date: Tue, 27 Oct 2020 14:54:11 +0100 Message-Id: <20201027135509.551134946@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tony Lindgren [ Upstream commit 8f04aea048d56f3e39a7e543939450246542a6fc ] If cpu_cluster_pm_enter() fails, we need to set MPU power domain back to enabled to prevent the next WFI from potentially triggering an undesired MPU power domain state change. We already do this for omap_enter_idle_smp() but are missing it for omap_enter_idle_coupled(). Fixes: 55be2f50336f ("ARM: OMAP2+: Handle errors for cpu_pm") Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin --- arch/arm/mach-omap2/cpuidle44xx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c index 6f5f89711f256..a92d277f81a08 100644 --- a/arch/arm/mach-omap2/cpuidle44xx.c +++ b/arch/arm/mach-omap2/cpuidle44xx.c @@ -174,8 +174,10 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev, */ if (mpuss_can_lose_context) { error = cpu_cluster_pm_enter(); - if (error) + if (error) { + omap_set_pwrdm_state(mpu_pd, PWRDM_POWER_ON); goto cpu_cluster_pm_out; + } } } -- 2.25.1