aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/hrtimer.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/hrtimer.c')
-rw-r--r--kernel/hrtimer.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 21c38a7e666b..d0ba190dfeb6 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -693,7 +693,7 @@ static int __sched do_nanosleep(struct hrtimer_sleeper *t, enum hrtimer_mode mod
693 return t->task == NULL; 693 return t->task == NULL;
694} 694}
695 695
696static long __sched nanosleep_restart(struct restart_block *restart) 696long __sched hrtimer_nanosleep_restart(struct restart_block *restart)
697{ 697{
698 struct hrtimer_sleeper t; 698 struct hrtimer_sleeper t;
699 struct timespec __user *rmtp; 699 struct timespec __user *rmtp;
@@ -702,13 +702,13 @@ static long __sched nanosleep_restart(struct restart_block *restart)
702 702
703 restart->fn = do_no_restart_syscall; 703 restart->fn = do_no_restart_syscall;
704 704
705 hrtimer_init(&t.timer, restart->arg3, HRTIMER_ABS); 705 hrtimer_init(&t.timer, restart->arg0, HRTIMER_ABS);
706 t.timer.expires.tv64 = ((u64)restart->arg1 << 32) | (u64) restart->arg0; 706 t.timer.expires.tv64 = ((u64)restart->arg3 << 32) | (u64) restart->arg2;
707 707
708 if (do_nanosleep(&t, HRTIMER_ABS)) 708 if (do_nanosleep(&t, HRTIMER_ABS))
709 return 0; 709 return 0;
710 710
711 rmtp = (struct timespec __user *) restart->arg2; 711 rmtp = (struct timespec __user *) restart->arg1;
712 if (rmtp) { 712 if (rmtp) {
713 time = ktime_sub(t.timer.expires, t.timer.base->get_time()); 713 time = ktime_sub(t.timer.expires, t.timer.base->get_time());
714 if (time.tv64 <= 0) 714 if (time.tv64 <= 0)
@@ -718,7 +718,7 @@ static long __sched nanosleep_restart(struct restart_block *restart)
718 return -EFAULT; 718 return -EFAULT;
719 } 719 }
720 720
721 restart->fn = nanosleep_restart; 721 restart->fn = hrtimer_nanosleep_restart;
722 722
723 /* The other values in restart are already filled in */ 723 /* The other values in restart are already filled in */
724 return -ERESTART_RESTARTBLOCK; 724 return -ERESTART_RESTARTBLOCK;
@@ -751,11 +751,11 @@ long hrtimer_nanosleep(struct timespec *rqtp, struct timespec __user *rmtp,
751 } 751 }
752 752
753 restart = &current_thread_info()->restart_block; 753 restart = &current_thread_info()->restart_block;
754 restart->fn = nanosleep_restart; 754 restart->fn = hrtimer_nanosleep_restart;
755 restart->arg0 = t.timer.expires.tv64 & 0xFFFFFFFF; 755 restart->arg0 = (unsigned long) t.timer.base->index;
756 restart->arg1 = t.timer.expires.tv64 >> 32; 756 restart->arg1 = (unsigned long) rmtp;
757 restart->arg2 = (unsigned long) rmtp; 757 restart->arg2 = t.timer.expires.tv64 & 0xFFFFFFFF;
758 restart->arg3 = (unsigned long) t.timer.base->index; 758 restart->arg3 = t.timer.expires.tv64 >> 32;
759 759
760 return -ERESTART_RESTARTBLOCK; 760 return -ERESTART_RESTARTBLOCK;
761} 761}