Skip to content

Commit 849401b

Browse files
Preeti U MurthyKAGA-KOKO
authored andcommitted
tick: Fixup more fallout from hrtimer broadcast mode
The hrtimer mode of broadcast is supported only when GENERIC_CLOCKEVENTS_BROADCAST and TICK_ONESHOT config options are enabled. Hence compile in the functions for hrtimer mode of broadcast only when these options are selected. Also fix max_delta_ticks value for the pseudo clock device. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Reported-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com> Link: http://lkml.kernel.org/r/52F719EE.9010304@linux.vnet.ibm.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
1 parent f1689bb commit 849401b

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎include/linux/clockchips.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ static inline void clockevents_resume(void) {}
207207

208208
static inline int clockevents_notify(unsigned long reason, void *arg) { return 0; }
209209
static inline int tick_check_broadcast_expired(void) { return 0; }
210+
static inline void tick_setup_hrtimer_broadcast(void) {};
210211

211212
#endif
212213

‎kernel/time/Makefile‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ obj-y += timeconv.o posix-clock.o alarmtimer.o
33

44
obj-$(CONFIG_GENERIC_CLOCKEVENTS_BUILD) += clockevents.o
55
obj-$(CONFIG_GENERIC_CLOCKEVENTS) += tick-common.o
6-
obj-$(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) += tick-broadcast.o tick-broadcast-hrtimer.o
6+
ifeq ($(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST),y)
7+
obj-y += tick-broadcast.o
8+
obj-$(CONFIG_TICK_ONESHOT) += tick-broadcast-hrtimer.o
9+
endif
710
obj-$(CONFIG_GENERIC_SCHED_CLOCK) += sched_clock.o
811
obj-$(CONFIG_TICK_ONESHOT) += tick-oneshot.o
912
obj-$(CONFIG_TICK_ONESHOT) += tick-sched.o

‎kernel/time/tick-broadcast-hrtimer.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static struct clock_event_device ce_broadcast_hrtimer = {
8282
.min_delta_ns = 1,
8383
.max_delta_ns = KTIME_MAX,
8484
.min_delta_ticks = 1,
85-
.max_delta_ticks = KTIME_MAX,
85+
.max_delta_ticks = ULONG_MAX,
8686
.mult = 1,
8787
.shift = 0,
8888
.cpumask = cpu_all_mask,

0 commit comments

Comments
 (0)