Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 2 Mar 2013 15:44:16 +0000 (07:44 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 2 Mar 2013 15:44:16 +0000 (07:44 -0800)
Pull MIPS updates from Ralf Baechle:

 o Add basic support for the Mediatek/Ralink Wireless SoC family.

 o The Qualcomm Atheros platform is extended by support for the new
   QCA955X SoC series as well as a bunch of patches that get the code
   ready for OF support.

 o Lantiq and BCM47XX platform have a few improvements and bug fixes.

 o MIPS has sent a few patches that get the kernel ready for the
   upcoming microMIPS support.

 o The rest of the series is made up of small bug fixes and cleanups
   that relate to various parts of the MIPS code.  The biggy in there is
   a whitespace cleanup.  After I was sent another set of whitespace
   cleanup patches I decided it was the time to clean the whitespace
   "issues" for once and and that touches many files below arch/mips/.

Fix up silly conflicts, mostly due to whitespace cleanups.

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (105 commits)
  MIPS: Quit exporting kernel internel break codes to uapi/asm/break.h
  MIPS: remove broken conditional inside vpe loader code
  MIPS: SMTC: fix implicit declaration of set_vi_handler
  MIPS: early_printk: drop __init annotations
  MIPS: Probe for and report hardware virtualization support.
  MIPS: ath79: add support for the Qualcomm Atheros AP136-010 board
  MIPS: ath79: add USB controller registration code for the QCA955X SoCs
  MIPS: ath79: add PCI controller registration code for the QCA955X SoCs
  MIPS: ath79: add WMAC registration code for the QCA955X SoCs
  MIPS: ath79: register UART for the QCA955X SoCs
  MIPS: ath79: add QCA955X specific glue to ath79_device_reset_{set, clear}
  MIPS: ath79: add GPIO setup code for the QCA955X SoCs
  MIPS: ath79: add IRQ handling code for the QCA955X SoCs
  MIPS: ath79: add clock setup code for the QCA955X SoCs
  MIPS: ath79: add SoC detection code for the QCA955X SoCs
  MIPS: ath79: add early printk support for the QCA955X SoCs
  MIPS: ath79: fix WMAC IRQ resource assignment
  mips: reserve elfcorehdr
  mips: Make sure kernel memory is in iomem
  MIPS: ath79: use dynamically allocated USB platform devices
  ...

23 files changed:
1  2 
arch/mips/Kconfig
arch/mips/cavium-octeon/executive/cvmx-helper-util.c
arch/mips/include/asm/compat.h
arch/mips/include/asm/octeon/cvmx-helper-util.h
arch/mips/include/uapi/asm/signal.h
arch/mips/kernel/kprobes.c
arch/mips/kernel/linux32.c
arch/mips/kernel/process.c
arch/mips/kernel/rtlx.c
arch/mips/kernel/scall32-o32.S
arch/mips/kernel/scall64-64.S
arch/mips/kernel/scall64-n32.S
arch/mips/kernel/scall64-o32.S
arch/mips/kernel/signal.c
arch/mips/kernel/signal32.c
arch/mips/kernel/signal_n32.c
arch/mips/kernel/syscall.c
arch/mips/kernel/traps.c
arch/mips/kernel/vpe.c
arch/mips/pci/pci-lantiq.c
arch/mips/sni/a20r.c
drivers/net/ethernet/broadcom/bgmac.c
drivers/tty/serial/Kconfig

@@@ -385,18 -387,9 +389,8 @@@ config NXP_STB22
        help
         Support for NXP Semiconductors STB225 Development Board.
  
- config PNX8550_JBS
-       bool "NXP PNX8550 based JBS board"
-       select PNX8550
-       select SYS_SUPPORTS_LITTLE_ENDIAN
- config PNX8550_STB810
-       bool "NXP PNX8550 based STB810 board"
-       select PNX8550
-       select SYS_SUPPORTS_LITTLE_ENDIAN
  config PMC_MSP
        bool "PMC-Sierra MSP chipsets"
 -      depends on EXPERIMENTAL
        select CEVT_R4K
        select CSRC_R4K
        select DMA_NONCOHERENT
@@@ -172,11 -172,11 +172,11 @@@ int cvmx_helper_dump_packet(cvmx_wqe_t 
   *
   * @queue:  Input queue to setup RED on (0-7)
   * @pass_thresh:
-  *               Packets will begin slowly dropping when there are less than
-  *               this many packet buffers free in FPA 0.
+  *             Packets will begin slowly dropping when there are less than
+  *             this many packet buffers free in FPA 0.
   * @drop_thresh:
-  *               All incoming packets will be dropped when there are less
-  *               than this many free packet buffers in FPA 0.
 - *             All incomming packets will be dropped when there are less
++ *             All incoming packets will be dropped when there are less
+  *             than this many free packet buffers in FPA 0.
   * Returns Zero on success. Negative on failure
   */
  int cvmx_helper_setup_red_queue(int queue, int pass_thresh, int drop_thresh)
   * Setup Random Early Drop to automatically begin dropping packets.
   *
   * @pass_thresh:
-  *               Packets will begin slowly dropping when there are less than
-  *               this many packet buffers free in FPA 0.
+  *             Packets will begin slowly dropping when there are less than
+  *             this many packet buffers free in FPA 0.
   * @drop_thresh:
-  *               All incoming packets will be dropped when there are less
-  *               than this many free packet buffers in FPA 0.
 - *             All incomming packets will be dropped when there are less
++ *             All incoming packets will be dropped when there are less
+  *             than this many free packet buffers in FPA 0.
   * Returns Zero on success. Negative on failure
   */
  int cvmx_helper_setup_red(int pass_thresh, int drop_thresh)
Simple merge
@@@ -57,11 -57,11 +57,11 @@@ extern int cvmx_helper_dump_packet(cvmx
   *
   * @queue:  Input queue to setup RED on (0-7)
   * @pass_thresh:
-  *               Packets will begin slowly dropping when there are less than
-  *               this many packet buffers free in FPA 0.
+  *             Packets will begin slowly dropping when there are less than
+  *             this many packet buffers free in FPA 0.
   * @drop_thresh:
-  *               All incoming packets will be dropped when there are less
-  *               than this many free packet buffers in FPA 0.
 - *             All incomming packets will be dropped when there are less
++ *             All incoming packets will be dropped when there are less
+  *             than this many free packet buffers in FPA 0.
   * Returns Zero on success. Negative on failure
   */
  extern int cvmx_helper_setup_red_queue(int queue, int pass_thresh,
   * Setup Random Early Drop to automatically begin dropping packets.
   *
   * @pass_thresh:
-  *               Packets will begin slowly dropping when there are less than
-  *               this many packet buffers free in FPA 0.
+  *             Packets will begin slowly dropping when there are less than
+  *             this many packet buffers free in FPA 0.
   * @drop_thresh:
-  *               All incoming packets will be dropped when there are less
-  *               than this many free packet buffers in FPA 0.
 - *             All incomming packets will be dropped when there are less
++ *             All incoming packets will be dropped when there are less
+  *             than this many free packet buffers in FPA 0.
   * Returns Zero on success. Negative on failure
   */
  extern int cvmx_helper_setup_red(int pass_thresh, int drop_thresh);
Simple merge
@@@ -614,11 -614,11 +614,11 @@@ static int __kprobes trampoline_probe_h
         * We can handle this because:
         *     - instances are always inserted at the head of the list
         *     - when multiple return probes are registered for the same
-        *       function, the first instance's ret_addr will point to the
-        *       real return address, and all the rest will point to
-        *       kretprobe_trampoline
+        *       function, the first instance's ret_addr will point to the
+        *       real return address, and all the rest will point to
+        *       kretprobe_trampoline
         */
 -      hlist_for_each_entry_safe(ri, node, tmp, head, hlist) {
 +      hlist_for_each_entry_safe(ri, tmp, head, hlist) {
                if (ri->task != current)
                        /* another task is sharing our hash bucket */
                        continue;
@@@ -276,9 -292,30 +276,9 @@@ asmlinkage long sys32_fallocate(int fd
        unsigned offset_a3, unsigned len_a4, unsigned len_a5)
  {
        return sys_fallocate(fd, mode, merge_64(offset_a2, offset_a3),
-                            merge_64(len_a4, len_a5));
+                            merge_64(len_a4, len_a5));
  }
  
 -save_static_function(sys32_clone);
 -static int noinline __used
 -_sys32_clone(nabi_no_regargs struct pt_regs regs)
 -{
 -      unsigned long clone_flags;
 -      unsigned long newsp;
 -      int __user *parent_tidptr, *child_tidptr;
 -
 -      clone_flags = regs.regs[4];
 -      newsp = regs.regs[5];
 -      if (!newsp)
 -              newsp = regs.regs[29];
 -      parent_tidptr = (int __user *) regs.regs[6];
 -
 -      /* Use __dummy4 instead of getting it off the stack, so that
 -         syscall() works.  */
 -      child_tidptr = (int __user *) __dummy4;
 -      return do_fork(clone_flags, newsp, 0,
 -                     parent_tidptr, child_tidptr);
 -}
 -
  asmlinkage long sys32_lookup_dcookie(u32 a0, u32 a1, char __user *buf,
        size_t len)
  {
@@@ -154,10 -154,9 +154,10 @@@ int copy_thread(unsigned long clone_fla
                return 0;
        }
        *childregs = *regs;
-       childregs->regs[7] = 0; /* Clear error flag */
-       childregs->regs[2] = 0; /* Child gets zero as return value */
+       childregs->regs[7] = 0; /* Clear error flag */
+       childregs->regs[2] = 0; /* Child gets zero as return value */
 -      childregs->regs[29] = usp;
 +      if (usp)
 +              childregs->regs[29] = usp;
        ti->addr_limit = USER_DS;
  
        p->thread.reg29 = (unsigned long) childregs;
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -357,7 -357,7 +357,7 @@@ sys_call_table
        PTR     sys_sched_yield
        PTR     sys_sched_get_priority_max
        PTR     sys_sched_get_priority_min
-       PTR     compat_sys_sched_rr_get_interval        /* 4165 */
 -      PTR     sys_32_sched_rr_get_interval    /* 4165 */
++      PTR     compat_sys_sched_rr_get_interval        /* 4165 */
        PTR     compat_sys_nanosleep
        PTR     sys_mremap
        PTR     sys_accept
        PTR     sys_getresgid
        PTR     sys_prctl
        PTR     sys32_rt_sigreturn
 -      PTR     sys_32_rt_sigaction
 -      PTR     sys_32_rt_sigprocmask           /* 4195 */
 -      PTR     sys_32_rt_sigpending
 +      PTR     compat_sys_rt_sigaction
-       PTR     compat_sys_rt_sigprocmask       /* 4195 */
++      PTR     compat_sys_rt_sigprocmask       /* 4195 */
 +      PTR     compat_sys_rt_sigpending
        PTR     compat_sys_rt_sigtimedwait
 -      PTR     sys_32_rt_sigqueueinfo
 -      PTR     sys32_rt_sigsuspend
 +      PTR     compat_sys_rt_sigqueueinfo
 +      PTR     compat_sys_rt_sigsuspend
        PTR     sys_32_pread                    /* 4200 */
        PTR     sys_32_pwrite
        PTR     sys_chown
@@@ -425,10 -458,15 +425,10 @@@ static int setup_rt_frame(void *sig_ret
        /* Create siginfo.  */
        err |= copy_siginfo_to_user(&frame->rs_info, info);
  
-       /* Create the ucontext.  */
+       /* Create the ucontext.  */
        err |= __put_user(0, &frame->rs_uc.uc_flags);
        err |= __put_user(NULL, &frame->rs_uc.uc_link);
 -      err |= __put_user((void __user *)current->sas_ss_sp,
 -                        &frame->rs_uc.uc_stack.ss_sp);
 -      err |= __put_user(sas_ss_flags(regs->regs[29]),
 -                        &frame->rs_uc.uc_stack.ss_flags);
 -      err |= __put_user(current->sas_ss_size,
 -                        &frame->rs_uc.uc_stack.ss_size);
 +      err |= __save_altstack(&frame->rs_uc.uc_stack, regs->regs[29]);
        err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext);
        err |= __copy_to_user(&frame->rs_uc.uc_sigmask, set, sizeof(*set));
  
@@@ -55,12 -55,25 +55,12 @@@ extern asmlinkage int fpu_emulator_rest
  typedef unsigned int __sighandler32_t;
  typedef void (*vfptr_t)(void);
  
 -struct sigaction32 {
 -      unsigned int            sa_flags;
 -      __sighandler32_t        sa_handler;
 -      compat_sigset_t         sa_mask;
 -};
 -
 -/* IRIX compatible stack_t  */
 -typedef struct sigaltstack32 {
 -      s32 ss_sp;
 -      compat_size_t ss_size;
 -      int ss_flags;
 -} stack32_t;
 -
  struct ucontext32 {
-       u32                 uc_flags;
-       s32                 uc_link;
+       u32                 uc_flags;
+       s32                 uc_link;
 -      stack32_t           uc_stack;
 +      compat_stack_t      uc_stack;
        struct sigcontext32 uc_mcontext;
-       compat_sigset_t     uc_sigmask;   /* mask last for extensibility */
+       compat_sigset_t     uc_sigmask;   /* mask last for extensibility */
  };
  
  struct sigframe32 {
@@@ -507,10 -599,16 +507,10 @@@ static int setup_rt_frame_32(void *sig_
        /* Convert (siginfo_t -> compat_siginfo_t) and copy to user. */
        err |= copy_siginfo_to_user32(&frame->rs_info, info);
  
-       /* Create the ucontext.  */
+       /* Create the ucontext.  */
        err |= __put_user(0, &frame->rs_uc.uc_flags);
        err |= __put_user(0, &frame->rs_uc.uc_link);
 -      sp = (int) (long) current->sas_ss_sp;
 -      err |= __put_user(sp,
 -                        &frame->rs_uc.uc_stack.ss_sp);
 -      err |= __put_user(sas_ss_flags(regs->regs[29]),
 -                        &frame->rs_uc.uc_stack.ss_flags);
 -      err |= __put_user(current->sas_ss_size,
 -                        &frame->rs_uc.uc_stack.ss_size);
 +      err |= __compat_save_altstack(&frame->rs_uc.uc_stack, regs->regs[29]);
        err |= setup_sigcontext32(regs, &frame->rs_uc.uc_mcontext);
        err |= __copy_conv_sigset_to_user(&frame->rs_uc.uc_sigmask, set);
  
  extern int setup_sigcontext(struct pt_regs *, struct sigcontext __user *);
  extern int restore_sigcontext(struct pt_regs *, struct sigcontext __user *);
  
 -
 -/* IRIX compatible stack_t  */
 -typedef struct sigaltstack32 {
 -      s32 ss_sp;
 -      compat_size_t ss_size;
 -      int ss_flags;
 -} stack32_t;
 -
  struct ucontextn32 {
-       u32                 uc_flags;
-       s32                 uc_link;
+       u32                 uc_flags;
+       s32                 uc_link;
 -      stack32_t           uc_stack;
 +      compat_stack_t      uc_stack;
        struct sigcontext   uc_mcontext;
-       compat_sigset_t     uc_sigmask;   /* mask last for extensibility */
+       compat_sigset_t     uc_sigmask;   /* mask last for extensibility */
  };
  
  struct rt_sigframe_n32 {
@@@ -115,10 -162,16 +115,10 @@@ static int setup_rt_frame_n32(void *sig
        /* Create siginfo.  */
        err |= copy_siginfo_to_user32(&frame->rs_info, info);
  
-       /* Create the ucontext.  */
+       /* Create the ucontext.  */
        err |= __put_user(0, &frame->rs_uc.uc_flags);
        err |= __put_user(0, &frame->rs_uc.uc_link);
 -      sp = (int) (long) current->sas_ss_sp;
 -      err |= __put_user(sp,
 -                        &frame->rs_uc.uc_stack.ss_sp);
 -      err |= __put_user(sas_ss_flags(regs->regs[29]),
 -                        &frame->rs_uc.uc_stack.ss_flags);
 -      err |= __put_user(current->sas_ss_size,
 -                        &frame->rs_uc.uc_stack.ss_size);
 +      err |= __compat_save_altstack(&frame->rs_uc.uc_stack, regs->regs[29]);
        err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext);
        err |= __copy_conv_sigset_to_user(&frame->rs_uc.uc_sigmask, set);
  
  
  /*
   * For historic reasons the pipe(2) syscall on MIPS has an unusual calling
-  * convention.  It returns results in registers $v0 / $v1 which means there
+  * convention.        It returns results in registers $v0 / $v1 which means there
   * is no need for it to do verify the validity of a userspace pointer
-  * argument.  Historically that used to be expensive in Linux.  These days
+  * argument.  Historically that used to be expensive in Linux.        These days
   * the performance advantage is negligible.
   */
 -asmlinkage int sysm_pipe(nabi_no_regargs volatile struct pt_regs regs)
 +asmlinkage int sysm_pipe(void)
  {
        int fd[2];
 -      int error, res;
 -
 -      error = do_pipe_flags(fd, 0);
 -      if (error) {
 -              res = error;
 -              goto out;
 -      }
 -      regs.regs[3] = fd[1];
 -      res = fd[0];
 -out:
 -      return res;
 +      int error = do_pipe_flags(fd, 0);
 +      if (error)
 +              return error;
 +      current_pt_regs()->regs[3] = fd[1];
 +      return fd[0];
  }
  
  SYSCALL_DEFINE6(mips_mmap, unsigned long, addr, unsigned long, len,
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge