1. 13 5月, 2016 1 次提交
  2. 09 5月, 2016 2 次提交
  3. 04 4月, 2016 1 次提交
  4. 03 4月, 2016 4 次提交
  5. 13 3月, 2016 1 次提交
  6. 05 2月, 2016 1 次提交
    • M
      regmap: mmio: Revert to v4.4 endianness handling · 320549a2
      Mark Brown 提交于
      Commit 29bb45f2 (regmap-mmio: Use native endianness for read/write)
      attempted to fix some long standing bugs in the MMIO implementation for
      big endian systems caused by duplicate byte swapping in both regmap and
      readl()/writel() which affected MIPS systems as when they are in big
      endian mode they flip the endianness of all registers in the system, not
      just the CPU.  MIPS systems had worked around this by declaring regmap
      using IPs as little endian which is inaccurate, unfortunately the issue
      had not been reported.
      
      Sadly the fix makes things worse rather than better.  By changing the
      behaviour to match the documentation it caused behaviour changes for
      other IPs which broke them and by using the __raw I/O accessors to avoid
      the endianness swapping in readl()/writel() it removed some memory
      ordering guarantees and could potentially generate unvirtualisable
      instructions on some architectures.
      
      Unfortunately sorting out all this mess in any half way sensible fashion
      was far too invasive to go in during an -rc cycle so instead let's go
      back to the old broken behaviour for v4.5, the better fixes are already
      queued for v4.6.  This does mean that we keep the broken MIPS DTs for
      another release but that seems the least bad way of handling the
      situation.
      Reported-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      320549a2
  7. 28 1月, 2016 1 次提交
    • M
      MIPS: dt: Explicitly specify native endian behaviour for syscon · 25d6463e
      Mark Brown 提交于
      On many MIPS systems the endianness of IP blocks is kept the same as
      that of the CPU by the hardware.  This includes the system controllers
      on these systems which are controlled via syscon which uses the regmap
      API which used readl() and writel() to interact with the hardware,
      meaning that all writes are converted to little endian when writing to
      the hardware.  This caused a bad interaction with the regmap core in big
      endian mode since it was not aware of the byte swapping and so ended up
      performing little endian writes.
      
      Unfortunately when this issue was noticed it was addressed by updating
      the DT for the affected devices to specify them as little endian.  This
      happened to work since it resulted in two endianness swaps which
      cancelled each other out and gave little endian behaviour but meant that
      the DT was clearly not accurately describing the hardware.
      
      The intention of commit 29bb45f2 (regmap-mmio: Use native
      endianness for read/write) was to fix this by making regmap default to
      native endianness but this breaks most other MMIO users where the
      hardware has a fixed endianness and the implementation uses the __raw
      accessors which are not intended to be used outside of architecture
      code.  Instead use the newly added native-endian DT property to say
      exactly what we want for these systems.
      
      Fixes: 29bb45f2 (regmap-mmio: Use native endianness for read/write)
      Reported-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      25d6463e
  8. 24 1月, 2016 5 次提交
  9. 04 1月, 2016 3 次提交
  10. 20 11月, 2015 1 次提交
  11. 16 11月, 2015 1 次提交
    • S
      regmap-mmio: Use native endianness for read/write · 29bb45f2
      Simon Arlott 提交于
      The regmap API has an endianness setting for formatting reads and writes.
      This can be set by the usual DT "little-endian" and "big-endian" properties.
      To work properly the associated regmap_bus needs to read/write in native
      endian.
      
      The "syscon" DT device binding creates an mmio-based regmap_bus which
      performs all reads/writes as little-endian. These values are then converted
      again by regmap, which means that all of the MIPS BCM boards (which are
      big-endian) have been declared as "little-endian" to get regmap to convert
      them back to big-endian.
      
      Modify regmap-mmio to use the native-endian functions __raw_read*() and
      __raw_write*() instead of the little-endian functions read*() and
      write*().
      
      Modify the big-endian MIPS BCM boards to use what will now be the correct
      endianness instead of pretending that the devices are little-endian.
      Signed-off-by: NSimon Arlott <simon@fire.lp0.eu>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      29bb45f2
  12. 11 11月, 2015 9 次提交
  13. 28 10月, 2015 1 次提交
    • R
      mips: enable building of all dtbs · 0426f648
      Rob Herring 提交于
      Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs
      are not really dependent on a platform being enabled or any other kernel
      config, so for testing coverage it is convenient to build all of the dtbs.
      This builds all dts files in the tree, not just targets listed.
      Signed-off-by: NRob Herring <robh@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      0426f648
  14. 11 9月, 2015 1 次提交
    • Y
      lib/decompressors: use real out buf size for gunzip with kernel · 2d3862d2
      Yinghai Lu 提交于
      When loading x86 64bit kernel above 4GiB with patched grub2, got kernel
      gunzip error.
      
      | early console in decompress_kernel
      | decompress_kernel:
      |       input: [0x807f2143b4-0x807ff61aee]
      |      output: [0x807cc00000-0x807f3ea29b] 0x027ea29c: output_len
      | boot via startup_64
      | KASLR using RDTSC...
      |  new output: [0x46fe000000-0x470138cfff] 0x0338d000: output_run_size
      |  decompress: [0x46fe000000-0x47007ea29b] <=== [0x807f2143b4-0x807ff61aee]
      |
      | Decompressing Linux... gz...
      |
      | uncompression error
      |
      | -- System halted
      
      the new buffer is at 0x46fe000000ULL, decompressor_gzip is using
      0xffffffb901ffffff as out_len.  gunzip in lib/zlib_inflate/inflate.c cap
      that len to 0x01ffffff and decompress fails later.
      
      We could hit this problem with crashkernel booting that uses kexec loading
      kernel above 4GiB.
      
      We have decompress_* support:
          1. inbuf[]/outbuf[] for kernel preboot.
          2. inbuf[]/flush() for initramfs
          3. fill()/flush() for initrd.
      This bug only affect kernel preboot path that use outbuf[].
      
      Add __decompress and take real out_buf_len for gunzip instead of guessing
      wrong buf size.
      
      Fixes: 1431574a (lib/decompressors: fix "no limit" output buffer length)
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Cc: Alexandre Courbot <acourbot@nvidia.com>
      Cc: Jon Medhurst <tixy@linaro.org>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2d3862d2
  15. 03 9月, 2015 2 次提交
  16. 04 8月, 2015 1 次提交
  17. 22 6月, 2015 5 次提交
    • P
      MIPS: Malta: Basic DT plumbing · e8823d26
      Paul Burton 提交于
      Build a DT for the Malta platform into the kernel, load it & probe
      devices from it. The DT is essentially empty at this point, devices
      will be added in further patches.
      
      [ralf@linux-mips.org: Fixed conflicts.]
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: devicetree@vger.kernel.org
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
      Cc: Kumar Gala <galak@codeaurora.org>
      Cc: Andrew Bresticker <abrestic@chromium.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: http://patchwork.linux-mips.org/patch/10119/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      e8823d26
    • J
      MIPS: BMIPS: Build all dtbs if no builtin dtb · 0e12f4a3
      Jonas Gorski 提交于
      Build all available dtbs to allow them to be appended to the resulting
      kernel in case there is no builtin dtb.
      Signed-off-by: NJonas Gorski <jogo@openwrt.org>
      Cc: linux-mips@linux-mips.org
      Cc: devicetree@vger.kernel.org
      Cc: John Crispin <blogic@openwrt.org>
      Cc: Kevin Cernekee <cernekee@gmail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Andrew Bresticker <abrestic@chromium.org>
      Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: James Hartley <James.Hartley@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/9740/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      0e12f4a3
    • J
      MIPS: Add support for vmlinuz.bin appended dtb · c0b4e101
      Jonas Gorski 提交于
      Add support for detecting a vmlinuz.bin appended dtb and overriding
      the boot arguments to match the UHI interface.
      
      To ensure _edata / __apendend_dtb points to the actual end of the
      binary, align the data section to 16 bytes instead of the address
      cursor.
      
      Due to ld.script not going through the preprocessor, we can't check
      for MIPS_ZBOOT_APPENDED_DTB being enabled, so always reserve space
      for it. It should have no consequences for booting without it enabled
      except 1 MiB more ram usage during the uncompressing stage.
      Signed-off-by: NJonas Gorski <jogo@openwrt.org>
      Cc: linux-mips@linux-mips.org
      Cc: devicetree@vger.kernel.org
      Cc: John Crispin <blogic@openwrt.org>
      Cc: Kevin Cernekee <cernekee@gmail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Andrew Bresticker <abrestic@chromium.org>
      Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: James Hartley <James.Hartley@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/9741/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      c0b4e101
    • A
      MIPS: Add basic support for the TL-WR1043ND version 1 · a5fcc652
      Alban Bedel 提交于
      Add a DTS for TL-WR1043ND version 1 and allow to have it built in the
      kernel to circumvent the broken u-boot found on these boards.
      Currently only the UART, LEDs and buttons are supported.
      Signed-off-by: NAlban Bedel <albeu@free.fr>
      Cc: linux-mips@linux-mips.org
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      a5fcc652
    • H
      MIPS: Loongson: Naming style cleanup and rework · 30ad29bb
      Huacai Chen 提交于
      Currently, code of Loongson-2/3 is under loongson directory and code of
      Loongson-1 is under loongson1 directory. Besides, there are Kconfig
      options such as MACH_LOONGSON and MACH_LOONGSON1. This naming style is
      very ugly and confusing. Since Loongson-2/3 are both 64-bit general-
      purpose CPU while Loongson-1 is 32-bit SoC, we rename both file names
      and Kconfig symbols from loongson/loongson1 to loongson64/loongson32.
      
      [ralf@linux-mips.org: Resolve a number of simple conflicts.]
      Signed-off-by: NHuacai Chen <chenhc@lemote.com>
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Fuxin Zhang <zhangfx@lemote.com>
      Cc: Zhangjin Wu <wuzhangjin@gmail.com>
      Cc: Kelvin Cheung <keguang.zhang@gmail.com>
      Patchwork: https://patchwork.linux-mips.org/patch/9790/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      30ad29bb