From patchwork Thu Mar 27 23:30:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 27240 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 10F2F20062 for ; Thu, 27 Mar 2014 23:31:11 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id i7sf15501541oag.0 for ; Thu, 27 Mar 2014 16:31:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=0QV0PhQxbIzL782ZHBpjp953WdweEEkmFLJFpS0HXUI=; b=gus/PxGvS9GRkvRlhxID9SdzdxxY16FACr7lATTqlmVM5Z5qbpekUiZyqZ89qWA02H d9c5hsiOl1CZU3ySo5xs6khM+wQwVYUHxiYZcjOCG2NGW/i52viORo2TvO8p3ljhdiDg CZAyJV/Jrv12ZboBdj140vbzjDb0t4Mj3w+rh3lNDLWc+ahHaUIZykQEFaTnCAuSMRU0 +e0I2ZL4RYhP3zrRGtKpE3bvznsmqF8z2T9JM9EoTYpcmStH01BvDyvIJB/9fswAE29A jVNUqqVjQl149LwKpftjsNqhXisSFbvc2O97QwhOEmr8Y6feoTX1mxK3c0um7CC/DnOV R72w== X-Gm-Message-State: ALoCoQmtcrptg8Kic1D2NhKfiB4Pet6gAMngE0KucO3h1yZQYcy1Hc0BgAT/gp/JndFEFUoktKak X-Received: by 10.182.153.68 with SMTP id ve4mr1916132obb.39.1395963071235; Thu, 27 Mar 2014 16:31:11 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.98.34 with SMTP id n31ls35747qge.28.gmail; Thu, 27 Mar 2014 16:31:11 -0700 (PDT) X-Received: by 10.58.57.67 with SMTP id g3mr3902592veq.3.1395963071162; Thu, 27 Mar 2014 16:31:11 -0700 (PDT) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id sc7si916646vdc.211.2014.03.27.16.31.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Mar 2014 16:31:11 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.174; Received: by mail-ve0-f174.google.com with SMTP id oz11so4880133veb.19 for ; Thu, 27 Mar 2014 16:31:11 -0700 (PDT) X-Received: by 10.52.34.137 with SMTP id z9mr3262237vdi.12.1395963071059; Thu, 27 Mar 2014 16:31:11 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.78.9 with SMTP id i9csp66825vck; Thu, 27 Mar 2014 16:31:10 -0700 (PDT) X-Received: by 10.68.196.168 with SMTP id in8mr4855587pbc.132.1395963070364; Thu, 27 Mar 2014 16:31:10 -0700 (PDT) Received: from mail-pb0-f51.google.com (mail-pb0-f51.google.com [209.85.160.51]) by mx.google.com with ESMTPS id gr2si2478352pac.119.2014.03.27.16.31.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Mar 2014 16:31:10 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.51 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=209.85.160.51; Received: by mail-pb0-f51.google.com with SMTP id uo5so4169876pbc.38 for ; Thu, 27 Mar 2014 16:31:09 -0700 (PDT) X-Received: by 10.69.2.2 with SMTP id bk2mr4779060pbd.75.1395963069573; Thu, 27 Mar 2014 16:31:09 -0700 (PDT) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id y4sm14419539pbk.76.2014.03.27.16.31.08 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Mar 2014 16:31:08 -0700 (PDT) From: John Stultz To: LKML Cc: John Stultz , Thomas Gleixner , Ingo Molnar , Linus Torvalds Subject: [PATCH] time: Revert to calling clock_was_set_delayed() while in irq context Date: Thu, 27 Mar 2014 16:30:49 -0700 Message-Id: <1395963049-11923-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.8.3.2 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Ingo, After testing a patch queued for 3.15, I noticed there was a WARNON message that I realized was triggered by one of my patches that came in the 3.14 merge window. I'm not very happy to find this now, but sadly here it is. The fix is luckily fairly simple and just falls back to previous behavior. For tip/timers/urgent. thanks -john In commit 47a1b796306356f35 (tick/timekeeping: Call update_wall_time outside the jiffies lock), we moved to calling clock_was_set() due to the fact that we were no longer holding the timekeeping or jiffies lock. However, there is still the problem that clock_was_set() triggers an IPI, which cannot be done from the timer's hard irq context, and will generate WARN_ON warnings. Apparently in my earlier testing, I'm guessing I didn't bump the dmesg log level, so I somehow missed the WARN_ONs. Thus we need to revert back to calling clock_was_set_delayed(). Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Linus Torvalds Signed-off-by: John Stultz --- kernel/time/timekeeping.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 0aa4ce8..5b40279 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -1435,7 +1435,8 @@ void update_wall_time(void) out: raw_spin_unlock_irqrestore(&timekeeper_lock, flags); if (clock_set) - clock_was_set(); + /* Have to call _delayed version, since in irq context*/ + clock_was_set_delayed(); } /**