1. 17 7月, 2019 3 次提交
  2. 16 7月, 2019 1 次提交
    • S
      MIPS: fix some more fall through errors in arch/mips · e5793cd1
      Stephen Rothwell 提交于
      Fix these errors:
      
       arch/mips/cavium-octeon/executive/cvmx-pko.c:489:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
       arch/mips/bcm63xx/dev-flash.c:89:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
       arch/mips/ath79/setup.c:155:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
       arch/mips/ar7/setup.c:50:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
      
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: John Crispin <john@phrozen.org>
      Cc: Matthias Schiffer <mschiffer@universe-factory.net>
      Cc: "Petr Štetiar" <ynezz@true.cz>
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      e5793cd1
  3. 15 7月, 2019 3 次提交
    • M
      docs: arm: convert docs to ReST and rename to *.rst · dc7a12bd
      Mauro Carvalho Chehab 提交于
      Converts ARM the text files to ReST, preparing them to be an
      architecture book.
      
      The conversion is actually:
        - add blank lines and identation in order to identify paragraphs;
        - fix tables markups;
        - add some lists markups;
        - mark literal blocks;
        - adjust title markups.
      
      At its new index.rst, let's add a :orphan: while this is not linked to
      the main index.rst file, in order to avoid build warnings.
      Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      Reviewed-by Corentin Labbe <clabbe.montjoie@gmail.com> # For sun4i-ss
      dc7a12bd
    • S
      MIPS: perf events: handle switch statement falling through warnings · 03bcba73
      Stephen Rothwell 提交于
      Now that we build with -Wimplicit-fallthrough=3, some warnings are
      produced in the arch/mips perf events code that are promoted to errors:
      
       arch/mips/kernel/perf_event_mipsxx.c:792:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
       arch/mips/kernel/perf_event_mipsxx.c:795:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
       arch/mips/kernel/perf_event_mipsxx.c:798:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
       arch/mips/kernel/perf_event_mipsxx.c:1407:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
      
      Assume the fall throughs are deliberate amd annotate/eliminate them.
      
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Gustavo A. R. Silva <gustavo@embeddedor.com>
      Cc: Kees Cook <keescook@chromium.org>
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      [paul.burton@mips.com:
        - Make n signed to fix the loop condition.
        - Simplify the initialization of n, which should never have a value
          greater than 4.
        - Invert conditions in the loop to decrease indentation.]
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      03bcba73
    • C
      arch: mark syscall number 435 reserved for clone3 · 1a271a68
      Christian Brauner 提交于
      A while ago Arnd made it possible to give new system calls the same
      syscall number on all architectures (except alpha). To not break this
      nice new feature let's mark 435 for clone3 as reserved on all
      architectures that do not yet implement it.
      Even if an architecture does not plan to implement it this ensures that
      new system calls coming after clone3 will have the same number on all
      architectures.
      Signed-off-by: NChristian Brauner <christian@brauner.io>
      Cc: linux-arch@vger.kernel.org
      Cc: linux-alpha@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-ia64@vger.kernel.org
      Cc: linux-m68k@lists.linux-m68k.org
      Cc: linux-mips@vger.kernel.org
      Cc: linux-parisc@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-s390@vger.kernel.org
      Cc: linux-sh@vger.kernel.org
      Cc: sparclinux@vger.kernel.org
      Link: https://lore.kernel.org/r/20190714192205.27190-2-christian@brauner.ioReviewed-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NChristian Brauner <christian@brauner.io>
      1a271a68
  4. 13 7月, 2019 3 次提交
  5. 04 7月, 2019 1 次提交
  6. 03 7月, 2019 1 次提交
    • A
      mips/kprobes: Export kprobe_fault_handler() · c9093486
      Anshuman Khandual 提交于
      Generic kprobe_page_fault() calls into kprobe_fault_handler() which must be
      available with and without CONFIG_KPROBES. There is one stub implementation
      for !CONFIG_KPROBES. For CONFIG_KPROBES all subscribing archs must provide
      a kprobe_fault_handler() definition. Currently mips has an implementation
      which is defined as 'static inline'. Make it available for generic kprobes
      to comply with the above new requirement.
      
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-mm@kvack.org
      Reported-by: Nkbuild test robot <lkp@intel.com>
      Signed-off-by: NAnshuman Khandual <anshuman.khandual@arm.com>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Fixes: 773734b44557 ("mm, kprobes: generalize and rename notify_page_fault() as kprobe_page_fault()")
      Cc: linux-kernel@vger.kernel.org
      c9093486
  7. 01 7月, 2019 1 次提交
  8. 28 6月, 2019 1 次提交
    • C
      arch: wire-up pidfd_open() · 7615d9e1
      Christian Brauner 提交于
      This wires up the pidfd_open() syscall into all arches at once.
      Signed-off-by: NChristian Brauner <christian@brauner.io>
      Reviewed-by: NDavid Howells <dhowells@redhat.com>
      Reviewed-by: NOleg Nesterov <oleg@redhat.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Joel Fernandes (Google) <joel@joelfernandes.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Jann Horn <jannh@google.com>
      Cc: Andy Lutomirsky <luto@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Aleksa Sarai <cyphar@cyphar.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: linux-api@vger.kernel.org
      Cc: linux-alpha@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-ia64@vger.kernel.org
      Cc: linux-m68k@lists.linux-m68k.org
      Cc: linux-mips@vger.kernel.org
      Cc: linux-parisc@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-s390@vger.kernel.org
      Cc: linux-sh@vger.kernel.org
      Cc: sparclinux@vger.kernel.org
      Cc: linux-xtensa@linux-xtensa.org
      Cc: linux-arch@vger.kernel.org
      Cc: x86@kernel.org
      7615d9e1
  9. 26 6月, 2019 2 次提交
  10. 25 6月, 2019 15 次提交
    • S
      MIPS: ralink: mt7628a.dtsi: Add watchdog controller DT node · 1bca2eac
      Stefan Roese 提交于
      This patch adds the watchdog controller description to the MT7628A dtsi
      file.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: Harvey Hunt <harveyhuntnexus@gmail.com>
      Cc: John Crispin <john@phrozen.org>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: linux-mips@vger.kernel.org
      1bca2eac
    • S
      MIPS: ralink: mt7628a.dtsi: Add SPI controller DT node · 4e41b745
      Stefan Roese 提交于
      This patch adds the SPI controller description to the MT7628A dtsi file.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: Harvey Hunt <harveyhuntnexus@gmail.com>
      Cc: John Crispin <john@phrozen.org>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: linux-mips@vger.kernel.org
      4e41b745
    • S
      MIPS: ralink: mt7628a.dtsi: Add GPIO controller DT node · e456a3bd
      Stefan Roese 提交于
      This patch adds the GPIO controller description to the MT7628A dtsi file.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: Harvey Hunt <harveyhuntnexus@gmail.com>
      Cc: John Crispin <john@phrozen.org>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: linux-mips@vger.kernel.org
      e456a3bd
    • S
      MIPS: ralink: mt7628a.dtsi: Add pinctrl DT properties to the UART nodes · 6394de39
      Stefan Roese 提交于
      Now that pinmux is available, let's use it for the UART DT nodes.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: Harvey Hunt <harveyhuntnexus@gmail.com>
      Cc: John Crispin <john@phrozen.org>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: linux-mips@vger.kernel.org
      6394de39
    • S
      MIPS: ralink: mt7628a.dtsi: Add pinmux DT node · 380f072c
      Stefan Roese 提交于
      This patch adds the pinmux DT node using the generic "pinctrl-single"
      pinmux driver. For this the system-controller register area needs to be
      changed to not overlap with the pinmux registers.
      
      This patch is based on work done by John Crispin.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: Harvey Hunt <harveyhuntnexus@gmail.com>
      Cc: John Crispin <john@phrozen.org>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: linux-mips@vger.kernel.org
      380f072c
    • S
      MIPS: ralink: mt7628a.dtsi: Add SPDX GPL-2.0 license identifier · 9ea34af7
      Stefan Roese 提交于
      As done in commit b2441318 ("License cleanup: add SPDX GPL-2.0
      license identifier to files with no license"), this patch adds the SPDX
      license identifier to mt7628a.dtsi, which is currently still missing
      this identifier.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: Harvey Hunt <harveyhuntnexus@gmail.com>
      Cc: John Crispin <john@phrozen.org>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: linux-mips@vger.kernel.org
      9ea34af7
    • P
      MIPS: lantiq: Add SMP support for lantiq interrupt controller · 85cf2c37
      Petr Cvek 提交于
      Some lantiq devices have two ICU controllers. The IRQ signal is routed
      to both of them and user can chose which ICU will resend the IRQ to their
      respective VPE. The patch adds the support for the second ICU.
      
      The patch changes a register definition of the driver. Instead of an
      individual IM, the whole ICU is defined. This will only affects openwrt
      patched kernel (vanilla doesn't have additional .dts files).
      
      Also spinlocks has been added, both cores can RMW different bitfields
      in the same register. Added affinity set function. The new VPE cpumask
      will take into the action at the irq enable.
      
      The functionality was tested on 4.14 openwrt kernel and TP-W9980B modem.
      Signed-off-by: NPetr Cvek <petrcvekcz@gmail.com>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: hauke@hauke-m.de
      Cc: john@phrozen.org
      Cc: linux-mips@vger.kernel.org
      Cc: openwrt-devel@lists.openwrt.org
      Cc: pakahmar@hotmail.com
      85cf2c37
    • P
      MIPS: lantiq: Shorten register names, remove unused macros · f0dd3001
      Petr Cvek 提交于
      The macros LTQ_ICU_IM1_ISR and LTQ_ICU_OFFSET seems to be unused, remove
      them. Allong with that, remove _IM0 substring from the macro names. The
      IM (interrupt module) is already defined in IOMEM access and IM0 would be
      misleading.
      Signed-off-by: NPetr Cvek <petrcvekcz@gmail.com>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: hauke@hauke-m.de
      Cc: john@phrozen.org
      Cc: linux-mips@vger.kernel.org
      Cc: openwrt-devel@lists.openwrt.org
      Cc: pakahmar@hotmail.com
      f0dd3001
    • P
      MIPS: lantiq: Fix bitfield masking · ba1bc0fc
      Petr Cvek 提交于
      The modification of EXIN register doesn't clean the bitfield before
      the writing of a new value. After a few modifications the bitfield would
      accumulate only '1's.
      Signed-off-by: NPetr Cvek <petrcvekcz@gmail.com>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: hauke@hauke-m.de
      Cc: john@phrozen.org
      Cc: linux-mips@vger.kernel.org
      Cc: openwrt-devel@lists.openwrt.org
      Cc: pakahmar@hotmail.com
      ba1bc0fc
    • P
      MIPS: lantiq: Remove unused macros · 7c6747bc
      Petr Cvek 提交于
      The last use of both macros was in 4.11.
      Signed-off-by: NPetr Cvek <petrcvekcz@gmail.com>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: hauke@hauke-m.de
      Cc: john@phrozen.org
      Cc: linux-mips@vger.kernel.org
      Cc: openwrt-devel@lists.openwrt.org
      Cc: pakahmar@hotmail.com
      7c6747bc
    • P
      MIPS: lantiq: Fix attributes of of_device_id structure · 64a95283
      Petr Cvek 提交于
      According to the checkpatch the driver structure of_device_id requires
      to be const and with attribute __initconst. Change it accordingly.
      Signed-off-by: NPetr Cvek <petrcvekcz@gmail.com>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: hauke@hauke-m.de
      Cc: john@phrozen.org
      Cc: linux-mips@vger.kernel.org
      Cc: openwrt-devel@lists.openwrt.org
      Cc: pakahmar@hotmail.com
      64a95283
    • P
      MIPS: lantiq: Change variables to the same type as the source · 39588164
      Petr Cvek 提交于
      A structure irq_data, irq_desc_get_irq() and irq_linear_revmap() use
      a different type than defined in the lantiq ICU driver, which is using
      signed integers. The substracted result should never be negative nor is
      tested for that situation. Change it to unsigned.
      Signed-off-by: NPetr Cvek <petrcvekcz@gmail.com>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: hauke@hauke-m.de
      Cc: john@phrozen.org
      Cc: linux-mips@vger.kernel.org
      Cc: openwrt-devel@lists.openwrt.org
      Cc: pakahmar@hotmail.com
      39588164
    • P
      MIPS: lantiq: Move macro directly to iomem function · aa0f58b4
      Petr Cvek 提交于
      Using the variable as a temporary holder for the macro of the register
      offset value is not necessary. Move it directly to the IOMEM read/write
      call.
      Signed-off-by: NPetr Cvek <petrcvekcz@gmail.com>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: hauke@hauke-m.de
      Cc: john@phrozen.org
      Cc: linux-mips@vger.kernel.org
      Cc: openwrt-devel@lists.openwrt.org
      Cc: pakahmar@hotmail.com
      aa0f58b4
    • S
      mips: Remove q-accessors from non-64bit platforms · 1e279144
      Serge Semin 提交于
      There are some generic drivers in the kernel, which make use of the
      q-accessors or their derivatives. While at current asm/io.h the accessors
      are defined, their implementation is only applicable either for 64bit
      systems, or for systems with cpu_has_64bits flag set. Obviously there
      are MIPS systems which are neither of these, but still need to have
      those drivers supported. In this case the solution is to define some
      generic versions of the q-accessors, but with a limitation to be
      non-atomic. Such accessors are defined in the
      io-64-nonatomic-{hi-lo,lo-hi}.h file. The drivers which utilize the
      q-suffixed IO-methods are supposed to include the header file, so
      in case if these accessors aren't defined for the platform, the generic
      non-atomic versions are utilized. Currently the MIPS-specific asm/io.h
      file provides the q-accessors for any MIPS system even for ones, which
      in fact don't support them and raise BUG() in case if any of them is
      called. Due to this the generic versions of the accessors are never
      used while an attempt to call the IO-methods causes the kernel BUG().
      In order to fix this we need to define the q-accessors only for
      the MIPS systems, which actually support them, and don't define them
      otherwise, so to let the corresponding drivers to use the non-atomic
      q-suffixed accessors.
      Signed-off-by: NSerge Semin <fancer.lancer@gmail.com>
      Suggested-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Vadim V. Vlasov <vadim.vlasov@t-platforms.ru>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Serge Semin <Sergey.Semin@t-platforms.ru>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      1e279144
    • D
      MIPS: Add missing EHB in mtc0 -> mfc0 sequence. · 0b24cae4
      Dmitry Korotin 提交于
      Add a missing EHB (Execution Hazard Barrier) in mtc0 -> mfc0 sequence.
      Without this execution hazard barrier it's possible for the value read
      back from the KScratch register to be the value from before the mtc0.
      
      Reproducible on P5600 & P6600.
      
      The hazard is documented in the MIPS Architecture Reference Manual Vol.
      III: MIPS32/microMIPS32 Privileged Resource Architecture (MD00088), rev
      6.03 table 8.1 which includes:
      
         Producer | Consumer | Hazard
        ----------|----------|----------------------------
         mtc0     | mfc0     | any coprocessor 0 register
      Signed-off-by: NDmitry Korotin <dkorotin@wavecomp.com>
      [paul.burton@mips.com:
        - Commit message tweaks.
        - Add Fixes tags.
        - Mark for stable back to v3.15 where P5600 support was introduced.]
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Fixes: 3d8bfdd0 ("MIPS: Use C0_KScratch (if present) to hold PGD pointer.")
      Fixes: 829dcc0a ("MIPS: Add MIPS P5600 probe support")
      Cc: linux-mips@vger.kernel.org
      Cc: stable@vger.kernel.org # v3.15+
      0b24cae4
  11. 21 6月, 2019 1 次提交
  12. 20 6月, 2019 2 次提交
  13. 19 6月, 2019 4 次提交
  14. 17 6月, 2019 1 次提交
    • H
      MIPS: Fix bounds check virt_addr_valid · d6ed083f
      Hauke Mehrtens 提交于
      The bounds check used the uninitialized variable vaddr, it should use
      the given parameter kaddr instead. When using the uninitialized value
      the compiler assumed it to be 0 and optimized this function to just
      return 0 in all cases.
      
      This should make the function check the range of the given address and
      only do the page map check in case it is in the expected range of
      virtual addresses.
      
      Fixes: 074a1e11 ("MIPS: Bounds check virt_addr_valid")
      Cc: stable@vger.kernel.org # v4.12+
      Cc: Paul Burton <paul.burton@mips.com>
      Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: ralf@linux-mips.org
      Cc: jhogan@kernel.org
      Cc: f4bug@amsat.org
      Cc: linux-mips@vger.kernel.org
      Cc: ysu@wavecomp.com
      Cc: jcristau@debian.org
      d6ed083f
  15. 16 6月, 2019 1 次提交