Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2476104imj; Mon, 11 Feb 2019 03:35:39 -0800 (PST) X-Google-Smtp-Source: AHgI3IbdedBSIzE8TGWdBQtUndnHpfON8h+JDpUE2zKQPewblB8kM3q1nXpRACSa8K52gmpqp6od X-Received: by 2002:a17:902:b697:: with SMTP id c23mr7232909pls.23.1549884939614; Mon, 11 Feb 2019 03:35:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549884939; cv=none; d=google.com; s=arc-20160816; b=Or3hdtkZHOuVhsYbvc4QFYs6gFoN+uLqDIyE1BsRvnwbPsST7VF795R5GJ1pIYAGpf wYW6/VGppoxBDb8nCcoqCKrzVz59X6acevmmQKrOlf55M6dNg/wNRl0UnMAWh0lUQti0 63nOrwtvKRtcXgefYc2URQg0rqnLlQplFAuNo7cJ5Dexn5otitunzhRWuEgM6TxAvHbq oMvg6w10QGtakJRoTYopx+LwpdJdlHmX4rqzI7BM5IafJXXjmzWfaYuoeL3rQF7+L2Sr va7QQygl1mFpfoUusSpygSLdHYCCj2aGGK0lfC0GP1OLJWo97iZqYO056iTG+9+kiGpQ DtjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=tZHM7+rLTmXHl6qUUR3voaPwyqlFBHoe0W+qn/KqtoQ=; b=cDVivGt12qZBsqCvVsUrHCIhrcoSWSm2+Q0bBU0re0JwTVChDW+3awPhodivQrYP9c lo+D988gm0gbu3gVxDwEZCeGdOf3qfjLSmdK92MLwrFSfkr5/KuYMblLyd9frHu58Sx+ JS/oNFskqR2tUk3lI6BYW7Z4sZTwv0j1BgxwCwGPyGzVnQxDZbCllL4HJcZiAsxnFBhn TtlbroduLy8Xkz7V7jRWZ36a9jtUgx263ms/4JRMhLopaQ05g23JIpxEsKcPoEePWuo+ OGrHFgoDQqweDsTBI5CYUsWwxIfLLefonnVZKsiC4CjdsDUiJy4A5kDleet/VLvfepi5 41jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KP77AmPT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a132si2885091pfa.112.2019.02.11.03.35.23; Mon, 11 Feb 2019 03:35:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KP77AmPT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726864AbfBKLfN (ORCPT + 99 others); Mon, 11 Feb 2019 06:35:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:47824 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726041AbfBKLfN (ORCPT ); Mon, 11 Feb 2019 06:35:13 -0500 Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1C6C3217D9; Mon, 11 Feb 2019 11:35:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549884912; bh=tZHM7+rLTmXHl6qUUR3voaPwyqlFBHoe0W+qn/KqtoQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=KP77AmPTUs/uWr/de90sN79Pmt6EnSgp//FnSD9WotPrsN9u9UY3TUBDdZmsDgrRH Fq0bBsAJNzw+WzFXnptjWKXJJF2d1+sLcY+FHwzp7gfnpti+vHV/wxRJ/uO4BKYjFo kLz8SqYNvx7TMqpZ02eKb2fdq0IRCk50gRQIQlUQ= Received: by mail-lj1-f181.google.com with SMTP id x25-v6so4808207ljj.13; Mon, 11 Feb 2019 03:35:12 -0800 (PST) X-Gm-Message-State: AHQUAuaB7EIFbgXMH7lg4ymXTxfWZ+uYNFNekk8P5B+vOb/JktuwwJVj PFkeH+Tw1hmKK1JM+VCYljanO5SOf6AhAiZDoFc= X-Received: by 2002:a2e:890b:: with SMTP id d11-v6mr23037595lji.113.1549884910274; Mon, 11 Feb 2019 03:35:10 -0800 (PST) MIME-Version: 1.0 References: <20190210225114.20110-1-stuart.menefy@mathembedded.com> In-Reply-To: From: Krzysztof Kozlowski Date: Mon, 11 Feb 2019 12:34:58 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/2] Subject: [PATCH 0/2] clocksource: exynos_mct: Clear timer interrupt when shutting down To: Daniel Lezcano Cc: Marek Szyprowski , Stuart Menefy , "linux-samsung-soc@vger.kernel.org" , Thomas Gleixner , Kukjin Kim , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 11 Feb 2019 at 12:23, Daniel Lezcano wrote: > > On 11/02/2019 08:14, Marek Szyprowski wrote: > > Hi Stuart > > > > On 2019-02-10 23:51, Stuart Menefy wrote: > >> When debugging suspend problems on Exynos 5260, I had a large number > >> of debugging prints going to the serial port after interrupts > >> had been disabled but before the timer interrupt was shutdown. This > >> was long enough for a timer tick to occur, but as interrupts were > >> disabled the ISR didn't run, and so the interrupt wasn't cleared. > >> Later when the timer was shutdown the interrupt was left asserted and > >> so the wfi at the heart of the suspend code didn't wait, causing > >> the suspend to fail. > >> > >> Currently the code which stops the timer when it is on one-shot mode > >> and the interrupt occurs is in exynos4_mct_tick_clear(), meaning if we > >> called this from the shutdown code exynos4_mct_tick_stop() could be > >> called twice. So first restructure the existing code, so the check for > >> one-shot mode and stopping the timer is moved to the ISR, leaving > >> exynos4_mct_tick_clear() just clearing the interrupt flag. > >> > >> Once this has been done simply call exynos4_mct_tick_clear() from > >> set_state_shutdown(). > > > > This also fixes mysterious suspend failures on Odroid XU3/XU4/HC1 :) > > > > Tested-by: Marek Szyprowski > > Applied. Shall I add the stable@ tag? Makes sense - for the second patch, although first is a prerequisite. It should be backported up to v4.3 (the code differ a lot on older versions). Best regards, Krzysztof