From patchwork Sun Feb 10 22:51:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Menefy X-Patchwork-Id: 10804963 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A76E413A4 for ; Sun, 10 Feb 2019 22:51:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9890929BA7 for ; Sun, 10 Feb 2019 22:51:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C32029BA9; Sun, 10 Feb 2019 22:51:34 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,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 38AAC29BA7 for ; Sun, 10 Feb 2019 22:51:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726610AbfBJWvd (ORCPT ); Sun, 10 Feb 2019 17:51:33 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:39164 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726158AbfBJWvU (ORCPT ); Sun, 10 Feb 2019 17:51:20 -0500 Received: by mail-wm1-f68.google.com with SMTP id f16so13423566wmh.4 for ; Sun, 10 Feb 2019 14:51:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mathembedded-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=Pi51Mueiz01jqmURtbglad6f6KeDug2dSwxXoF3nC+o=; b=GGLs5eMpymB8AgB2Gbk2l763hDFn+qpOAaeQC35PF76pG1YUs3lXj4SYM/7R8pR+YI pcP2Ve4OgpjAhK5ADJ9wUqTsRopHf8yAvO4/LLesq1Vmb+hfO/1rRKR0AXaEH0o8dwKJ sdjIwDOTHsd9cNA4tSWVUo7AiKWj+9iCjPPgziyZIgz550QZ1QpXQkZ6TPaxSIHnVfeR 7pPzHgBbcRLGTFnURNpp3meu7CKM8bR3J2KM6dZKd1r44K0AH5z78tIF7sP/604Baea8 jjNuYeTYIthO2WmKSj3PqYnkN+iRpt7IipOrlXnTp4NJe5sqv21I2BanrjZ7yyGfFexk TKzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=Pi51Mueiz01jqmURtbglad6f6KeDug2dSwxXoF3nC+o=; b=EHDliAybTNRXOIMRXKxkhsqG1X+WRdb+YctTQz/1J1i02OnzpwNq6b+l3uMfVI68Xr 4KMag4wC2+I9ZkYp7KoMxbz78neh7l7FGLd6Nr+0VijtbPlBDRiyRoME4fX8gU+fxYUV AqkhaiGRU2BL9GauEPpYhEk3RvTGUwEE6nocxzUgqehMA7Mnex/mSWeAfLs5oqv2dYir ISElfdh5G1EMEqbU8xar4TgTy4/4Hzd5KxtgF/ZrpELmzw5fnHjD5Z3FJN75d7/CUHoo TUs04OYuwRpwvYpO8O2LSuokJgj83oshYWoIFpWzMbNkyuqrye+3wvBWAdeRoQUZiTJk 02oQ== X-Gm-Message-State: AHQUAub7uIqTQsRz1PBbuAxFuhGMS+1mGwxxDxLAGoTXWQMSm/fkGnW5 7ivJschWwlxGBMYD1mghFhUj74c1JiP3Dw== X-Google-Smtp-Source: AHgI3IZMAXENriRqCnD09knJAHnUr2hVcIg8TPURsETLX9fU46ieXCFiVyIKMeaZwlCxnXJjyjuxFA== X-Received: by 2002:a05:6000:10cf:: with SMTP id b15mr24877948wrx.301.1549839077853; Sun, 10 Feb 2019 14:51:17 -0800 (PST) Received: from localhost.localdomain (host86-176-243-198.range86-176.btcentralplus.com. [86.176.243.198]) by smtp.gmail.com with ESMTPSA id c139sm3904325wmd.13.2019.02.10.14.51.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 10 Feb 2019 14:51:17 -0800 (PST) From: Stuart Menefy To: linux-samsung-soc@vger.kernel.org, Daniel Lezcano , Thomas Gleixner , Kukjin Kim , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/2] Subject: [PATCH 0/2] clocksource: exynos_mct: Clear timer interrupt when shutting down Date: Sun, 10 Feb 2019 22:51:12 +0000 Message-Id: <20190210225114.20110-1-stuart.menefy@mathembedded.com> X-Mailer: git-send-email 2.13.6 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(). Stuart Menefy (2): clocksource: exynos_mct: Move one-shot check from tick clear to ISR clocksource: exynos_mct: Clear timer interrupt when shutdown drivers/clocksource/exynos_mct.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) Tested-by: Marek Szyprowski