From patchwork Wed Feb 7 01:41:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derek Basehore X-Patchwork-Id: 10204417 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8F4FA60327 for ; Wed, 7 Feb 2018 01:41:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8040328D58 for ; Wed, 7 Feb 2018 01:41:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7463E28D85; Wed, 7 Feb 2018 01:41:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0923328D58 for ; Wed, 7 Feb 2018 01:41:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932278AbeBGBl2 (ORCPT ); Tue, 6 Feb 2018 20:41:28 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:38464 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932226AbeBGBl0 (ORCPT ); Tue, 6 Feb 2018 20:41:26 -0500 Received: by mail-pg0-f67.google.com with SMTP id l18so1876394pgc.5 for ; Tue, 06 Feb 2018 17:41:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bXrIQAeaBj8ZTh2/1PI5C5HpC8c5NeqH4Hd9pU7SKRg=; b=Q1RiaqJ1hOXbKQ51UWYmI1M717RbDgOsHmS6n1xgKt2YYZiZWBe875z6pcEO2YFD2L frckQRd6hIewAKtj+unLJ1XAoYXmzqrcRAN22m4hAfApPjHTYYibEmWQmA3UOIklv1XG qu3GSm3IBZqDl76zuLoFbe1sRMeoL3RuxZ2JA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bXrIQAeaBj8ZTh2/1PI5C5HpC8c5NeqH4Hd9pU7SKRg=; b=DDarUNr5+BulF9tAU8VPKGnK9rTC0H34C1qqdeqSzS1I1Rc1hy3FP2x6DDgWoFnlJl Aigb91zeT4t1kq2Xwn39a+MLlwzWSLEFGc4sfZxTO+rkrURI7sNeg198dUFRAlr+eCx5 ND1vXd3EPIfJVlS4r3lF4oHSGrt6WRckRlOjBjSHGXOKkLQcnKhCOT4ATlNZpQ145Kal WySLDjGVrajFpoohUmIE22GOwLcBQvV/RdkxTozshWYZwoBvySTHjdxyBuzb37m5kbTH EAIROJJ8hRG1m3NbkKNuCgUt0DOxqwBlwWd1gXlEyOqfPDtHjuTG8ldghpu5XDj8j845 MfOQ== X-Gm-Message-State: APf1xPAcscW7MrBU0VnvZhDhxZXWdOFxJZLS4TVBPG3ohkDVJsr8h1DB zqKo7DODruMD/GlgqYtT1ez1XV++z/4= X-Google-Smtp-Source: AH8x227cB3ytF3jTKSrl60ggN2dNRVHGoL5TjMELMhwIQqkaJIJQfaQ6Pxw/3DwnIpodjQog/1ZGDg== X-Received: by 10.101.81.197 with SMTP id i5mr3489062pgq.220.1517967686515; Tue, 06 Feb 2018 17:41:26 -0800 (PST) Received: from exogeni.mtv.corp.google.com ([2620:0:1000:1600:211e:5908:95bc:4888]) by smtp.gmail.com with ESMTPSA id k71sm573529pfg.52.2018.02.06.17.41.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Feb 2018 17:41:25 -0800 (PST) From: Derek Basehore To: linux-kernel@vger.kernel.org Cc: Soby.Mathew@arm.com, sudeep.holla@arm.com, devicetree@vger.kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, linux-pm@vger.kernel.org, rafael.j.wysocki@intel.com, tglx@linutronix.de, briannorris@chromium.org, marc.zyngier@arm.com, Derek Basehore Subject: [PATCH v5 1/4] cpu_pm: add syscore_suspend error handling Date: Tue, 6 Feb 2018 17:41:14 -0800 Message-Id: <20180207014117.62611-2-dbasehore@chromium.org> X-Mailer: git-send-email 2.16.0.rc1.238.g530d649a79-goog In-Reply-To: <20180207014117.62611-1-dbasehore@chromium.org> References: <20180207014117.62611-1-dbasehore@chromium.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If cpu_cluster_pm_enter() fails, cpu_pm_exit() should be called. This will put the CPU in the correct state to resume from the failure. Signed-off-by: Derek Basehore --- kernel/cpu_pm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/cpu_pm.c b/kernel/cpu_pm.c index 67b02e138a47..03bcc0751a51 100644 --- a/kernel/cpu_pm.c +++ b/kernel/cpu_pm.c @@ -186,6 +186,9 @@ static int cpu_pm_suspend(void) return ret; ret = cpu_cluster_pm_enter(); + if (ret) + cpu_pm_exit(); + return ret; }