All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Suresh Siddha <suresh.b.siddha@intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	santosh.shilimkar@ti.com, suresh.b.siddha@intel.com,
	tglx@linutronix.de
Subject: [tip:timers/urgent] clockevents: tTack broadcast device mode change in tick_broadcast_switch_to_oneshot()
Date: Tue, 10 Apr 2012 02:49:36 -0700	[thread overview]
Message-ID: <tip-fa4da365bc7772c2cd6d5405bdf151612455f957@git.kernel.org> (raw)
In-Reply-To: <1334011304.12400.81.camel@sbsiddha-desk.sc.intel.com>

Commit-ID:  fa4da365bc7772c2cd6d5405bdf151612455f957
Gitweb:     http://git.kernel.org/tip/fa4da365bc7772c2cd6d5405bdf151612455f957
Author:     Suresh Siddha <suresh.b.siddha@intel.com>
AuthorDate: Mon, 9 Apr 2012 15:41:44 -0700
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 10 Apr 2012 11:42:07 +0200

clockevents: tTack broadcast device mode change in tick_broadcast_switch_to_oneshot()

In the commit 77b0d60c5adf39c74039e2142a1d3cd1e4d53799,
"clockevents: Leave the broadcast device in shutdown mode when not needed",
we were bailing out too quickly in tick_broadcast_switch_to_oneshot(),
with out tracking the broadcast device mode change to 'TICKDEV_MODE_ONESHOT'.

This breaks the platforms which need broadcast device oneshot services during
deep idle states. tick_broadcast_oneshot_control() thinks that it is
in periodic mode and fails to take proper decisions based on the
CLOCK_EVT_NOTIFY_BROADCAST_[ENTER, EXIT] notifications during deep
idle entry/exit.

Fix this by tracking the broadcast device mode as 'TICKDEV_MODE_ONESHOT',
before leaving the broadcast HW device in shutdown mode if there are no active
requests for the moment.

Reported-and-tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: johnstul@us.ibm.com
Link: http://lkml.kernel.org/r/1334011304.12400.81.camel@sbsiddha-desk.sc.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/time/tick-broadcast.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index e883f57..bf57abd 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -575,10 +575,12 @@ void tick_broadcast_switch_to_oneshot(void)
 	unsigned long flags;
 
 	raw_spin_lock_irqsave(&tick_broadcast_lock, flags);
+
+	tick_broadcast_device.mode = TICKDEV_MODE_ONESHOT;
+
 	if (cpumask_empty(tick_get_broadcast_mask()))
 		goto end;
 
-	tick_broadcast_device.mode = TICKDEV_MODE_ONESHOT;
 	bc = tick_broadcast_device.evtdev;
 	if (bc)
 		tick_broadcast_setup_oneshot(bc);

  parent reply	other threads:[~2012-04-10  9:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-09  6:03 [PATCH] clockevents: Leave broadcast device shtudown only if the current device is always running Santosh Shilimkar
2012-04-09 22:41 ` Suresh Siddha
2012-04-10  6:56   ` Shilimkar, Santosh
2012-04-10  9:49   ` tip-bot for Suresh Siddha [this message]
2012-04-12  1:27     ` [tip:timers/urgent] clockevents: tTack broadcast device mode change in tick_broadcast_switch_to_oneshot() Alex Shi
2012-04-12  4:35       ` Suresh Siddha
2012-04-12  5:10         ` Alex Shi
     [not found]   ` <CA++bM2th5XW1gxrHbcHwDK=qBBaNc3ut0ydbNNStfNa-Xa-9tA@mail.gmail.com>
2012-04-11  6:34     ` [PATCH] clockevents: Leave broadcast device shtudown only if the current device is always running Feng Tang
2012-04-11 10:10       ` Thomas Gleixner
2012-04-11 16:04         ` Feng Tang
2012-04-11 21:01           ` Suresh Siddha
2012-04-15 12:57   ` Santosh Shilimkar
2012-04-16 22:03     ` Suresh Siddha
2012-04-17  8:14       ` Santosh Shilimkar
2012-04-17 19:11         ` Suresh Siddha
2012-04-18  5:41           ` Shilimkar, Santosh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-fa4da365bc7772c2cd6d5405bdf151612455f957@git.kernel.org \
    --to=suresh.b.siddha@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=santosh.shilimkar@ti.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.