]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - kernel/timer.c
sched: Introduce preempt_count accessor functions
[karo-tx-linux.git] / kernel / timer.c
index 4296d13db3d15876f320070caee26c9a6ff06e6d..6582b82fa966d6ba503a7361f8f89f699f4de04d 100644 (file)
@@ -1092,7 +1092,7 @@ static int cascade(struct tvec_base *base, struct tvec *tv, int index)
 static void call_timer_fn(struct timer_list *timer, void (*fn)(unsigned long),
                          unsigned long data)
 {
-       int preempt_count = preempt_count();
+       int count = preempt_count();
 
 #ifdef CONFIG_LOCKDEP
        /*
@@ -1119,16 +1119,16 @@ static void call_timer_fn(struct timer_list *timer, void (*fn)(unsigned long),
 
        lock_map_release(&lockdep_map);
 
-       if (preempt_count != preempt_count()) {
+       if (count != preempt_count()) {
                WARN_ONCE(1, "timer: %pF preempt leak: %08x -> %08x\n",
-                         fn, preempt_count, preempt_count());
+                         fn, count, preempt_count());
                /*
                 * Restore the preempt count. That gives us a decent
                 * chance to survive and extract information. If the
                 * callback kept a lock held, bad luck, but not worse
                 * than the BUG() we had.
                 */
-               preempt_count() = preempt_count;
+               preempt_count_set(count);
        }
 }