Commit b0f875af authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://are.twiddle.net/axp-2.6

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents a14813a3 72c7b226
...@@ -1053,9 +1053,10 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, ...@@ -1053,9 +1053,10 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp,
ret = 0; ret = 0;
} }
set_fd_set(n, inp->fds_bits, fds.res_in); if (set_fd_set(n, inp->fds_bits, fds.res_in) ||
set_fd_set(n, outp->fds_bits, fds.res_out); set_fd_set(n, outp->fds_bits, fds.res_out) ||
set_fd_set(n, exp->fds_bits, fds.res_ex); set_fd_set(n, exp->fds_bits, fds.res_ex))
ret = -EFAULT;
out: out:
kfree(bits); kfree(bits);
......
...@@ -145,7 +145,7 @@ sys_rt_sigaction(int sig, const struct sigaction __user *act, ...@@ -145,7 +145,7 @@ sys_rt_sigaction(int sig, const struct sigaction __user *act,
* Atomically swap in the new signal mask, and wait for a signal. * Atomically swap in the new signal mask, and wait for a signal.
*/ */
asmlinkage int asmlinkage int
do_sigsuspend(old_sigset_t mask, struct pt_regs *reg, struct switch_stack *sw) do_sigsuspend(old_sigset_t mask, struct pt_regs *regs, struct switch_stack *sw)
{ {
sigset_t oldset; sigset_t oldset;
...@@ -156,17 +156,22 @@ do_sigsuspend(old_sigset_t mask, struct pt_regs *reg, struct switch_stack *sw) ...@@ -156,17 +156,22 @@ do_sigsuspend(old_sigset_t mask, struct pt_regs *reg, struct switch_stack *sw)
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock); spin_unlock_irq(&current->sighand->siglock);
/* Indicate EINTR on return from any possible signal handler,
which will not come back through here, but via sigreturn. */
regs->r0 = EINTR;
regs->r19 = 1;
while (1) { while (1) {
current->state = TASK_INTERRUPTIBLE; current->state = TASK_INTERRUPTIBLE;
schedule(); schedule();
if (do_signal(&oldset, reg, sw, 0, 0)) if (do_signal(&oldset, regs, sw, 0, 0))
return -EINTR; return -EINTR;
} }
} }
asmlinkage int asmlinkage int
do_rt_sigsuspend(sigset_t __user *uset, size_t sigsetsize, do_rt_sigsuspend(sigset_t __user *uset, size_t sigsetsize,
struct pt_regs *reg, struct switch_stack *sw) struct pt_regs *regs, struct switch_stack *sw)
{ {
sigset_t oldset, set; sigset_t oldset, set;
...@@ -183,10 +188,15 @@ do_rt_sigsuspend(sigset_t __user *uset, size_t sigsetsize, ...@@ -183,10 +188,15 @@ do_rt_sigsuspend(sigset_t __user *uset, size_t sigsetsize,
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock); spin_unlock_irq(&current->sighand->siglock);
/* Indicate EINTR on return from any possible signal handler,
which will not come back through here, but via sigreturn. */
regs->r0 = EINTR;
regs->r19 = 1;
while (1) { while (1) {
current->state = TASK_INTERRUPTIBLE; current->state = TASK_INTERRUPTIBLE;
schedule(); schedule();
if (do_signal(&oldset, reg, sw, 0, 0)) if (do_signal(&oldset, regs, sw, 0, 0))
return -EINTR; return -EINTR;
} }
} }
......
...@@ -457,6 +457,7 @@ sys_call_table: ...@@ -457,6 +457,7 @@ sys_call_table:
.quad sys_mq_timedreceive /* 435 */ .quad sys_mq_timedreceive /* 435 */
.quad sys_mq_notify .quad sys_mq_notify
.quad sys_mq_getsetattr .quad sys_mq_getsetattr
.quad sys_waitid
.size sys_call_table, . - sys_call_table .size sys_call_table, . - sys_call_table
.type sys_call_table, @object .type sys_call_table, @object
......
...@@ -324,7 +324,7 @@ static inline int fls(int word) ...@@ -324,7 +324,7 @@ static inline int fls(int word)
#endif #endif
/* Compute powers of two for the given integer. */ /* Compute powers of two for the given integer. */
static inline int floor_log2(unsigned long word) static inline long floor_log2(unsigned long word)
{ {
#if defined(__alpha_cix__) && defined(__alpha_fix__) #if defined(__alpha_cix__) && defined(__alpha_fix__)
return 63 - __kernel_ctlz(word); return 63 - __kernel_ctlz(word);
...@@ -336,7 +336,7 @@ static inline int floor_log2(unsigned long word) ...@@ -336,7 +336,7 @@ static inline int floor_log2(unsigned long word)
#endif #endif
} }
static inline int ceil_log2(unsigned int word) static inline long ceil_log2(unsigned long word)
{ {
long bit = floor_log2(word); long bit = floor_log2(word);
return bit + (word > (1UL << bit)); return bit + (word > (1UL << bit));
......
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
# define __kernel_extbl(val, shift) __builtin_alpha_extbl(val, shift) # define __kernel_extbl(val, shift) __builtin_alpha_extbl(val, shift)
# define __kernel_extwl(val, shift) __builtin_alpha_extwl(val, shift) # define __kernel_extwl(val, shift) __builtin_alpha_extwl(val, shift)
# define __kernel_cmpbge(a, b) __builtin_alpha_cmpbge(a, b) # define __kernel_cmpbge(a, b) __builtin_alpha_cmpbge(a, b)
# define __kernel_cttz(x) __builtin_ctz(x) # define __kernel_cttz(x) __builtin_ctzl(x)
# define __kernel_ctlz(x) __builtin_clz(x) # define __kernel_ctlz(x) __builtin_clzl(x)
# define __kernel_ctpop(x) __builtin_popcount(x) # define __kernel_ctpop(x) __builtin_popcountl(x)
#else #else
# define __kernel_insbl(val, shift) \ # define __kernel_insbl(val, shift) \
({ unsigned long __kir; \ ({ unsigned long __kir; \
......
...@@ -373,8 +373,9 @@ ...@@ -373,8 +373,9 @@
#define __NR_mq_timedreceive 435 #define __NR_mq_timedreceive 435
#define __NR_mq_notify 436 #define __NR_mq_notify 436
#define __NR_mq_getsetattr 437 #define __NR_mq_getsetattr 437
#define __NR_waitid 438
#define NR_SYSCALLS 438 #define NR_SYSCALLS 439
#if defined(__GNUC__) #if defined(__GNUC__)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment