Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 18 Oct 2010 20:10:36 +0000 (13:10 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 18 Oct 2010 20:10:36 +0000 (13:10 -0700)
* 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus:
  MIPS: Enable ISA_DMA_API config to fix build failure
  MIPS: 32-bit: Fix build failure in asm/fcntl.h
  MIPS: Remove all generated vmlinuz* files on "make clean"
  MIPS: do_sigaltstack() expects userland pointers
  MIPS: Fix error values in case of bad_stack
  MIPS: Sanitize restart logics
  MIPS: secure_computing, syscall audit: syscall number should in r2, not r0.
  MIPS: Don't block signals if we'd failed to setup a sigframe

1  2 
arch/mips/Kconfig
arch/mips/boot/compressed/Makefile
arch/mips/kernel/scall32-o32.S
arch/mips/kernel/scall64-64.S
arch/mips/kernel/scall64-n32.S
arch/mips/kernel/scall64-o32.S

diff --combined arch/mips/Kconfig
@@@ -13,7 -13,6 +13,7 @@@ config MIP
        select HAVE_KPROBES
        select HAVE_KRETPROBES
        select RTC_LIB if !MACH_LOONGSON
 +      select GENERIC_ATOMIC64 if !64BIT
  
  mainmenu "Linux/MIPS Kernel Configuration"
  
@@@ -881,11 -880,15 +881,15 @@@ config NO_IOPOR
  config GENERIC_ISA_DMA
        bool
        select ZONE_DMA if GENERIC_ISA_DMA_SUPPORT_BROKEN=n
+       select ISA_DMA_API
  
  config GENERIC_ISA_DMA_SUPPORT_BROKEN
        bool
        select GENERIC_ISA_DMA
  
+ config ISA_DMA_API
+       bool
  config GENERIC_GPIO
        bool
  
@@@ -1647,16 -1650,8 +1651,16 @@@ config MIPS_MT_SM
        select SYS_SUPPORTS_SMP
        select SMP_UP
        help
 -        This is a kernel model which is also known a VSMP or lately
 -        has been marketesed into SMVP.
 +        This is a kernel model which is known a VSMP but lately has been
 +        marketesed into SMVP.
 +        Virtual SMP uses the processor's VPEs  to implement virtual
 +        processors. In currently available configuration of the 34K processor
 +        this allows for a dual processor. Both processors will share the same
 +        primary caches; each will obtain the half of the TLB for it's own
 +        exclusive use. For a layman this model can be described as similar to
 +        what Intel calls Hyperthreading.
 +
 +        For further information see http://www.linux-mips.org/wiki/34K#VSMP
  
  config MIPS_MT_SMTC
        bool "SMTC: Use all TCs on all VPEs for SMP"
        help
          This is a kernel model which is known a SMTC or lately has been
          marketesed into SMVP.
 +        is presenting the available TC's of the core as processors to Linux.
 +        On currently available 34K processors this means a Linux system will
 +        see up to 5 processors. The implementation of the SMTC kernel differs
 +        significantly from VSMP and cannot efficiently coexist in the same
 +        kernel binary so the choice between VSMP and SMTC is a compile time
 +        decision.
 +
 +        For further information see http://www.linux-mips.org/wiki/34K#SMTC
  
  endchoice
  
@@@ -59,7 -59,7 +59,7 @@@ $(obj)/piggy.o: $(obj)/dummy.o $(obj)/v
  hostprogs-y := calc_vmlinuz_load_addr
  
  VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \
 -              $(objtree)/$(KBUILD_IMAGE) $(VMLINUX_LOAD_ADDRESS))
 +              $(obj)/vmlinux.bin $(VMLINUX_LOAD_ADDRESS))
  
  vmlinuzobjs-y += $(obj)/piggy.o
  
@@@ -105,4 -105,4 +105,4 @@@ OBJCOPYFLAGS_vmlinuz.srec := $(OBJCOPYF
  vmlinuz.srec: vmlinuz
        $(call cmd,objcopy)
  
- clean-files := $(objtree)/vmlinuz.*
+ clean-files := $(objtree)/vmlinuz $(objtree)/vmlinuz.{32,ecoff,bin,srec}
@@@ -63,9 -63,9 +63,9 @@@ stack_done
        sw      t0, PT_R7(sp)           # set error flag
        beqz    t0, 1f
  
+       lw      t1, PT_R2(sp)           # syscall number
        negu    v0                      # error
-       sw      v0, PT_R0(sp)           # set flag for syscall
-                                       # restarting
+       sw      t1, PT_R0(sp)           # save it for syscall restarting
  1:    sw      v0, PT_R2(sp)           # result
  
  o32_syscall_exit:
@@@ -104,9 -104,9 +104,9 @@@ syscall_trace_entry
        sw      t0, PT_R7(sp)           # set error flag
        beqz    t0, 1f
  
+       lw      t1, PT_R2(sp)           # syscall number
        negu    v0                      # error
-       sw      v0, PT_R0(sp)           # set flag for syscall
-                                       # restarting
+       sw      t1, PT_R0(sp)           # save it for syscall restarting
  1:    sw      v0, PT_R2(sp)           # result
  
        j       syscall_exit
@@@ -169,8 -169,7 +169,7 @@@ stackargs
         * We probably should handle this case a bit more drastic.
         */
  bad_stack:
-       negu    v0                              # error
-       sw      v0, PT_R0(sp)
+       li      v0, EFAULT
        sw      v0, PT_R2(sp)
        li      t0, 1                           # set error flag
        sw      t0, PT_R7(sp)
@@@ -583,10 -582,7 +582,10 @@@ einval:  li      v0, -ENOSY
        sys     sys_rt_tgsigqueueinfo   4
        sys     sys_perf_event_open     5
        sys     sys_accept4             4
 -      sys     sys_recvmmsg            5
 +      sys     sys_recvmmsg            5       /* 4335 */
 +      sys     sys_fanotify_init       2
 +      sys     sys_fanotify_mark       6
 +      sys     sys_prlimit64           4
        .endm
  
        /* We pre-compute the number of _instruction_ bytes needed to
@@@ -66,9 -66,9 +66,9 @@@ NESTED(handle_sys64, PT_SIZE, sp
        sd      t0, PT_R7(sp)           # set error flag
        beqz    t0, 1f
  
+       ld      t1, PT_R2(sp)           # syscall number
        dnegu   v0                      # error
-       sd      v0, PT_R0(sp)           # set flag for syscall
-                                       # restarting
+       sd      t1, PT_R0(sp)           # save it for syscall restarting
  1:    sd      v0, PT_R2(sp)           # result
  
  n64_syscall_exit:
@@@ -109,8 -109,9 +109,9 @@@ syscall_trace_entry
        sd      t0, PT_R7(sp)           # set error flag
        beqz    t0, 1f
  
+       ld      t1, PT_R2(sp)           # syscall number
        dnegu   v0                      # error
-       sd      v0, PT_R0(sp)           # set flag for syscall restarting
+       sd      t1, PT_R0(sp)           # save it for syscall restarting
  1:    sd      v0, PT_R2(sp)           # result
  
        j       syscall_exit
@@@ -416,12 -417,9 +417,12 @@@ sys_call_table
        PTR     sys_pipe2
        PTR     sys_inotify_init1
        PTR     sys_preadv
 -      PTR     sys_pwritev                     /* 5390 */
 +      PTR     sys_pwritev                     /* 5290 */
        PTR     sys_rt_tgsigqueueinfo
        PTR     sys_perf_event_open
        PTR     sys_accept4
 -      PTR     sys_recvmmsg
 +      PTR     sys_recvmmsg
 +      PTR     sys_fanotify_init               /* 5295 */
 +      PTR     sys_fanotify_mark
 +      PTR     sys_prlimit64
        .size   sys_call_table,.-sys_call_table
@@@ -65,8 -65,9 +65,9 @@@ NESTED(handle_sysn32, PT_SIZE, sp
        sd      t0, PT_R7(sp)           # set error flag
        beqz    t0, 1f
  
+       ld      t1, PT_R2(sp)           # syscall number
        dnegu   v0                      # error
-       sd      v0, PT_R0(sp)           # set flag for syscall restarting
+       sd      t1, PT_R0(sp)           # save it for syscall restarting
  1:    sd      v0, PT_R2(sp)           # result
  
        local_irq_disable               # make sure need_resched and
@@@ -106,8 -107,9 +107,9 @@@ n32_syscall_trace_entry
        sd      t0, PT_R7(sp)           # set error flag
        beqz    t0, 1f
  
+       ld      t1, PT_R2(sp)           # syscall number
        dnegu   v0                      # error
-       sd      v0, PT_R0(sp)           # set flag for syscall restarting
+       sd      t1, PT_R0(sp)           # save it for syscall restarting
  1:    sd      v0, PT_R2(sp)           # result
  
        j       syscall_exit
@@@ -419,8 -421,5 +421,8 @@@ EXPORT(sysn32_call_table
        PTR     sys_perf_event_open
        PTR     sys_accept4
        PTR     compat_sys_recvmmsg
 -      PTR     sys_getdents
 +      PTR     sys_getdents64
 +      PTR     sys_fanotify_init               /* 6300 */
 +      PTR     sys_fanotify_mark
 +      PTR     sys_prlimit64
        .size   sysn32_call_table,.-sysn32_call_table
@@@ -93,8 -93,9 +93,9 @@@ NESTED(handle_sys, PT_SIZE, sp
        sd      t0, PT_R7(sp)           # set error flag
        beqz    t0, 1f
  
+       ld      t1, PT_R2(sp)           # syscall number
        dnegu   v0                      # error
-       sd      v0, PT_R0(sp)           # flag for syscall restarting
+       sd      t1, PT_R0(sp)           # save it for syscall restarting
  1:    sd      v0, PT_R2(sp)           # result
  
  o32_syscall_exit:
@@@ -142,8 -143,9 +143,9 @@@ trace_a_syscall
        sd      t0, PT_R7(sp)           # set error flag
        beqz    t0, 1f
  
+       ld      t1, PT_R2(sp)           # syscall number
        dnegu   v0                      # error
-       sd      v0, PT_R0(sp)           # set flag for syscall restarting
+       sd      t1, PT_R0(sp)           # save it for syscall restarting
  1:    sd      v0, PT_R2(sp)           # result
  
        j       syscall_exit
         * The stackpointer for a call with more than 4 arguments is bad.
         */
  bad_stack:
-       dnegu   v0                      # error
-       sd      v0, PT_R0(sp)
+       li      v0, EFAULT
        sd      v0, PT_R2(sp)
        li      t0, 1                   # set error flag
        sd      t0, PT_R7(sp)
@@@ -538,8 -539,5 +539,8 @@@ sys_call_table
        PTR     compat_sys_rt_tgsigqueueinfo
        PTR     sys_perf_event_open
        PTR     sys_accept4
 -      PTR     compat_sys_recvmmsg
 +      PTR     compat_sys_recvmmsg             /* 4335 */
 +      PTR     sys_fanotify_init
 +      PTR     sys_32_fanotify_mark
 +      PTR     sys_prlimit64
        .size   sys_call_table,.-sys_call_table