public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] time/cpuidle:Fixup fallout from hrtimer broadcast mode inclusion
@ 2014-02-07 17:29 Preeti U Murthy
  2014-02-07 17:57 ` Thomas Gleixner
  2014-02-09  7:31 ` [PATCH] time/cpuidle:Fixup fallout from hrtimer broadcast mode inclusion David Rientjes
  0 siblings, 2 replies; 7+ messages in thread
From: Preeti U Murthy @ 2014-02-07 17:29 UTC (permalink / raw)
  To: tglx, fengguang.wu; +Cc: mingo, linux-kernel

The broadcast timer registration has to be done only when
GENERIC_CLOCKEVENTS_BROADCAST and TICK_ONESHOT config options are enabled.
Also fix max_delta_ticks value for the pseudo clock device.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
---

 kernel/time/tick-broadcast-hrtimer.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/time/tick-broadcast-hrtimer.c b/kernel/time/tick-broadcast-hrtimer.c
index 5591aaa..bc383ac 100644
--- a/kernel/time/tick-broadcast-hrtimer.c
+++ b/kernel/time/tick-broadcast-hrtimer.c
@@ -81,7 +81,7 @@ static struct clock_event_device ce_broadcast_hrtimer = {
 	.min_delta_ns		= 1,
 	.max_delta_ns		= KTIME_MAX,
 	.min_delta_ticks	= 1,
-	.max_delta_ticks	= KTIME_MAX,
+	.max_delta_ticks	= ULONG_MAX,
 	.mult			= 1,
 	.shift			= 0,
 	.cpumask		= cpu_all_mask,
@@ -102,9 +102,11 @@ static enum hrtimer_restart bc_handler(struct hrtimer *t)
 	return HRTIMER_RESTART;
 }
 
+#if defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) && defined(CONFIG_TICK_ONESHOT)
 void tick_setup_hrtimer_broadcast(void)
 {
 	hrtimer_init(&bctimer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
 	bctimer.function = bc_handler;
 	clockevents_register_device(&ce_broadcast_hrtimer);
 }
+#endif


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-02-09 21:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-07 17:29 [PATCH] time/cpuidle:Fixup fallout from hrtimer broadcast mode inclusion Preeti U Murthy
2014-02-07 17:57 ` Thomas Gleixner
2014-02-09  6:02   ` Preeti U Murthy
2014-02-09 14:16     ` [tip:timers/core] tick: Fixup more fallout from hrtimer broadcast mode tip-bot for Preeti U Murthy
2014-02-09  7:31 ` [PATCH] time/cpuidle:Fixup fallout from hrtimer broadcast mode inclusion David Rientjes
2014-02-09 10:04   ` Preeti U Murthy
2014-02-09 21:35     ` David Rientjes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox