1. 16 Apr, 2018 2 commits
    • Matt Redfearn's avatar
      MIPS: memset.S: EVA & fault support for small_memset · 8a8158c8
      Matt Redfearn authored
      The MIPS kernel memset / bzero implementation includes a small_memset
      branch which is used when the region to be set is smaller than a long (4
      bytes on 32bit, 8 bytes on 64bit). The current small_memset
      implementation uses a simple store byte loop to write the destination.
      There are 2 issues with this implementation:
      
      1. When EVA mode is active, user and kernel address spaces may overlap.
      Currently the use of the sb instruction means kernel mode addressing is
      always used and an intended write to userspace may actually overwrite
      some critical kernel data.
      
      2. If the write triggers a page fault, for example by calling
      __clear_user(NULL, 2), instead of gracefully handling the fault, an OOPS
      is triggered.
      
      Fix these issues by replacing the sb instruction with the EX() macro,
      which will emit EVA compatible instuctions as required. Additionally
      implement a fault fixup for small_memset which sets a2 to the number of
      bytes that could not be cleared (as defined by __clear_user).
      Reported-by: default avatarChuanhua Lei <chuanhua.lei@intel.com>
      Signed-off-by: default avatarMatt Redfearn <matt.redfearn@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Cc: stable@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/18975/Signed-off-by: default avatarJames Hogan <jhogan@kernel.org>
      8a8158c8
    • Matt Redfearn's avatar
      MIPS: dts: Boston: Fix PCI bus dtc warnings: · 2c2bf522
      Matt Redfearn authored
      dtc recently (v1.4.4-8-g756ffc4f52f6) added PCI bus checks. Fix the
      warnings now emitted:
      
      arch/mips/boot/dts/img/boston.dtb: Warning (pci_bridge): /pci@10000000: missing bus-range for PCI bridge
      arch/mips/boot/dts/img/boston.dtb: Warning (pci_bridge): /pci@12000000: missing bus-range for PCI bridge
      arch/mips/boot/dts/img/boston.dtb: Warning (pci_bridge): /pci@14000000: missing bus-range for PCI bridge
      Signed-off-by: default avatarMatt Redfearn <matt.redfearn@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: linux-mips@linux-mips.org
      Cc: devicetree@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/19070/Signed-off-by: default avatarJames Hogan <jhogan@kernel.org>
      2c2bf522
  2. 13 Apr, 2018 1 commit
  3. 12 Apr, 2018 1 commit
  4. 06 Apr, 2018 1 commit
  5. 28 Mar, 2018 2 commits
  6. 22 Mar, 2018 1 commit
    • Maciej W. Rozycki's avatar
      MIPS: Use the entry point from the ELF file header · 27c524d1
      Maciej W. Rozycki authored
      In order to fetch the correct entry point with the ISA bit included, for
      use by non-ELF boot loaders, parse the output of `objdump -f' for the
      start address recorded in the kernel executable itself, rather than
      using `nm' to get the value of the `kernel_entry' symbol.
      
      Sign-extend the address retrieved if 32-bit, so that execution is
      correctly started on 64-bit processors as well.  The tool always prints
      the entry point using either 8 or 16 hexadecimal digits, matching the
      address width (aka class) of the ELF file, even in the presence of
      leading zeros.
      Signed-off-by: default avatarMaciej W. Rozycki <macro@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/18912/Signed-off-by: default avatarJames Hogan <jhogan@kernel.org>
      27c524d1
  7. 21 Mar, 2018 6 commits
  8. 14 Mar, 2018 2 commits
  9. 09 Mar, 2018 7 commits
  10. 06 Mar, 2018 3 commits
  11. 05 Mar, 2018 1 commit
    • James Hogan's avatar
      MIPS: Expand help text to list generic defconfigs · cccd0b9a
      James Hogan authored
      Expand the MIPS Makefile help text to list generic board names, generic
      defconfigs, and legacy defconfigs which have been converted to generic
      and are still usable.
      
      Here's a snippet of the new "make ARCH=mips help" output:
        ...
        If you are targeting a system supported by generic kernels you may
        configure the kernel for a given architecture target like so:
      
        {micro32,32,64}{r1,r2,r6}{el,}_defconfig <BOARDS="list of boards">
      
        Where BOARDS is some subset of the following:
          boston
          ni169445
          ranchu
          sead-3
          xilfpga
      
        Specifically the following generic default configurations are
        supported:
      
        32r1_defconfig           - Build generic kernel for MIPS32 r1
        32r1el_defconfig         - Build generic kernel for MIPS32 r1 little endian
        32r2_defconfig           - Build generic kernel for MIPS32 r2
        32r2el_defconfig         - Build generic kernel for MIPS32 r2 little endian
        32r6_defconfig           - Build generic kernel for MIPS32 r6
        32r6el_defconfig         - Build generic kernel for MIPS32 r6 little endian
        64r1_defconfig           - Build generic kernel for MIPS64 r1
        64r1el_defconfig         - Build generic kernel for MIPS64 r1 little endian
        64r2_defconfig           - Build generic kernel for MIPS64 r2
        64r2el_defconfig         - Build generic kernel for MIPS64 r2 little endian
        64r6_defconfig           - Build generic kernel for MIPS64 r6
        64r6el_defconfig         - Build generic kernel for MIPS64 r6 little endian
        micro32r2_defconfig      - Build generic kernel for microMIPS32 r2
        micro32r2el_defconfig    - Build generic kernel for microMIPS32 r2 little endian
      
        The following legacy default configurations have been converted to
        generic and can still be used:
      
        sead3_defconfig          - Build 32r2el_defconfig BOARDS=sead-3
        sead3micro_defconfig     - Build micro32r2el_defconfig BOARDS=sead-3
        xilfpga_defconfig        - Build 32r2el_defconfig BOARDS=xilfpga
        ...
      Signed-off-by: default avatarJames Hogan <jhogan@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: Matt Redfearn <matt.redfearn@mips.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kbuild@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/18598/
      cccd0b9a
  12. 19 Feb, 2018 13 commits