diff options
| -rw-r--r-- | arch/mips/configs/ip27_defconfig | 13 | ||||
| -rw-r--r-- | arch/mips/kernel/binfmt_elfn32.c | 5 | ||||
| -rw-r--r-- | arch/mips/kernel/binfmt_elfo32.c | 5 | ||||
| -rw-r--r-- | arch/mips/kernel/linux32.c | 22 | ||||
| -rw-r--r-- | arch/mips/kernel/scall64-n32.S | 4 | ||||
| -rw-r--r-- | arch/mips/kernel/signal32.c | 74 | ||||
| -rw-r--r-- | arch/mips/kernel/signal_n32.c | 33 | ||||
| -rw-r--r-- | arch/mips/kernel/smp.c | 20 | ||||
| -rw-r--r-- | arch/mips/kernel/traps.c | 4 | ||||
| -rw-r--r-- | arch/mips/mm/cex-sb1.S | 2 | ||||
| -rw-r--r-- | arch/mips/pmc-sierra/yosemite/smp.c | 2 | ||||
| -rw-r--r-- | arch/mips/sibyte/Kconfig | 4 | ||||
| -rw-r--r-- | arch/mips/sibyte/bcm1480/irq.c | 5 | ||||
| -rw-r--r-- | include/asm-mips/uaccess.h | 6 | ||||
| -rw-r--r-- | include/asm-mips/unistd.h | 6 |
15 files changed, 131 insertions, 74 deletions
diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig index e17d3adff021..58c22cd344d3 100644 --- a/arch/mips/configs/ip27_defconfig +++ b/arch/mips/configs/ip27_defconfig | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | # | 1 | # |
| 2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
| 3 | # Linux kernel version: 2.6.15-rc2 | 3 | # Linux kernel version: 2.6.16-rc4 |
| 4 | # Thu Nov 24 01:06:21 2005 | 4 | # Tue Feb 21 13:44:31 2006 |
| 5 | # | 5 | # |
| 6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
| 7 | 7 | ||
| @@ -144,7 +144,6 @@ CONFIG_PREEMPT_BKL=y | |||
| 144 | # Code maturity level options | 144 | # Code maturity level options |
| 145 | # | 145 | # |
| 146 | CONFIG_EXPERIMENTAL=y | 146 | CONFIG_EXPERIMENTAL=y |
| 147 | CONFIG_CLEAN_COMPILE=y | ||
| 148 | CONFIG_LOCK_KERNEL=y | 147 | CONFIG_LOCK_KERNEL=y |
| 149 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 148 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
| 150 | 149 | ||
| @@ -250,6 +249,7 @@ CONFIG_NET=y | |||
| 250 | # | 249 | # |
| 251 | # Networking options | 250 | # Networking options |
| 252 | # | 251 | # |
| 252 | # CONFIG_NETDEBUG is not set | ||
| 253 | CONFIG_PACKET=y | 253 | CONFIG_PACKET=y |
| 254 | CONFIG_PACKET_MMAP=y | 254 | CONFIG_PACKET_MMAP=y |
| 255 | CONFIG_UNIX=y | 255 | CONFIG_UNIX=y |
| @@ -289,6 +289,7 @@ CONFIG_TCP_CONG_BIC=y | |||
| 289 | # SCTP Configuration (EXPERIMENTAL) | 289 | # SCTP Configuration (EXPERIMENTAL) |
| 290 | # | 290 | # |
| 291 | # CONFIG_IP_SCTP is not set | 291 | # CONFIG_IP_SCTP is not set |
| 292 | |||
| 292 | # CONFIG_ATM is not set | 293 | # CONFIG_ATM is not set |
| 293 | # CONFIG_BRIDGE is not set | 294 | # CONFIG_BRIDGE is not set |
| 294 | # CONFIG_VLAN_8021Q is not set | 295 | # CONFIG_VLAN_8021Q is not set |
| @@ -448,7 +449,7 @@ CONFIG_SCSI_SAS_ATTRS=m | |||
| 448 | # | 449 | # |
| 449 | # SCSI low-level drivers | 450 | # SCSI low-level drivers |
| 450 | # | 451 | # |
| 451 | CONFIG_ISCSI_TCP=m | 452 | # CONFIG_ISCSI_TCP is not set |
| 452 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | 453 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set |
| 453 | # CONFIG_SCSI_3W_9XXX is not set | 454 | # CONFIG_SCSI_3W_9XXX is not set |
| 454 | # CONFIG_SCSI_ACARD is not set | 455 | # CONFIG_SCSI_ACARD is not set |
| @@ -774,6 +775,10 @@ CONFIG_USB_ARCH_HAS_OHCI=y | |||
| 774 | # | 775 | # |
| 775 | 776 | ||
| 776 | # | 777 | # |
| 778 | # EDAC - error detection and reporting (RAS) | ||
| 779 | # | ||
| 780 | |||
| 781 | # | ||
| 777 | # File systems | 782 | # File systems |
| 778 | # | 783 | # |
| 779 | CONFIG_EXT2_FS=y | 784 | CONFIG_EXT2_FS=y |
diff --git a/arch/mips/kernel/binfmt_elfn32.c b/arch/mips/kernel/binfmt_elfn32.c index d8e2674a1543..4a9f1ecefaf2 100644 --- a/arch/mips/kernel/binfmt_elfn32.c +++ b/arch/mips/kernel/binfmt_elfn32.c | |||
| @@ -103,8 +103,9 @@ jiffies_to_compat_timeval(unsigned long jiffies, struct compat_timeval *value) | |||
| 103 | * one divide. | 103 | * one divide. |
| 104 | */ | 104 | */ |
| 105 | u64 nsec = (u64)jiffies * TICK_NSEC; | 105 | u64 nsec = (u64)jiffies * TICK_NSEC; |
| 106 | value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &value->tv_usec); | 106 | long rem; |
| 107 | value->tv_usec /= NSEC_PER_USEC; | 107 | value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &rem); |
| 108 | value->tv_usec = rem / NSEC_PER_USEC; | ||
| 108 | } | 109 | } |
| 109 | 110 | ||
| 110 | #define ELF_CORE_EFLAGS EF_MIPS_ABI2 | 111 | #define ELF_CORE_EFLAGS EF_MIPS_ABI2 |
diff --git a/arch/mips/kernel/binfmt_elfo32.c b/arch/mips/kernel/binfmt_elfo32.c index cec5f327e360..e31813779895 100644 --- a/arch/mips/kernel/binfmt_elfo32.c +++ b/arch/mips/kernel/binfmt_elfo32.c | |||
| @@ -105,8 +105,9 @@ jiffies_to_compat_timeval(unsigned long jiffies, struct compat_timeval *value) | |||
| 105 | * one divide. | 105 | * one divide. |
| 106 | */ | 106 | */ |
| 107 | u64 nsec = (u64)jiffies * TICK_NSEC; | 107 | u64 nsec = (u64)jiffies * TICK_NSEC; |
| 108 | value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &value->tv_usec); | 108 | long rem; |
| 109 | value->tv_usec /= NSEC_PER_USEC; | 109 | value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &rem); |
| 110 | value->tv_usec = rem / NSEC_PER_USEC; | ||
| 110 | } | 111 | } |
| 111 | 112 | ||
| 112 | #undef ELF_CORE_COPY_REGS | 113 | #undef ELF_CORE_COPY_REGS |
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index 60353f5acc48..5f68b220c26d 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
| @@ -230,6 +230,9 @@ sysn32_waitid(int which, compat_pid_t pid, | |||
| 230 | long ret; | 230 | long ret; |
| 231 | mm_segment_t old_fs = get_fs(); | 231 | mm_segment_t old_fs = get_fs(); |
| 232 | 232 | ||
| 233 | if (!access_ok(VERIFY_WRITE, uinfo, sizeof(*uinfo))) | ||
| 234 | return -EFAULT; | ||
| 235 | |||
| 233 | set_fs (KERNEL_DS); | 236 | set_fs (KERNEL_DS); |
| 234 | ret = sys_waitid(which, pid, uinfo, options, | 237 | ret = sys_waitid(which, pid, uinfo, options, |
| 235 | uru ? (struct rusage __user *) &ru : NULL); | 238 | uru ? (struct rusage __user *) &ru : NULL); |
| @@ -1450,25 +1453,6 @@ sys32_timer_create(u32 clock, struct sigevent32 __user *se32, timer_t __user *ti | |||
| 1450 | return sys_timer_create(clock, p, timer_id); | 1453 | return sys_timer_create(clock, p, timer_id); |
| 1451 | } | 1454 | } |
| 1452 | 1455 | ||
| 1453 | asmlinkage long | ||
| 1454 | sysn32_rt_sigtimedwait(const sigset_t __user *uthese, | ||
| 1455 | siginfo_t __user *uinfo, | ||
| 1456 | const struct compat_timespec __user *uts32, | ||
| 1457 | size_t sigsetsize) | ||
| 1458 | { | ||
| 1459 | struct timespec __user *uts = NULL; | ||
| 1460 | |||
| 1461 | if (uts32) { | ||
| 1462 | struct timespec ts; | ||
| 1463 | uts = compat_alloc_user_space(sizeof(struct timespec)); | ||
| 1464 | if (get_user(ts.tv_sec, &uts32->tv_sec) || | ||
| 1465 | get_user(ts.tv_nsec, &uts32->tv_nsec) || | ||
| 1466 | copy_to_user (uts, &ts, sizeof (ts))) | ||
| 1467 | return -EFAULT; | ||
| 1468 | } | ||
| 1469 | return sys_rt_sigtimedwait(uthese, uinfo, uts, sigsetsize); | ||
| 1470 | } | ||
| 1471 | |||
| 1472 | save_static_function(sys32_clone); | 1456 | save_static_function(sys32_clone); |
| 1473 | __attribute_used__ noinline static int | 1457 | __attribute_used__ noinline static int |
| 1474 | _sys32_clone(nabi_no_regargs struct pt_regs regs) | 1458 | _sys32_clone(nabi_no_regargs struct pt_regs regs) |
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index bc4980cefc8b..d87b5446fa13 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
| @@ -245,9 +245,9 @@ EXPORT(sysn32_call_table) | |||
| 245 | PTR sys_capget | 245 | PTR sys_capget |
| 246 | PTR sys_capset | 246 | PTR sys_capset |
| 247 | PTR sys32_rt_sigpending /* 6125 */ | 247 | PTR sys32_rt_sigpending /* 6125 */ |
| 248 | PTR sysn32_rt_sigtimedwait | 248 | PTR compat_sys_rt_sigtimedwait |
| 249 | PTR sys_rt_sigqueueinfo | 249 | PTR sys_rt_sigqueueinfo |
| 250 | PTR sys32_rt_sigsuspend | 250 | PTR sysn32_rt_sigsuspend |
| 251 | PTR sys32_sigaltstack | 251 | PTR sys32_sigaltstack |
| 252 | PTR compat_sys_utime /* 6130 */ | 252 | PTR compat_sys_utime /* 6130 */ |
| 253 | PTR sys_mknod | 253 | PTR sys_mknod |
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index 8a8b8dd90417..237cd8a2cd32 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * for more details. | 4 | * for more details. |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 1991, 1992 Linus Torvalds | 6 | * Copyright (C) 1991, 1992 Linus Torvalds |
| 7 | * Copyright (C) 1994 - 2000 Ralf Baechle | 7 | * Copyright (C) 1994 - 2000, 2006 Ralf Baechle |
| 8 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. | 8 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. |
| 9 | */ | 9 | */ |
| 10 | #include <linux/cache.h> | 10 | #include <linux/cache.h> |
| @@ -106,8 +106,6 @@ typedef struct compat_siginfo { | |||
| 106 | 106 | ||
| 107 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | 107 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) |
| 108 | 108 | ||
| 109 | extern int do_signal32(sigset_t *oldset, struct pt_regs *regs); | ||
| 110 | |||
| 111 | /* 32-bit compatibility types */ | 109 | /* 32-bit compatibility types */ |
| 112 | 110 | ||
| 113 | #define _NSIG_BPW32 32 | 111 | #define _NSIG_BPW32 32 |
| @@ -198,7 +196,7 @@ __attribute_used__ noinline static int | |||
| 198 | _sys32_sigsuspend(nabi_no_regargs struct pt_regs regs) | 196 | _sys32_sigsuspend(nabi_no_regargs struct pt_regs regs) |
| 199 | { | 197 | { |
| 200 | compat_sigset_t *uset; | 198 | compat_sigset_t *uset; |
| 201 | sigset_t newset, saveset; | 199 | sigset_t newset; |
| 202 | 200 | ||
| 203 | uset = (compat_sigset_t *) regs.regs[4]; | 201 | uset = (compat_sigset_t *) regs.regs[4]; |
| 204 | if (get_sigset(&newset, uset)) | 202 | if (get_sigset(&newset, uset)) |
| @@ -206,19 +204,15 @@ _sys32_sigsuspend(nabi_no_regargs struct pt_regs regs) | |||
| 206 | sigdelsetmask(&newset, ~_BLOCKABLE); | 204 | sigdelsetmask(&newset, ~_BLOCKABLE); |
| 207 | 205 | ||
| 208 | spin_lock_irq(¤t->sighand->siglock); | 206 | spin_lock_irq(¤t->sighand->siglock); |
| 209 | saveset = current->blocked; | 207 | current->saved_sigmask = current->blocked; |
| 210 | current->blocked = newset; | 208 | current->blocked = newset; |
| 211 | recalc_sigpending(); | 209 | recalc_sigpending(); |
| 212 | spin_unlock_irq(¤t->sighand->siglock); | 210 | spin_unlock_irq(¤t->sighand->siglock); |
| 213 | 211 | ||
| 214 | regs.regs[2] = EINTR; | 212 | current->state = TASK_INTERRUPTIBLE; |
| 215 | regs.regs[7] = 1; | 213 | schedule(); |
| 216 | while (1) { | 214 | set_thread_flag(TIF_RESTORE_SIGMASK); |
| 217 | current->state = TASK_INTERRUPTIBLE; | 215 | return -ERESTARTNOHAND; |
| 218 | schedule(); | ||
| 219 | if (do_signal32(&saveset, ®s)) | ||
| 220 | return -EINTR; | ||
| 221 | } | ||
| 222 | } | 216 | } |
| 223 | 217 | ||
| 224 | save_static_function(sys32_rt_sigsuspend); | 218 | save_static_function(sys32_rt_sigsuspend); |
| @@ -226,8 +220,8 @@ __attribute_used__ noinline static int | |||
| 226 | _sys32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) | 220 | _sys32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) |
| 227 | { | 221 | { |
| 228 | compat_sigset_t *uset; | 222 | compat_sigset_t *uset; |
| 229 | sigset_t newset, saveset; | 223 | sigset_t newset; |
| 230 | size_t sigsetsize; | 224 | size_t sigsetsize; |
| 231 | 225 | ||
| 232 | /* XXX Don't preclude handling different sized sigset_t's. */ | 226 | /* XXX Don't preclude handling different sized sigset_t's. */ |
| 233 | sigsetsize = regs.regs[5]; | 227 | sigsetsize = regs.regs[5]; |
| @@ -240,19 +234,15 @@ _sys32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) | |||
| 240 | sigdelsetmask(&newset, ~_BLOCKABLE); | 234 | sigdelsetmask(&newset, ~_BLOCKABLE); |
| 241 | 235 | ||
| 242 | spin_lock_irq(¤t->sighand->siglock); | 236 | spin_lock_irq(¤t->sighand->siglock); |
| 243 | saveset = current->blocked; | 237 | current->saved_sigmask = current->blocked; |
| 244 | current->blocked = newset; | 238 | current->blocked = newset; |
| 245 | recalc_sigpending(); | 239 | recalc_sigpending(); |
| 246 | spin_unlock_irq(¤t->sighand->siglock); | 240 | spin_unlock_irq(¤t->sighand->siglock); |
| 247 | 241 | ||
| 248 | regs.regs[2] = EINTR; | 242 | current->state = TASK_INTERRUPTIBLE; |
| 249 | regs.regs[7] = 1; | 243 | schedule(); |
| 250 | while (1) { | 244 | set_thread_flag(TIF_RESTORE_SIGMASK); |
| 251 | current->state = TASK_INTERRUPTIBLE; | 245 | return -ERESTARTNOHAND; |
| 252 | schedule(); | ||
| 253 | if (do_signal32(&saveset, ®s)) | ||
| 254 | return -EINTR; | ||
| 255 | } | ||
| 256 | } | 246 | } |
| 257 | 247 | ||
| 258 | asmlinkage int sys32_sigaction(int sig, const struct sigaction32 *act, | 248 | asmlinkage int sys32_sigaction(int sig, const struct sigaction32 *act, |
| @@ -783,7 +773,7 @@ static inline int handle_signal(unsigned long sig, siginfo_t *info, | |||
| 783 | regs->regs[2] = EINTR; | 773 | regs->regs[2] = EINTR; |
| 784 | break; | 774 | break; |
| 785 | case ERESTARTSYS: | 775 | case ERESTARTSYS: |
| 786 | if(!(ka->sa.sa_flags & SA_RESTART)) { | 776 | if (!(ka->sa.sa_flags & SA_RESTART)) { |
| 787 | regs->regs[2] = EINTR; | 777 | regs->regs[2] = EINTR; |
| 788 | break; | 778 | break; |
| 789 | } | 779 | } |
| @@ -810,9 +800,10 @@ static inline int handle_signal(unsigned long sig, siginfo_t *info, | |||
| 810 | return ret; | 800 | return ret; |
| 811 | } | 801 | } |
| 812 | 802 | ||
| 813 | int do_signal32(sigset_t *oldset, struct pt_regs *regs) | 803 | void do_signal32(struct pt_regs *regs) |
| 814 | { | 804 | { |
| 815 | struct k_sigaction ka; | 805 | struct k_sigaction ka; |
| 806 | sigset_t *oldset; | ||
| 816 | siginfo_t info; | 807 | siginfo_t info; |
| 817 | int signr; | 808 | int signr; |
| 818 | 809 | ||
| @@ -822,17 +813,30 @@ int do_signal32(sigset_t *oldset, struct pt_regs *regs) | |||
| 822 | * if so. | 813 | * if so. |
| 823 | */ | 814 | */ |
| 824 | if (!user_mode(regs)) | 815 | if (!user_mode(regs)) |
| 825 | return 1; | 816 | return; |
| 826 | 817 | ||
| 827 | if (try_to_freeze()) | 818 | if (try_to_freeze()) |
| 828 | goto no_signal; | 819 | goto no_signal; |
| 829 | 820 | ||
| 830 | if (!oldset) | 821 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) |
| 822 | oldset = ¤t->saved_sigmask; | ||
| 823 | else | ||
| 831 | oldset = ¤t->blocked; | 824 | oldset = ¤t->blocked; |
| 832 | 825 | ||
| 833 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 826 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
| 834 | if (signr > 0) | 827 | if (signr > 0) { |
| 835 | return handle_signal(signr, &info, &ka, oldset, regs); | 828 | /* Whee! Actually deliver the signal. */ |
| 829 | if (handle_signal(signr, &info, &ka, oldset, regs) == 0) { | ||
| 830 | /* | ||
| 831 | * A signal was successfully delivered; the saved | ||
| 832 | * sigmask will have been stored in the signal frame, | ||
| 833 | * and will be restored by sigreturn, so we can simply | ||
| 834 | * clear the TIF_RESTORE_SIGMASK flag. | ||
| 835 | */ | ||
| 836 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
| 837 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
| 838 | } | ||
| 839 | } | ||
| 836 | 840 | ||
| 837 | no_signal: | 841 | no_signal: |
| 838 | /* | 842 | /* |
| @@ -853,7 +857,15 @@ no_signal: | |||
| 853 | regs->cp0_epc -= 4; | 857 | regs->cp0_epc -= 4; |
| 854 | } | 858 | } |
| 855 | } | 859 | } |
| 856 | return 0; | 860 | |
| 861 | /* | ||
| 862 | * If there's no signal to deliver, we just put the saved sigmask | ||
| 863 | * back | ||
| 864 | */ | ||
| 865 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) { | ||
| 866 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
| 867 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); | ||
| 868 | } | ||
| 857 | } | 869 | } |
| 858 | 870 | ||
| 859 | asmlinkage int sys32_rt_sigaction(int sig, const struct sigaction32 *act, | 871 | asmlinkage int sys32_rt_sigaction(int sig, const struct sigaction32 *act, |
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c index 5a3776096f07..3e168c08a3a8 100644 --- a/arch/mips/kernel/signal_n32.c +++ b/arch/mips/kernel/signal_n32.c | |||
| @@ -81,6 +81,39 @@ struct rt_sigframe_n32 { | |||
| 81 | #endif | 81 | #endif |
| 82 | }; | 82 | }; |
| 83 | 83 | ||
| 84 | extern void sigset_from_compat (sigset_t *set, compat_sigset_t *compat); | ||
| 85 | |||
| 86 | save_static_function(sysn32_rt_sigsuspend); | ||
| 87 | __attribute_used__ noinline static int | ||
| 88 | _sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) | ||
| 89 | { | ||
| 90 | compat_sigset_t __user *unewset, uset; | ||
| 91 | size_t sigsetsize; | ||
| 92 | sigset_t newset; | ||
| 93 | |||
| 94 | /* XXX Don't preclude handling different sized sigset_t's. */ | ||
| 95 | sigsetsize = regs.regs[5]; | ||
| 96 | if (sigsetsize != sizeof(sigset_t)) | ||
| 97 | return -EINVAL; | ||
| 98 | |||
| 99 | unewset = (compat_sigset_t __user *) regs.regs[4]; | ||
| 100 | if (copy_from_user(&uset, unewset, sizeof(uset))) | ||
| 101 | return -EFAULT; | ||
| 102 | sigset_from_compat (&newset, &uset); | ||
| 103 | sigdelsetmask(&newset, ~_BLOCKABLE); | ||
| 104 | |||
| 105 | spin_lock_irq(¤t->sighand->siglock); | ||
| 106 | current->saved_sigmask = current->blocked; | ||
| 107 | current->blocked = newset; | ||
| 108 | recalc_sigpending(); | ||
| 109 | spin_unlock_irq(¤t->sighand->siglock); | ||
| 110 | |||
| 111 | current->state = TASK_INTERRUPTIBLE; | ||
| 112 | schedule(); | ||
| 113 | set_thread_flag(TIF_RESTORE_SIGMASK); | ||
| 114 | return -ERESTARTNOHAND; | ||
| 115 | } | ||
| 116 | |||
| 84 | save_static_function(sysn32_rt_sigreturn); | 117 | save_static_function(sysn32_rt_sigreturn); |
| 85 | __attribute_used__ noinline static void | 118 | __attribute_used__ noinline static void |
| 86 | _sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | 119 | _sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) |
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index 25472fcaf715..5e189862e523 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #include <linux/timex.h> | 29 | #include <linux/timex.h> |
| 30 | #include <linux/sched.h> | 30 | #include <linux/sched.h> |
| 31 | #include <linux/cpumask.h> | 31 | #include <linux/cpumask.h> |
| 32 | #include <linux/cpu.h> | ||
| 32 | 33 | ||
| 33 | #include <asm/atomic.h> | 34 | #include <asm/atomic.h> |
| 34 | #include <asm/cpu.h> | 35 | #include <asm/cpu.h> |
| @@ -424,6 +425,25 @@ void flush_tlb_one(unsigned long vaddr) | |||
| 424 | local_flush_tlb_one(vaddr); | 425 | local_flush_tlb_one(vaddr); |
| 425 | } | 426 | } |
| 426 | 427 | ||
| 428 | static DEFINE_PER_CPU(struct cpu, cpu_devices); | ||
| 429 | |||
| 430 | static int __init topology_init(void) | ||
| 431 | { | ||
| 432 | int cpu; | ||
| 433 | int ret; | ||
| 434 | |||
| 435 | for_each_cpu(cpu) { | ||
| 436 | ret = register_cpu(&per_cpu(cpu_devices, cpu), cpu, NULL); | ||
| 437 | if (ret) | ||
| 438 | printk(KERN_WARNING "topology_init: register_cpu %d " | ||
| 439 | "failed (%d)\n", cpu, ret); | ||
| 440 | } | ||
| 441 | |||
| 442 | return 0; | ||
| 443 | } | ||
| 444 | |||
| 445 | subsys_initcall(topology_init); | ||
| 446 | |||
| 427 | EXPORT_SYMBOL(flush_tlb_page); | 447 | EXPORT_SYMBOL(flush_tlb_page); |
| 428 | EXPORT_SYMBOL(flush_tlb_one); | 448 | EXPORT_SYMBOL(flush_tlb_one); |
| 429 | EXPORT_SYMBOL(cpu_data); | 449 | EXPORT_SYMBOL(cpu_data); |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index c9d2b5147ca3..005debbfbe84 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
| 4 | * for more details. | 4 | * for more details. |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 1994 - 1999, 2000, 01 Ralf Baechle | 6 | * Copyright (C) 1994 - 1999, 2000, 01, 06 Ralf Baechle |
| 7 | * Copyright (C) 1995, 1996 Paul M. Antoine | 7 | * Copyright (C) 1995, 1996 Paul M. Antoine |
| 8 | * Copyright (C) 1998 Ulf Carlsson | 8 | * Copyright (C) 1998 Ulf Carlsson |
| 9 | * Copyright (C) 1999 Silicon Graphics, Inc. | 9 | * Copyright (C) 1999 Silicon Graphics, Inc. |
| @@ -548,6 +548,8 @@ asmlinkage void do_ov(struct pt_regs *regs) | |||
| 548 | { | 548 | { |
| 549 | siginfo_t info; | 549 | siginfo_t info; |
| 550 | 550 | ||
| 551 | die_if_kernel("Integer overflow", regs); | ||
| 552 | |||
| 551 | info.si_code = FPE_INTOVF; | 553 | info.si_code = FPE_INTOVF; |
| 552 | info.si_signo = SIGFPE; | 554 | info.si_signo = SIGFPE; |
| 553 | info.si_errno = 0; | 555 | info.si_errno = 0; |
diff --git a/arch/mips/mm/cex-sb1.S b/arch/mips/mm/cex-sb1.S index 0e71580774ff..e54a62f2807c 100644 --- a/arch/mips/mm/cex-sb1.S +++ b/arch/mips/mm/cex-sb1.S | |||
| @@ -64,7 +64,7 @@ LEAF(except_vec2_sb1) | |||
| 64 | sd k0,0x170($0) | 64 | sd k0,0x170($0) |
| 65 | sd k1,0x178($0) | 65 | sd k1,0x178($0) |
| 66 | 66 | ||
| 67 | #if CONFIG_SB1_CEX_ALWAYS_FATAL | 67 | #ifdef CONFIG_SB1_CEX_ALWAYS_FATAL |
| 68 | j handle_vec2_sb1 | 68 | j handle_vec2_sb1 |
| 69 | nop | 69 | nop |
| 70 | #else | 70 | #else |
diff --git a/arch/mips/pmc-sierra/yosemite/smp.c b/arch/mips/pmc-sierra/yosemite/smp.c index f17f575f58f0..7f8fda962190 100644 --- a/arch/mips/pmc-sierra/yosemite/smp.c +++ b/arch/mips/pmc-sierra/yosemite/smp.c | |||
| @@ -94,7 +94,7 @@ void __init prom_prepare_cpus(unsigned int max_cpus) | |||
| 94 | void prom_boot_secondary(int cpu, struct task_struct *idle) | 94 | void prom_boot_secondary(int cpu, struct task_struct *idle) |
| 95 | { | 95 | { |
| 96 | unsigned long gp = (unsigned long) task_thread_info(idle); | 96 | unsigned long gp = (unsigned long) task_thread_info(idle); |
| 97 | unsigned long sp = __KSTK_TOP(idle); | 97 | unsigned long sp = __KSTK_TOS(idle); |
| 98 | 98 | ||
| 99 | secondary_sp = sp; | 99 | secondary_sp = sp; |
| 100 | secondary_gp = gp; | 100 | secondary_gp = gp; |
diff --git a/arch/mips/sibyte/Kconfig b/arch/mips/sibyte/Kconfig index de46f62ac462..816aee7fcd25 100644 --- a/arch/mips/sibyte/Kconfig +++ b/arch/mips/sibyte/Kconfig | |||
| @@ -102,11 +102,11 @@ config SIMULATION | |||
| 102 | Build a kernel suitable for running under the GDB simulator. | 102 | Build a kernel suitable for running under the GDB simulator. |
| 103 | Primarily adjusts the kernel's notion of time. | 103 | Primarily adjusts the kernel's notion of time. |
| 104 | 104 | ||
| 105 | config CONFIG_SB1_CEX_ALWAYS_FATAL | 105 | config SB1_CEX_ALWAYS_FATAL |
| 106 | bool "All cache exceptions considered fatal (no recovery attempted)" | 106 | bool "All cache exceptions considered fatal (no recovery attempted)" |
| 107 | depends on SIBYTE_SB1xxx_SOC | 107 | depends on SIBYTE_SB1xxx_SOC |
| 108 | 108 | ||
| 109 | config CONFIG_SB1_CERR_STALL | 109 | config SB1_CERR_STALL |
| 110 | bool "Stall (rather than panic) on fatal cache error" | 110 | bool "Stall (rather than panic) on fatal cache error" |
| 111 | depends on SIBYTE_SB1xxx_SOC | 111 | depends on SIBYTE_SB1xxx_SOC |
| 112 | 112 | ||
diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c index b2a1ba5d23df..9cf7d713b13c 100644 --- a/arch/mips/sibyte/bcm1480/irq.c +++ b/arch/mips/sibyte/bcm1480/irq.c | |||
| @@ -139,7 +139,7 @@ void bcm1480_unmask_irq(int cpu, int irq) | |||
| 139 | #ifdef CONFIG_SMP | 139 | #ifdef CONFIG_SMP |
| 140 | static void bcm1480_set_affinity(unsigned int irq, cpumask_t mask) | 140 | static void bcm1480_set_affinity(unsigned int irq, cpumask_t mask) |
| 141 | { | 141 | { |
| 142 | int i = 0, old_cpu, cpu, int_on; | 142 | int i = 0, old_cpu, cpu, int_on, k; |
| 143 | u64 cur_ints; | 143 | u64 cur_ints; |
| 144 | irq_desc_t *desc = irq_desc + irq; | 144 | irq_desc_t *desc = irq_desc + irq; |
| 145 | unsigned long flags; | 145 | unsigned long flags; |
| @@ -165,7 +165,6 @@ static void bcm1480_set_affinity(unsigned int irq, cpumask_t mask) | |||
| 165 | irq_dirty -= BCM1480_NR_IRQS_HALF; | 165 | irq_dirty -= BCM1480_NR_IRQS_HALF; |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | int k; | ||
| 169 | for (k=0; k<2; k++) { /* Loop through high and low interrupt mask register */ | 168 | for (k=0; k<2; k++) { /* Loop through high and low interrupt mask register */ |
| 170 | cur_ints = ____raw_readq(IOADDR(A_BCM1480_IMR_MAPPER(old_cpu) + R_BCM1480_IMR_INTERRUPT_MASK_H + (k*BCM1480_IMR_HL_SPACING))); | 169 | cur_ints = ____raw_readq(IOADDR(A_BCM1480_IMR_MAPPER(old_cpu) + R_BCM1480_IMR_INTERRUPT_MASK_H + (k*BCM1480_IMR_HL_SPACING))); |
| 171 | int_on = !(cur_ints & (((u64) 1) << irq_dirty)); | 170 | int_on = !(cur_ints & (((u64) 1) << irq_dirty)); |
| @@ -216,6 +215,7 @@ static void ack_bcm1480_irq(unsigned int irq) | |||
| 216 | { | 215 | { |
| 217 | u64 pending; | 216 | u64 pending; |
| 218 | unsigned int irq_dirty; | 217 | unsigned int irq_dirty; |
| 218 | int k; | ||
| 219 | 219 | ||
| 220 | /* | 220 | /* |
| 221 | * If the interrupt was an HT interrupt, now is the time to | 221 | * If the interrupt was an HT interrupt, now is the time to |
| @@ -227,7 +227,6 @@ static void ack_bcm1480_irq(unsigned int irq) | |||
| 227 | if ((irq_dirty >= BCM1480_NR_IRQS_HALF) && (irq_dirty <= BCM1480_NR_IRQS)) { | 227 | if ((irq_dirty >= BCM1480_NR_IRQS_HALF) && (irq_dirty <= BCM1480_NR_IRQS)) { |
| 228 | irq_dirty -= BCM1480_NR_IRQS_HALF; | 228 | irq_dirty -= BCM1480_NR_IRQS_HALF; |
| 229 | } | 229 | } |
| 230 | int k; | ||
| 231 | for (k=0; k<2; k++) { /* Loop through high and low LDT interrupts */ | 230 | for (k=0; k<2; k++) { /* Loop through high and low LDT interrupts */ |
| 232 | pending = __raw_readq(IOADDR(A_BCM1480_IMR_REGISTER(bcm1480_irq_owner[irq], | 231 | pending = __raw_readq(IOADDR(A_BCM1480_IMR_REGISTER(bcm1480_irq_owner[irq], |
| 233 | R_BCM1480_IMR_LDT_INTERRUPT_H + (k*BCM1480_IMR_HL_SPACING)))); | 232 | R_BCM1480_IMR_LDT_INTERRUPT_H + (k*BCM1480_IMR_HL_SPACING)))); |
diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h index 7a553e9d44d3..b96f3e0f3933 100644 --- a/include/asm-mips/uaccess.h +++ b/include/asm-mips/uaccess.h | |||
| @@ -233,7 +233,7 @@ do { \ | |||
| 233 | #define __get_user_check(x,ptr,size) \ | 233 | #define __get_user_check(x,ptr,size) \ |
| 234 | ({ \ | 234 | ({ \ |
| 235 | long __gu_err = -EFAULT; \ | 235 | long __gu_err = -EFAULT; \ |
| 236 | const void __user * __gu_ptr = (ptr); \ | 236 | const __typeof__(*(ptr)) __user * __gu_ptr = (ptr); \ |
| 237 | \ | 237 | \ |
| 238 | if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) \ | 238 | if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) \ |
| 239 | __get_user_common((x), size, __gu_ptr); \ | 239 | __get_user_common((x), size, __gu_ptr); \ |
| @@ -258,7 +258,7 @@ do { \ | |||
| 258 | : "=r" (__gu_err), "=r" (__gu_tmp) \ | 258 | : "=r" (__gu_err), "=r" (__gu_tmp) \ |
| 259 | : "0" (0), "o" (__m(addr)), "i" (-EFAULT)); \ | 259 | : "0" (0), "o" (__m(addr)), "i" (-EFAULT)); \ |
| 260 | \ | 260 | \ |
| 261 | (val) = (__typeof__(val)) __gu_tmp; \ | 261 | (val) = (__typeof__(*(addr))) __gu_tmp; \ |
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | /* | 264 | /* |
| @@ -284,7 +284,7 @@ do { \ | |||
| 284 | " .previous \n" \ | 284 | " .previous \n" \ |
| 285 | : "=r" (__gu_err), "=&r" (__gu_tmp) \ | 285 | : "=r" (__gu_err), "=&r" (__gu_tmp) \ |
| 286 | : "0" (0), "r" (addr), "i" (-EFAULT)); \ | 286 | : "0" (0), "r" (addr), "i" (-EFAULT)); \ |
| 287 | (val) = __gu_tmp; \ | 287 | (val) = (__typeof__(*(addr))) __gu_tmp; \ |
| 288 | } | 288 | } |
| 289 | 289 | ||
| 290 | /* | 290 | /* |
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index 769305d20108..b5c78a4a0192 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h | |||
| @@ -313,7 +313,7 @@ | |||
| 313 | #define __NR_mknodat (__NR_Linux + 290) | 313 | #define __NR_mknodat (__NR_Linux + 290) |
| 314 | #define __NR_fchownat (__NR_Linux + 291) | 314 | #define __NR_fchownat (__NR_Linux + 291) |
| 315 | #define __NR_futimesat (__NR_Linux + 292) | 315 | #define __NR_futimesat (__NR_Linux + 292) |
| 316 | #define __NR_newfstatat (__NR_Linux + 293) | 316 | #define __NR_fstatat (__NR_Linux + 293) |
| 317 | #define __NR_unlinkat (__NR_Linux + 294) | 317 | #define __NR_unlinkat (__NR_Linux + 294) |
| 318 | #define __NR_renameat (__NR_Linux + 295) | 318 | #define __NR_renameat (__NR_Linux + 295) |
| 319 | #define __NR_linkat (__NR_Linux + 296) | 319 | #define __NR_linkat (__NR_Linux + 296) |
| @@ -593,7 +593,7 @@ | |||
| 593 | #define __NR_mknodat (__NR_Linux + 249) | 593 | #define __NR_mknodat (__NR_Linux + 249) |
| 594 | #define __NR_fchownat (__NR_Linux + 250) | 594 | #define __NR_fchownat (__NR_Linux + 250) |
| 595 | #define __NR_futimesat (__NR_Linux + 251) | 595 | #define __NR_futimesat (__NR_Linux + 251) |
| 596 | #define __NR_newfstatat (__NR_Linux + 252) | 596 | #define __NR_fstatat (__NR_Linux + 252) |
| 597 | #define __NR_unlinkat (__NR_Linux + 253) | 597 | #define __NR_unlinkat (__NR_Linux + 253) |
| 598 | #define __NR_renameat (__NR_Linux + 254) | 598 | #define __NR_renameat (__NR_Linux + 254) |
| 599 | #define __NR_linkat (__NR_Linux + 255) | 599 | #define __NR_linkat (__NR_Linux + 255) |
| @@ -877,7 +877,7 @@ | |||
| 877 | #define __NR_mknodat (__NR_Linux + 253) | 877 | #define __NR_mknodat (__NR_Linux + 253) |
| 878 | #define __NR_fchownat (__NR_Linux + 254) | 878 | #define __NR_fchownat (__NR_Linux + 254) |
| 879 | #define __NR_futimesat (__NR_Linux + 255) | 879 | #define __NR_futimesat (__NR_Linux + 255) |
| 880 | #define __NR_newfstatat (__NR_Linux + 256) | 880 | #define __NR_fstatat (__NR_Linux + 256) |
| 881 | #define __NR_unlinkat (__NR_Linux + 257) | 881 | #define __NR_unlinkat (__NR_Linux + 257) |
| 882 | #define __NR_renameat (__NR_Linux + 258) | 882 | #define __NR_renameat (__NR_Linux + 258) |
| 883 | #define __NR_linkat (__NR_Linux + 259) | 883 | #define __NR_linkat (__NR_Linux + 259) |
