From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D460C9DD54 for ; Tue, 27 Oct 2020 15:43:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1F19F22400 for ; Tue, 27 Oct 2020 15:43:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603813437; bh=uZxgvXsTuZEVeZJFJRaqPTQhvh18DilCfGbVejeewDM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=km9VlmTBV6Vz2O0K6DvsYj/D5Oqbm8WU1gkiJfdBHSny83wVkP0beruLbkEOwkdA9 4k9XwSo2UyoQ5SPb+PfkXyXy0+fYjiB7UdwAqz+oqJ0p20NWWHVzsZRXPbR+P/F1/k Fhrw4bxr7AOp3VGr2jpOS4qiXp6AwWjQBo2JxCqk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1795483AbgJ0PPO (ORCPT ); Tue, 27 Oct 2020 11:15:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:47076 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756863AbgJ0PLQ (ORCPT ); Tue, 27 Oct 2020 11:11:16 -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 D8DCA21D24; Tue, 27 Oct 2020 15:11:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603811476; bh=uZxgvXsTuZEVeZJFJRaqPTQhvh18DilCfGbVejeewDM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ql6yFgAPKYB/nk7Hi3poHn2+TSdVWkNJQsTrAO6lFGMp1A0qPlpEhDOTtuTWTtELu LCTrD6USeSr3ZVkMDywV/K7N40H5+Tc8u9sd7x5J0w1ui+IkHXNqgeH7WBdNi0iOnc IyVC5D8CA1ZNGlI86uYaRTyR8eM31aiNZ92kOy0I= 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.8 506/633] ARM: OMAP2+: Restore MPU power domain if cpu_cluster_pm_enter() fails Date: Tue, 27 Oct 2020 14:54:09 +0100 Message-Id: <20201027135546.467504506@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@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