clockevents: tTack broadcast device mode change in tick_broadcast_switch_to_oneshot()
authorSuresh Siddha <suresh.b.siddha@intel.com>
Mon, 9 Apr 2012 22:41:44 +0000 (15:41 -0700)
committerVarun Wadekar <vwadekar@nvidia.com>
Wed, 18 Apr 2012 14:39:20 +0000 (19:39 +0530)
commit72a4c4b345c80e5c871d1eb9e09fddf6ba0398bd
tree688705c0511f9bb72a26bb5d8cf5ea4003ccb499
parent4c14a7804061b20620ee39848fd9039b735ca3b9
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