1. 11 11月, 2015 39 次提交
    • J
      MIPS: pci-rt3883: drop unneeded of_node_get · 972cfd55
      Julia Lawall 提交于
      for_each_child_of_node performs an of_node_get on each iteration, so no
      of_node_get is needed on breaking out of the loop when the device_node
      structure is saved in another variable.
      
      A simplified semantic match that finds this problem is as follows
      (http://coccinelle.lip6.fr):
      
      // <smpl>
      @@
      expression root;
      local idexpression child;
      @@
      
       for_each_child_of_node(root, child) {
         ...
      *  of_node_get(child)
         ...
         break;
       }
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Cc: kernel-janitors@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
      Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Patchwork: https://patchwork.linux-mips.org/patch/11357/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      972cfd55
    • A
      MIPS: VDSO: Add implementations of gettimeofday() and clock_gettime() · a7f4df4e
      Alex Smith 提交于
      Add user-mode implementations of gettimeofday() and clock_gettime() to
      the VDSO. This is currently usable with 2 clocksources: the CP0 count
      register, which is accessible to user-mode via RDHWR on R2 and later
      cores, or the MIPS Global Interrupt Controller (GIC) timer, which
      provides a "user-mode visible" section containing a mirror of its
      counter registers. This section must be mapped into user memory, which
      is done below the VDSO data page.
      
      When a supported clocksource is not in use, the VDSO functions will
      return -ENOSYS, which causes libc to fall back on the standard syscall
      path.
      
      When support for neither of these clocksources is compiled into the
      kernel at all, the VDSO still provides clock_gettime(), as the coarse
      realtime/monotonic clocks can still be implemented. However,
      gettimeofday() is not provided in this case as nothing can be done
      without a suitable clocksource. This causes the symbol lookup to fail
      in libc and it will then always use the standard syscall path.
      
      This patch includes a workaround for a bug in QEMU which results in
      RDHWR on the CP0 count register always returning a constant (incorrect)
      value. A fix for this has been submitted, and the workaround can be
      removed after the fix has been in stable releases for a reasonable
      amount of time.
      
      A simple performance test which calls gettimeofday() 1000 times in a
      loop and calculates the average execution time gives the following
      results on a Malta + I6400 (running at 20MHz):
      
       - Syscall:    ~31000 ns
       - VDSO (GIC): ~15000 ns
       - VDSO (CP0): ~9500 ns
      
      [markos.chandras@imgtec.com:
      - Minor code re-arrangements in order for mappings to be made
      in the order they appear to the process' address space.
      - Move do_{monotonic, realtime} outside of the MIPS_CLOCK_VSYSCALL ifdef
      - Use gic_get_usm_range so we can do the GIC mapping in the
      arch/mips/kernel/vdso instead of the GIC irqchip driver]
      Signed-off-by: NAlex Smith <alex.smith@imgtec.com>
      Signed-off-by: NMarkos Chandras <markos.chandras@imgtec.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/11338/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      a7f4df4e
    • A
      MIPS: Initial implementation of a VDSO · ebb5e78c
      Alex Smith 提交于
      Add an initial implementation of a proper (i.e. an ELF shared library)
      VDSO. With this commit it does not export any symbols, it only replaces
      the current signal return trampoline page. A later commit will add user
      implementations of gettimeofday()/clock_gettime().
      
      To support both new toolchains and old ones which don't generate ABI
      flags section, we define its content manually and then use a tool
      (genvdso) to patch up the section to have the correct name and type.
      genvdso also extracts symbol offsets ({,rt_}sigreturn) needed by the
      kernel, and generates a C file containing a "struct mips_vdso_image"
      containing both the VDSO data and these offsets. This C file is
      compiled into the kernel.
      
      On 64-bit kernels we require a different VDSO for each supported ABI,
      so we may build up to 3 different VDSOs. The VDSO to use is selected by
      the mips_abi structure.
      
      A kernel/user shared data page is created and mapped below the VDSO
      image. This is currently empty, but will be used by the user time
      function implementations which are added later.
      
      [markos.chandras@imgtec.com:
      - Add more comments
      - Move abi detection in genvdso.h since it's the get_symbol function
      that needs it.
      - Add an R6 specific way to calculate the base address of VDSO in order
      to avoid the branch instruction which affects performance.
      - Do not patch .gnu.attributes since it's not needed for dynamic linking.
      - Simplify Makefile a little bit.
      - checkpatch fixes
      - Restrict VDSO support for binutils < 2.25 for pre-R6
      - Include atomic64.h for O32 variant on MIPS64]
      Signed-off-by: NAlex Smith <alex.smith@imgtec.com>
      Signed-off-by: NMarkos Chandras <markos.chandras@imgtec.com>
      Cc: Matthew Fortune <matthew.fortune@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/11337/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      ebb5e78c
    • B
      MIPS: mpc30x_defconfig: Convert to use libata PATA drivers · 22773aa9
      Bartlomiej Zolnierkiewicz 提交于
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts mpc30x_defconfig to use libata PATA
      drivers.
      
      PS This platform still uses "ide0=base[,ctl[,irq]]" hack in
      its defconfig.  The hack itself has been removed in 2008 and
      this platform should be converted to using PATA platform host
      driver (pata_platform) instead.
      Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-ide@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11141/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      22773aa9
    • B
      MIPS: maltaup_xpa_defconfig: Convert to use libata PATA drivers · 1b7d8012
      Bartlomiej Zolnierkiewicz 提交于
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts maltaup_xpa_defconfig to use libata PATA
      drivers (tc86c001 IDE host driver has no corresponding libata
      driver yet so it is not converted).
      Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-ide@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11140/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      1b7d8012
    • B
      MIPS: maltaup_defconfig: Convert to use libata PATA drivers · 93c7e664
      Bartlomiej Zolnierkiewicz 提交于
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts maltaup_defconfig to use libata PATA
      drivers.
      Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-ide@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11142/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      93c7e664
    • B
      MIPS: maltasmvp_eva_defconfig: Convert to use libata PATA drivers · b0b98ad9
      Bartlomiej Zolnierkiewicz 提交于
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts maltasmvp_eva_defconfig to use libata PATA
      drivers.
      Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-ide@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11139/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      b0b98ad9
    • B
      MIPS: maltaaprp_defconfig: Convert to use libata PATA drivers · 255faa84
      Bartlomiej Zolnierkiewicz 提交于
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts maltaaprp_defconfig to use libata PATA
      drivers.
      Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-ide@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: b.zolnierkie@samsung.com
      Patchwork: https://patchwork.linux-mips.org/patch/11137/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      255faa84
    • B
      MIPS: malta_qemu_32r6_defconfig: Convert to use libata PATA drivers · 077b649a
      Bartlomiej Zolnierkiewicz 提交于
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts malta_qemu_32r6_defconfig to use libata
      PATA drivers.
      Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-ide@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: b.zolnierkie@samsung.com
      Patchwork: https://patchwork.linux-mips.org/patch/11138/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      077b649a
    • B
      MIPS: malta_kvm_guest_defconfig: Convert to use libata PATA drivers · 5f6df05b
      Bartlomiej Zolnierkiewicz 提交于
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts malta_kvm_guest_defconfig to use libata
      PATA drivers (tc86c001 IDE host driver has no corresponding
      libata driver yet so it is not converted).
      Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Sanjay Lal <sanjayl@kymasys.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-ide@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11136/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      5f6df05b
    • B
      MIPS: malta_kvm_defconfig: Convert to use libata PATA drivers · 91c6fbab
      Bartlomiej Zolnierkiewicz 提交于
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts malta_kvm_defconfig to use libata PATA
      drivers (tc86c001 IDE host driver has no corresponding libata
      driver yet so it is not converted).
      Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Sanjay Lal <sanjayl@kymasys.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-ide@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11135/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      91c6fbab
    • B
      MIPS: malta_defconfig: Convert to use libata PATA drivers · d17e4655
      Bartlomiej Zolnierkiewicz 提交于
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts malta_defconfig to use libata PATA
      drivers.
      Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-ide@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11134/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      d17e4655
    • B
      MIPS: lemote2f_defconfig: Convert to use libata PATA drivers · 7ff7a5b1
      Bartlomiej Zolnierkiewicz 提交于
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts lemote2f_defconfig to use libata PATA
      drivers.
      
      PS This platform uses CS5536 chipset which (due to historical
      reasons) has basic support in AMD/nVidia PATA host driver and
      full support in a newer CS5536 PATA one (pata_cs5536).  Thus
      most likely this platform should switch to using the latter
      host driver.
      Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-ide@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11133/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      7ff7a5b1
    • B
      MIPS: lasat_defconfig: Convert to use libata PATA drivers · 973852fc
      Bartlomiej Zolnierkiewicz 提交于
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts lasat_defconfig to use libata PATA
      drivers.
      Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: Brian Murphy <brian@murphy.dk>
      Cc: linux-mips@linux-mips.org
      Cc: linux-ide@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11132/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      973852fc
    • B
      MIPS: fuloong2e_defconfig: Convert to use libata PATA drivers · 1485ddcc
      Bartlomiej Zolnierkiewicz 提交于
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts fuloong2e_defconfig to use libata PATA
      drivers.
      Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: Wu Zhangjin <wuzhangjin@gmail.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-ide@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11131/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      1485ddcc
    • B
      MIPS: e55_defconfig: Convert to use libata PATA drivers · 5c2a53a1
      Bartlomiej Zolnierkiewicz 提交于
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts e55_defconfig to use libata PATA drivers.
      
      PS This platform still uses "ide0=base[,ctl[,irq]]" hack in
      its defconfig.  The hack itself has been removed in 2008 and
      this platform should be converted to using PATA platform host
      driver (pata_platform) instead.
      
      Cc: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
      Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      5c2a53a1
    • B
      MIPS: capcella_defconfig: Convert to use libata PATA drivers · 5081f4fc
      Bartlomiej Zolnierkiewicz 提交于
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts capcella_defconfig to use libata PATA
      drivers.
      Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-ide@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11129/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      5081f4fc
    • B
      MIPS: bigsur_defconfig: Convert to use libata PATA drivers · adcdd428
      Bartlomiej Zolnierkiewicz 提交于
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts bigsur_defconfig to use libata PATA
      drivers (tc86c001 IDE host driver has no corresponding libata
      driver yet so it is not converted).
      Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-ide@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11128/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      adcdd428
    • P
      MIPS: Extend hardware table walking support to MIPS64 · cab25bc7
      Paul Burton 提交于
      Extend the existing support for Hardware Table Walking (HTW) to MIPS64
      systems by supporting PMDs & setting the pointer size bit in PWSize,
      then ceasing to blacklist HTW on MIPS64 systems.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: Joshua Kinard <kumba@gentoo.org>
      Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11224/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      cab25bc7
    • P
      MIPS: Malta: Register UP SMP ops if all else fails · ecafe3e9
      Paul Burton 提交于
      If we fail to register any real SMP implementations, fall back to
      registering the dummy UP implementation. Otherwise when we build an SMP
      kernel & run it on a system where the SMP implementations fail to probe
      (eg. QEMU) the kernel will perform a NULL dereference attempting to call
      mp_ops->smp_setup() from plat_smp_setup().
      
      Notably this fixes booting kernels with CPS SMP enabled on QEMU, which
      doesn't currently implement the CM, CPC or GIC.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Peter Hurley <peter@hurleysoftware.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11223/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      ecafe3e9
    • P
      MIPS: Malta: Setup RAM regions via DT · e81a8c7d
      Paul Burton 提交于
      Move memory configuration to be performed via device tree for the Malta
      board. This moves more Malta specific code to malta-dtshim.c, leaving
      the rest of the mti-malta code a little more board-agnostic. This will
      be useful to share more code between boards, with the device tree
      providing the board specifics as intended.
      
      Since we can't rely upon Malta boards running a bootloader capable of
      handling devictrees & filling in the required information, a piece of
      shim code (malta_dt_shim) is added to consume the (e)memsize variables
      provided as part of the bootloader environment (or on the kernel command
      line) then generate the DT memory node using the provided values.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: devicetree@vger.kernel.org
      Cc: Kumar Gala <galak@codeaurora.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11222/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      e81a8c7d
    • P
      MIPS: Malta: Remove fw_memblock_t abstraction · ea050714
      Paul Burton 提交于
      The fw_getmdesc function & fw_memblock_t abstraction is only used by
      Malta, and so far as I can tell serves no purpose beyond making the code
      less clear than it could be. Remove the useless level of abstraction.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11221/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      ea050714
    • P
      MIPS: Malta: Split obj-y entries across lines · e1137e1d
      Paul Burton 提交于
      Split the obj-y entries to their own lines such that it's easier to see
      what's going on when adding or removing entries.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11220/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      e1137e1d
    • P
      MIPS: Allow RIXI for 32-bit kernels on MIPS64 · 033549c6
      Paul Burton 提交于
      Commit a68d09a1 ("MIPS: Don't use RI/XI with 32-bit kernels on
      64-bit CPUs") prevented use of RIXI on MIPS64 systems, stating that the
      "TLB handlers cannot handle this case". What they actually couldn't
      handle was cases where there were less fill bits in the Entry{Lo,Hi}
      registers than bits used by software in PTEs. The handlers can now deal
      with this case, so enable RIXI for MIPS32 kernels on MIPS64 systems.
      
      Note that beyond the obvious benefits provided by having RIXI on such
      systems, this is required for systems implementing MIPSr6 where RIXI
      cannot be disabled.
      
      This reverts commit a68d09a1 ("MIPS: Don't use RI/XI with 32-bit
      kernels on 64-bit CPUs").
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Joshua Kinard <kumba@gentoo.org>
      Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11219/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      033549c6
    • P
      MIPS: tlbex: Avoid placing software PTE bits in Entry* PFN fields · 00bf1c69
      Paul Burton 提交于
      Commit 748e787e ("MIPS: Optimize TLB refill for RI/XI
      configurations.") stopped explicitly clearing the bits used by software
      in PTEs by making use of a rotate instruction that rotates them into the
      fill bits of the Entry{Lo,Hi} register. This can only work if there are
      actually enough fill bits in the register to cover the software
      maintained bits, otherwise we end up writing those bits into the upper
      bits of the PFN or PFNX field of the Entry{Lo,Hi} register.
      
      Fix this by detecting the number of fill bits present in the
      Entry{Lo,Hi} registers & explicitly clearing the software bits where
      necessary.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11218/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      00bf1c69
    • P
      MIPS: Tidy EntryLo bit definitions, add PFN · c6956728
      Paul Burton 提交于
      Tidy up the definition of the EntryLo RI & XI bits using BITS_PER_LONG
      rather than #ifdef'ing on CONFIG_64BIT, and add a definition for the
      offset to the PFN field for use by a later patch.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11217/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      c6956728
    • P
      MIPS: tlbex: Share MIPS32 32 bit phys & MIPS64 64 bit phys code · c676589b
      Paul Burton 提交于
      The code in build_update_entries for 64 bit physical addresses on a
      MIPS64 CPU and 32 bit physical addresses on a MIPS32 CPU is now
      identical, with the exception of r4k bug workaround in the latter which
      would simply not apply to the former. Remove the duplication and some
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11216/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      c676589b
    • P
      MIPS: tlbex: Remove some RIXI redundancy · 974a0b6a
      Paul Burton 提交于
      The cpu_has_rixi cases in build_update_entries are now identical to the
      non-RIXI cases with the one exception of the r45k_bvahwbug case which is
      hardcoded as never happening anyway & presumably was either missed from
      the RIXI path or would never happen on a CPU with RIXI support. Remove
      the redundant checks & duplication.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11215/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      974a0b6a
    • P
      MIPS: tlbex: Stop open-coding build_convert_pte_to_entrylo · dbfd657a
      Paul Burton 提交于
      Make use of build_convert_pte_to_entrylo in the RIXI cases within
      build_update_entries rather than open-coding it 4 times.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11214/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      dbfd657a
    • P
      MIPS: Always use r4k_wait_irqoff for MIPSr6 · 5b10a0e8
      Paul Burton 提交于
      Prior to release 6 of the MIPS architecture it has been implementation
      dependent whether masked interrupts cause a wait instruction to return,
      so the kernel has effectively had to maintain a whitelist of cores upon
      which it is safe to use the r4k_wait_irqoff cpu_wait implementation.
      With MIPSr6 this is no longer implementation dependent and
      r4k_wait_irqoff can always be used.
      
      Remove the existing I6400 case which will no longer ever be hit, and was
      incorrect anyway since I6400 & r6 in general doesn't have the WII bit.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11210/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      5b10a0e8
    • P
      MIPS: CM, CPC: Ensure core-other GCRs reflect the correct core · 78a54c4d
      Paul Burton 提交于
      Ensure the update to which core the core-other GCR regions reflect has
      taken place before any core-other GCRs are accessed by placing a memory
      barrier (sync instruction) between the write to the core-other registers
      and any such GCR accesses.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11209/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      78a54c4d
    • P
      MIPS: CM: make use of mips_cm_{lock,unlock}_other · 4ede3161
      Paul Burton 提交于
      Document that CPC core-other accesses must take place within the bounds
      of the CM lock, and begin using the CM lock functions where we access
      the GCRs of other cores. This is required because with CM3 the CPC began
      using GCR_CL_OTHER instead of CPC_CL_OTHER.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Andrew Bresticker <abrestic@chromium.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: Niklas Cassel <niklas.cassel@axis.com>
      Cc: Ezequiel Garcia <ezequiel.garcia@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11208/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      4ede3161
    • P
      MIPS: CM: Introduce core-other locking functions · 23d5de8e
      Paul Burton 提交于
      Introduce mips_cm_lock_other & mips_cm_unlock_other, mirroring the
      existing CPC equivalents, in order to lock access from the current core
      to another via the core-other GCR region. This hasn't been required in
      the past but with CM3 the CPC starts using GCR_CL_OTHER rather than
      CPC_CL_OTHER and this will be required for safety.
      
      [ralf@linux-mips.org: Fix merge conflict.]
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11207/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      23d5de8e
    • P
      MIPS: CM: Fix GCR_Cx_CONFIG PVPE mask · 252d6aa6
      Paul Burton 提交于
      The PVPE (or PVP in >= CM3) field is 10 bits wide, but the mask
      previously only covered the bottom 9 bits. Extend the mask to cover all
      10 bits of the field.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11206/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      252d6aa6
    • P
      MIPS: CPS: Warn if a core doesn't start · a8c20614
      Paul Burton 提交于
      When debugging core bringup it is useful to see the state of the CPC
      sequencer, so output that value if the core hasn't started within a
      reasonable amount of time (1 second). This avoids simply appearing to
      the user to hang if a secondary core fails to start.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Andrew Bresticker <abrestic@chromium.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: Niklas Cassel <niklas.cassel@axis.com>
      Cc: Ezequiel Garcia <ezequiel.garcia@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11205/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      a8c20614
    • P
      MIPS: CPS: Skip Config1 presence check · 192fbc20
      Paul Burton 提交于
      The Config1 register is architecturally defined as required, and is thus
      present in all systems which may make use of cps-vec.S. Skip the check
      for its presence via the Config.M bit.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11204/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      192fbc20
    • P
      MIPS: CPS: Read CM GCR base from cop0 · 946db173
      Paul Burton 提交于
      Rather than patching the start of mips_cps_core_entry to provide the
      base address of the CM GCRs, simply read that base address from the cop0
      CMGCRBase register, converting from the physical address to an uncached
      virtual address.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Andrew Bresticker <abrestic@chromium.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: Niklas Cassel <niklas.cassel@axis.com>
      Cc: Ezequiel Garcia <ezequiel.garcia@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11203/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      946db173
    • P
      MIPS: CPS: Early debug using an ns16550-compatible UART · 609cf6f2
      Paul Burton 提交于
      Provide support for outputting early debug information, in the form of
      various register values should an exception occur, during the early
      bringup of secondary cores. This code requires an ns16550-compatible
      UART accessible from the secondary core, and is written in assembly due
      to the environment in which such early exceptions occur where way may
      not have a stack, be coherent or even have initialised caches.
      
      [ralf@linux-mips.org: Fix merge conflict.]
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: Andrew Bresticker <abrestic@chromium.org>
      Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: linux-kernel@vger.kernel.org
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11202/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      609cf6f2
    • J
      MIPS: Fix duplicate CP0_* definitions. · 195cee92
      James Hogan 提交于
      Remove the definition in locore.S and move a few of the other similar
      definitions in asm/mipsregs.h too. CP0_INTCTL, CP0_SRSCTL, & CP0_SRSMAP
      are unused so they're just dropped instead. CP0_DDATA_LO is left where
      it is as I have patches to eliminate its use in locore.S and it
      otherwise is unlikely to need to be used from assembly code.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Gleb Natapov <gleb@kernel.org>
      Cc: linux-mips@linux-mips.org
      Cc: kvm@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11461/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      195cee92
  2. 26 10月, 2015 1 次提交