diff options
-rw-r--r-- | arch/mips/kernel/irixsig.c | 17 | ||||
-rw-r--r-- | arch/mips/kernel/sysirix.c | 3 |
2 files changed, 3 insertions, 17 deletions
diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c index 4c114ae21793..eff89322ba50 100644 --- a/arch/mips/kernel/irixsig.c +++ b/arch/mips/kernel/irixsig.c | |||
@@ -440,18 +440,6 @@ struct irix5_siginfo { | |||
440 | } stuff; | 440 | } stuff; |
441 | }; | 441 | }; |
442 | 442 | ||
443 | static inline unsigned long timespectojiffies(struct timespec *value) | ||
444 | { | ||
445 | unsigned long sec = (unsigned) value->tv_sec; | ||
446 | long nsec = value->tv_nsec; | ||
447 | |||
448 | if (sec > (LONG_MAX / HZ)) | ||
449 | return LONG_MAX; | ||
450 | nsec += 1000000000L / HZ - 1; | ||
451 | nsec /= 1000000000L / HZ; | ||
452 | return HZ * sec + nsec; | ||
453 | } | ||
454 | |||
455 | asmlinkage int irix_sigpoll_sys(unsigned long *set, struct irix5_siginfo *info, | 443 | asmlinkage int irix_sigpoll_sys(unsigned long *set, struct irix5_siginfo *info, |
456 | struct timespec *tp) | 444 | struct timespec *tp) |
457 | { | 445 | { |
@@ -489,14 +477,13 @@ asmlinkage int irix_sigpoll_sys(unsigned long *set, struct irix5_siginfo *info, | |||
489 | error = -EINVAL; | 477 | error = -EINVAL; |
490 | goto out; | 478 | goto out; |
491 | } | 479 | } |
492 | expire = timespectojiffies(tp)+(tp->tv_sec||tp->tv_nsec); | 480 | expire = timespec_to_jiffies(tp) + (tp->tv_sec||tp->tv_nsec); |
493 | } | 481 | } |
494 | 482 | ||
495 | while(1) { | 483 | while(1) { |
496 | long tmp = 0; | 484 | long tmp = 0; |
497 | 485 | ||
498 | current->state = TASK_INTERRUPTIBLE; | 486 | expire = schedule_timeout_interruptible(expire); |
499 | expire = schedule_timeout(expire); | ||
500 | 487 | ||
501 | for (i=0; i<=4; i++) | 488 | for (i=0; i<=4; i++) |
502 | tmp |= (current->pending.signal.sig[i] & kset.sig[i]); | 489 | tmp |= (current->pending.signal.sig[i] & kset.sig[i]); |
diff --git a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c index b46595462717..4de155699c4f 100644 --- a/arch/mips/kernel/sysirix.c +++ b/arch/mips/kernel/sysirix.c | |||
@@ -1032,8 +1032,7 @@ bad: | |||
1032 | 1032 | ||
1033 | asmlinkage int irix_sginap(int ticks) | 1033 | asmlinkage int irix_sginap(int ticks) |
1034 | { | 1034 | { |
1035 | current->state = TASK_INTERRUPTIBLE; | 1035 | schedule_timeout_interruptible(ticks); |
1036 | schedule_timeout(ticks); | ||
1037 | return 0; | 1036 | return 0; |
1038 | } | 1037 | } |
1039 | 1038 | ||