|
@@ -15,7 +15,6 @@
|
|
|
#include <linux/hrtimer.h>
|
|
|
#include <linux/init.h>
|
|
|
#include <linux/module.h>
|
|
|
-#include <linux/notifier.h>
|
|
|
#include <linux/smp.h>
|
|
|
|
|
|
#include "tick-internal.h"
|
|
@@ -23,10 +22,6 @@
|
|
|
/* The registered clock event devices */
|
|
|
static LIST_HEAD(clockevent_devices);
|
|
|
static LIST_HEAD(clockevents_released);
|
|
|
-
|
|
|
-/* Notification for clock events */
|
|
|
-static RAW_NOTIFIER_HEAD(clockevents_chain);
|
|
|
-
|
|
|
/* Protection for the above */
|
|
|
static DEFINE_RAW_SPINLOCK(clockevents_lock);
|
|
|
|
|
@@ -232,30 +227,6 @@ int clockevents_program_event(struct clock_event_device *dev, ktime_t expires,
|
|
|
return (rc && force) ? clockevents_program_min_delta(dev) : rc;
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * clockevents_register_notifier - register a clock events change listener
|
|
|
- */
|
|
|
-int clockevents_register_notifier(struct notifier_block *nb)
|
|
|
-{
|
|
|
- unsigned long flags;
|
|
|
- int ret;
|
|
|
-
|
|
|
- raw_spin_lock_irqsave(&clockevents_lock, flags);
|
|
|
- ret = raw_notifier_chain_register(&clockevents_chain, nb);
|
|
|
- raw_spin_unlock_irqrestore(&clockevents_lock, flags);
|
|
|
-
|
|
|
- return ret;
|
|
|
-}
|
|
|
-
|
|
|
-/*
|
|
|
- * Notify about a clock event change. Called with clockevents_lock
|
|
|
- * held.
|
|
|
- */
|
|
|
-static void clockevents_do_notify(unsigned long reason, void *dev)
|
|
|
-{
|
|
|
- raw_notifier_call_chain(&clockevents_chain, reason, dev);
|
|
|
-}
|
|
|
-
|
|
|
/*
|
|
|
* Called after a notify add to make devices available which were
|
|
|
* released from the notifier call.
|
|
@@ -269,7 +240,7 @@ static void clockevents_notify_released(void)
|
|
|
struct clock_event_device, list);
|
|
|
list_del(&dev->list);
|
|
|
list_add(&dev->list, &clockevent_devices);
|
|
|
- clockevents_do_notify(CLOCK_EVT_NOTIFY_ADD, dev);
|
|
|
+ tick_check_new_device(dev);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -290,7 +261,7 @@ void clockevents_register_device(struct clock_event_device *dev)
|
|
|
raw_spin_lock_irqsave(&clockevents_lock, flags);
|
|
|
|
|
|
list_add(&dev->list, &clockevent_devices);
|
|
|
- clockevents_do_notify(CLOCK_EVT_NOTIFY_ADD, dev);
|
|
|
+ tick_check_new_device(dev);
|
|
|
clockevents_notify_released();
|
|
|
|
|
|
raw_spin_unlock_irqrestore(&clockevents_lock, flags);
|
|
@@ -433,7 +404,7 @@ void clockevents_notify(unsigned long reason, void *arg)
|
|
|
int cpu;
|
|
|
|
|
|
raw_spin_lock_irqsave(&clockevents_lock, flags);
|
|
|
- clockevents_do_notify(reason, arg);
|
|
|
+ tick_notify(reason, arg);
|
|
|
|
|
|
switch (reason) {
|
|
|
case CLOCK_EVT_NOTIFY_CPU_DEAD:
|