Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1962677imj; Sun, 10 Feb 2019 14:52:27 -0800 (PST) X-Google-Smtp-Source: AHgI3IZi7fMdFmW4INDGALlDOTtJnbGKLtlZaB3TBp3aQCrWV5Ofdi9q1RuCiDGVINTH0szwso4H X-Received: by 2002:a62:3ac8:: with SMTP id v69mr11624093pfj.150.1549839147730; Sun, 10 Feb 2019 14:52:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549839147; cv=none; d=google.com; s=arc-20160816; b=AKKUCWuo1VGVmTep8uony36JuiOKH+9TF+xt79+311ijhkSARz7UnSxvZYHwjfA8LV b6ukUDCP2aAdxJaAfQglJyhPLfiHbVzmcsQsrenUubLATwVG3zrBJqtNpzOcRlCjforZ 0nvGZEDnPQP377OVtDXWtDcQGj/Hx9E97FFFwcah1YBqEFFmxL4z9ZwanG90KP3t0pRo cH1sKS7+v+mZfU77FhAUAjUB4RXhpaJ6Zi7+bkiTuskkn3PLkNY3Qh1gXmAhlOdt/iu3 Agzu2eFmFptmP7XnWHPAw/hG/KMLX0zogqR1ZGq05u+GONLVeUSkVCrCF1l2vqKgeFUl Hngg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from :dkim-signature; bh=Pi51Mueiz01jqmURtbglad6f6KeDug2dSwxXoF3nC+o=; b=DU57TSsqedlpxa8hQHqHrenfJh2a8sbYmLW+Ljrtl+Y5o6NbHsUf3V7nAkvdUI00RM 7oIiab4oo/SD4g5HuFiNnMlPo1O0Eu4hWb9CJWyRohAKyOlXzZqqEb4NpyEI2jxVK1mW WbxOh4XtoQ1KcIiI/C5nwj+roFF2dfQYb4allbt6KaiPpqciFS4a5wyLWnVXffUTuBAj HGuItPAk92pchqDmAfvtWpINUYY3zeN/emm4/MMMkzjS0BWAbXHhnwNQV/6er4byxnW6 G6EcYP4Mr8vdxuN/iQnSTHNT1bvb5Wu2b38NNbi7JP5FHedKWH84XaoENR8+STsu6uaC 5YfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mathembedded-com.20150623.gappssmtp.com header.s=20150623 header.b=GGLs5eMp; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si7709865pgv.469.2019.02.10.14.52.12; Sun, 10 Feb 2019 14:52:27 -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=@mathembedded-com.20150623.gappssmtp.com header.s=20150623 header.b=GGLs5eMp; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726340AbfBJWvU (ORCPT + 99 others); Sun, 10 Feb 2019 17:51:20 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:36292 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbfBJWvT (ORCPT ); Sun, 10 Feb 2019 17:51:19 -0500 Received: by mail-wm1-f66.google.com with SMTP id p6so13380873wmc.1 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=LPw06rqpHNHFlE3ajsa7JAeMLJPJ9/DYSulP4n+5fdbKE8KEGVWXfnPewRfzXknzDY zoFlZzTwYA3aXugo8+VQ/mwk9Tvo3mpTR4vUGps+DQi6gbTY02DNgVHBpJeKY5K72t7o ZlNTD0++a1e1e0TT6PnEjmh7kQxhNJJVQEoBX3vEZLPDK1RWYq39/+M+FMAZSbKKucsU 32MdwPCTorplgHv99ndMvHdUSTvkhH0DAooqaEbRg5qWrRAgCAeCobo8iCy0E6nGh9G5 I7/Hwbbh2p94b0plVfqQVdn2Dy//s7xLeBej3vs9eq8x4lCA0R+QsEPsllWGy9rF9SJ6 ST6w== X-Gm-Message-State: AHQUAuYOxoY+mZZorfwd+Hk/sWuDPoWAAMGl3SnsHjcSE62OBsmZ/5pX j0G51m2PJoRBm/O84jrFkyKtQg== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.13.6