aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/clockchips.h4
-rw-r--r--kernel/time/tick-broadcast.c17
2 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
index 8a7096fcb01e..e1089aa7816d 100644
--- a/include/linux/clockchips.h
+++ b/include/linux/clockchips.h
@@ -161,6 +161,10 @@ clockevents_calc_mult_shift(struct clock_event_device *ce, u32 freq, u32 minsec)
161extern void clockevents_suspend(void); 161extern void clockevents_suspend(void);
162extern void clockevents_resume(void); 162extern void clockevents_resume(void);
163 163
164#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
165extern int tick_receive_broadcast(void);
166#endif
167
164#ifdef CONFIG_GENERIC_CLOCKEVENTS 168#ifdef CONFIG_GENERIC_CLOCKEVENTS
165extern void clockevents_notify(unsigned long reason, void *arg); 169extern void clockevents_notify(unsigned long reason, void *arg);
166#else 170#else
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index f113755695e2..7cc81c57eb31 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -125,6 +125,23 @@ int tick_device_uses_broadcast(struct clock_event_device *dev, int cpu)
125 return ret; 125 return ret;
126} 126}
127 127
128#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
129int tick_receive_broadcast(void)
130{
131 struct tick_device *td = this_cpu_ptr(&tick_cpu_device);
132 struct clock_event_device *evt = td->evtdev;
133
134 if (!evt)
135 return -ENODEV;
136
137 if (!evt->event_handler)
138 return -EINVAL;
139
140 evt->event_handler(evt);
141 return 0;
142}
143#endif
144
128/* 145/*
129 * Broadcast the event to the cpus, which are set in the mask (mangled). 146 * Broadcast the event to the cpus, which are set in the mask (mangled).
130 */ 147 */