aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time/clockevents.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2015-04-02 20:01:10 -0400
committerIngo Molnar <mingo@kernel.org>2015-04-03 02:44:31 -0400
commit592a438ff3fea61d303c5784c209b3f1fd3e16df (patch)
tree8ce6cf8c2095a516e9226305649332bae70490a4 /kernel/time/clockevents.c
parent3ff70551a942b4c1d3c2e96e31a5c6e369a6d0be (diff)
clockevents: Provide explicit broadcast control functions
clockevents_notify() is a leftover from the early design of the clockevents facility. It's really not a notification mechanism, it's a multiplex call. We are way better off to have explicit calls instead of this monstrosity. Split out the broadcast control into a separate function and provide inline helpers. Switch clockevents_notify() over. This will go away once all callers are converted. This also gets rid of the nested locking of clockevents_lock and broadcast_lock. The broadcast control functions do not require clockevents_lock. Only the managing functions (setup/shutdown/suspend/resume of the broadcast device require clockevents_lock. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Len Brown <lenb@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Tony Lindgren <tony@atomide.com> Link: http://lkml.kernel.org/r/8086559.ttsuS0n1Xr@vostro.rjw.lan Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/time/clockevents.c')
-rw-r--r--kernel/time/clockevents.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index 7af614829da1..599ff8d3fda5 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -656,9 +656,13 @@ int clockevents_notify(unsigned long reason, void *arg)
656 656
657 switch (reason) { 657 switch (reason) {
658 case CLOCK_EVT_NOTIFY_BROADCAST_ON: 658 case CLOCK_EVT_NOTIFY_BROADCAST_ON:
659 tick_broadcast_enable();
660 break;
659 case CLOCK_EVT_NOTIFY_BROADCAST_OFF: 661 case CLOCK_EVT_NOTIFY_BROADCAST_OFF:
662 tick_broadcast_disable();
663 break;
660 case CLOCK_EVT_NOTIFY_BROADCAST_FORCE: 664 case CLOCK_EVT_NOTIFY_BROADCAST_FORCE:
661 tick_broadcast_on_off(reason, arg); 665 tick_broadcast_force();
662 break; 666 break;
663 667
664 case CLOCK_EVT_NOTIFY_BROADCAST_ENTER: 668 case CLOCK_EVT_NOTIFY_BROADCAST_ENTER: