From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932433AbdJZShh (ORCPT ); Thu, 26 Oct 2017 14:37:37 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:49550 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932407AbdJZShd (ORCPT ); Thu, 26 Oct 2017 14:37:33 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 051326041C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=psodagud@codeaurora.org From: Prasad Sodagudi To: tglx@linutronix.de, mingo@kernel.org, viresh.kumar@linaro.org Cc: psodagud@codeaurora.org, linux-kernel@vger.kernel.org Subject: [PATCH] clockevents: Update clockevents device next_event Date: Thu, 26 Oct 2017 11:37:22 -0700 Message-Id: <1509043042-32486-1-git-send-email-psodagud@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Usually clockevent device's next_event is updated in clockevents_program_event() and next_event indicates the next timer event on that cpu. Whenever there are no timers on a CPU, corresponding clockevent device is going into ONESHOT_STOPPED state but clockevent device next_event is not updated, because clockevents_program_event() not called. As next_event is not updated properly, resulting in spurious wakeups, so update the clockevent device next_event with proper value(KTIME_MAX) to avoid spurious wakeups. Signed-off-by: Prasad Sodagudi --- kernel/time/tick-oneshot.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/time/tick-oneshot.c b/kernel/time/tick-oneshot.c index 6b009c2..c1f518e 100644 --- a/kernel/time/tick-oneshot.c +++ b/kernel/time/tick-oneshot.c @@ -33,6 +33,7 @@ int tick_program_event(ktime_t expires, int force) * We don't need the clock event device any more, stop it. */ clockevents_switch_state(dev, CLOCK_EVT_STATE_ONESHOT_STOPPED); + dev->next_event = KTIME_MAX; return 0; } -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project