]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - kernel/time/posix-timers.c
UBUNTU: SAUCE: s390/mm: fix local TLB flushing vs. detach of an mm address space
[mirror_ubuntu-zesty-kernel.git] / kernel / time / posix-timers.c
index f2826c35e9185f60586f06dff53f51ca3324c659..1e6623d7675019ae9c1dcc3dc273c03d761d5931 100644 (file)
@@ -36,7 +36,7 @@
 #include <linux/time.h>
 #include <linux/mutex.h>
 
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 #include <linux/list.h>
 #include <linux/init.h>
 #include <linux/compiler.h>
@@ -359,7 +359,7 @@ static void schedule_next_timer(struct k_itimer *timr)
 {
        struct hrtimer *timer = &timr->it.real.timer;
 
-       if (timr->it.real.interval.tv64 == 0)
+       if (timr->it.real.interval == 0)
                return;
 
        timr->it_overrun += (unsigned int) hrtimer_forward(timer,
@@ -449,7 +449,7 @@ static enum hrtimer_restart posix_timer_fn(struct hrtimer *timer)
        timr = container_of(timer, struct k_itimer, it.real.timer);
        spin_lock_irqsave(&timr->it_lock, flags);
 
-       if (timr->it.real.interval.tv64 != 0)
+       if (timr->it.real.interval != 0)
                si_private = ++timr->it_requeue_pending;
 
        if (posix_timer_event(timr, si_private)) {
@@ -458,7 +458,7 @@ static enum hrtimer_restart posix_timer_fn(struct hrtimer *timer)
                 * we will not get a call back to restart it AND
                 * it should be restarted.
                 */
-               if (timr->it.real.interval.tv64 != 0) {
+               if (timr->it.real.interval != 0) {
                        ktime_t now = hrtimer_cb_get_time(timer);
 
                        /*
@@ -485,9 +485,9 @@ static enum hrtimer_restart posix_timer_fn(struct hrtimer *timer)
                         */
 #ifdef CONFIG_HIGH_RES_TIMERS
                        {
-                               ktime_t kj = ktime_set(0, NSEC_PER_SEC / HZ);
+                               ktime_t kj = NSEC_PER_SEC / HZ;
 
-                               if (timr->it.real.interval.tv64 < kj.tv64)
+                               if (timr->it.real.interval < kj)
                                        now = ktime_add(now, kj);
                        }
 #endif
@@ -743,7 +743,7 @@ common_timer_get(struct k_itimer *timr, struct itimerspec *cur_setting)
        iv = timr->it.real.interval;
 
        /* interval timer ? */
-       if (iv.tv64)
+       if (iv)
                cur_setting->it_interval = ktime_to_timespec(iv);
        else if (!hrtimer_active(timer) &&
                 (timr->it_sigev_notify & ~SIGEV_THREAD_ID) != SIGEV_NONE)
@@ -756,13 +756,13 @@ common_timer_get(struct k_itimer *timr, struct itimerspec *cur_setting)
         * timer move the expiry time forward by intervals, so
         * expiry is > now.
         */
-       if (iv.tv64 && (timr->it_requeue_pending & REQUEUE_PENDING ||
-           (timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE))
+       if (iv && (timr->it_requeue_pending & REQUEUE_PENDING ||
+                  (timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE))
                timr->it_overrun += (unsigned int) hrtimer_forward(timer, now, iv);
 
        remaining = __hrtimer_expires_remaining_adjusted(timer, now);
        /* Return 0 only, when the timer is expired and not pending */
-       if (remaining.tv64 <= 0) {
+       if (remaining <= 0) {
                /*
                 * A single shot SIGEV_NONE timer must return 0, when
                 * it is expired !
@@ -839,7 +839,7 @@ common_timer_set(struct k_itimer *timr, int flags,
                common_timer_get(timr, old_setting);
 
        /* disable the timer */
-       timr->it.real.interval.tv64 = 0;
+       timr->it.real.interval = 0;
        /*
         * careful here.  If smp we could be in the "fire" routine which will
         * be spinning as we hold the lock.  But this is ONLY an SMP issue.
@@ -924,7 +924,7 @@ retry:
 
 static int common_timer_del(struct k_itimer *timer)
 {
-       timer->it.real.interval.tv64 = 0;
+       timer->it.real.interval = 0;
 
        if (hrtimer_try_to_cancel(&timer->it.real.timer) < 0)
                return TIMER_RETRY;