summaryrefslogtreecommitdiff
path: root/kernel/time/clockevents.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-07-25 16:57:53 +0200
committerThomas Gleixner <tglx@linutronix.de>2009-07-27 21:07:17 +0200
commit3a6e55cb2bea8918e6bb6c8ba0daea729ec576b8 (patch)
treeab54cf3078e6f1d66e60ddc5c64f8f880c75e2e2 /kernel/time/clockevents.c
parent4b064e4f9ec7a5befcab91b9b1f2b0314c5a051a (diff)
downloadlwn-3a6e55cb2bea8918e6bb6c8ba0daea729ec576b8.tar.gz
lwn-3a6e55cb2bea8918e6bb6c8ba0daea729ec576b8.zip
clockevents: Convert clockevents / tick device locks to atomic_spinlock
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/time/clockevents.c')
-rw-r--r--kernel/time/clockevents.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index a6dcd67b041d..a21d577867be 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -28,7 +28,7 @@ static LIST_HEAD(clockevents_released);
static RAW_NOTIFIER_HEAD(clockevents_chain);
/* Protection for the above */
-static DEFINE_SPINLOCK(clockevents_lock);
+static DEFINE_ATOMIC_SPINLOCK(clockevents_lock);
/**
* clockevents_delta2ns - Convert a latch value (device ticks) to nanoseconds
@@ -139,9 +139,9 @@ int clockevents_register_notifier(struct notifier_block *nb)
{
int ret;
- spin_lock(&clockevents_lock);
+ atomic_spin_lock(&clockevents_lock);
ret = raw_notifier_chain_register(&clockevents_chain, nb);
- spin_unlock(&clockevents_lock);
+ atomic_spin_unlock(&clockevents_lock);
return ret;
}
@@ -181,13 +181,13 @@ void clockevents_register_device(struct clock_event_device *dev)
BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED);
BUG_ON(!dev->cpumask);
- spin_lock(&clockevents_lock);
+ atomic_spin_lock(&clockevents_lock);
list_add(&dev->list, &clockevent_devices);
clockevents_do_notify(CLOCK_EVT_NOTIFY_ADD, dev);
clockevents_notify_released();
- spin_unlock(&clockevents_lock);
+ atomic_spin_unlock(&clockevents_lock);
}
EXPORT_SYMBOL_GPL(clockevents_register_device);
@@ -236,7 +236,7 @@ void clockevents_notify(unsigned long reason, void *arg)
{
struct list_head *node, *tmp;
- spin_lock(&clockevents_lock);
+ atomic_spin_lock(&clockevents_lock);
clockevents_do_notify(reason, arg);
switch (reason) {
@@ -251,7 +251,7 @@ void clockevents_notify(unsigned long reason, void *arg)
default:
break;
}
- spin_unlock(&clockevents_lock);
+ atomic_spin_unlock(&clockevents_lock);
}
EXPORT_SYMBOL_GPL(clockevents_notify);
#endif