1. 03 9月, 2015 6 次提交
  2. 26 8月, 2015 11 次提交
  3. 05 8月, 2015 1 次提交
    • D
      MIPS: Make set_pte() SMP safe. · 46011e6e
      David Daney 提交于
      On MIPS the GLOBAL bit of the PTE must have the same value in any
      aligned pair of PTEs.  These pairs of PTEs are referred to as
      "buddies".  In a SMP system is is possible for two CPUs to be calling
      set_pte() on adjacent PTEs at the same time.  There is a race between
      setting the PTE and a different CPU setting the GLOBAL bit in its
      buddy PTE.
      
      This race can be observed when multiple CPUs are executing
      vmap()/vfree() at the same time.
      
      Make setting the buddy PTE's GLOBAL bit an atomic operation to close
      the race condition.
      
      The case of CONFIG_64BIT_PHYS_ADDR && CONFIG_CPU_MIPS32 is *not*
      handled.
      Signed-off-by: NDavid Daney <david.daney@cavium.com>
      Cc: <stable@vger.kernel.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/10835/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      46011e6e
  4. 03 8月, 2015 3 次提交
    • J
      MIPS: Flush RPS on kernel entry with EVA · 3aff47c0
      James Hogan 提交于
      When EVA is enabled, flush the Return Prediction Stack (RPS) present on
      some MIPS cores on entry to the kernel from user mode.
      
      This is important specifically for interAptiv with EVA enabled,
      otherwise kernel mode RPS mispredicts may trigger speculative fetches of
      user return addresses, which may be sensitive in the kernel address
      space due to EVA's overlapping user/kernel address spaces.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Leonid Yegoshin <leonid.yegoshin@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: <stable@vger.kernel.org> # 3.15.x-
      Patchwork: https://patchwork.linux-mips.org/patch/10812/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      3aff47c0
    • F
      Revert "MIPS: BCM63xx: Provide a plat_post_dma_flush hook" · 247bfb65
      Florian Fainelli 提交于
      This reverts commit 3cf29543 ("MIPS:
      BCM63xx: Provide a plat_post_dma_flush hook") since this commit was
      found to prevent BCM6358 (early BMIPS4350 cores) and some BCM6368
      (BMIPS4380 cores) from booting reliably.
      
      Alvaro was able to track this down to an issue specifically located to
      devices that use the second thread (TP1) when booting. Since BCM63xx did
      not have a need for plat_post_dma_flush() hook before, let's just keep
      things the way they were.
      Reported-by: NÁlvaro Fernández Rojas <noltari@gmail.com>
      Reported-by: NJonas Gorski <jogo@openwrt.org>
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Cc: stable@vger.kernel.org
      Cc: Kevin Cernekee <cernekee@gmail.com>
      Cc: Nicolas Schichan <nschichan@freebox.fr>
      Cc: linux-mips@linux-mips.org
      Cc: blogic@openwrt.org
      Cc: noltari@gmail.com
      Cc: jogo@openwrt.org
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: stable@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/10804/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      247bfb65
    • A
      MIPS: SMP: Don't increment irq_count multiple times for call function IPIs · 4ace6139
      Alex Smith 提交于
      The majority of SMP platforms handle their IPIs through do_IRQ()
      which calls irq_{enter/exit}(). When a call function IPI is received,
      smp_call_function_interrupt() is called which also calls
      irq_{enter,exit}(), meaning irq_count is raised twice.
      
      When tick broadcasting is used (which is implemented via a call
      function IPI), this incorrectly causes all CPU idle time on the core
      receiving broadcast ticks to be accounted as time spent servicing
      IRQs, as account_process_tick() will account as such if irq_count is
      greater than 1. This results in 100% CPU usage being reported on a
      core which receives its ticks via broadcast.
      
      This patch removes the SMP smp_call_function_interrupt() wrapper which
      calls irq_{enter,exit}(). Platforms which handle their IPIs through
      do_IRQ() now call generic_smp_call_function_interrupt() directly to
      avoid incrementing irq_count a second time. Platforms which don't
      (loongson, sgi-ip27, sibyte) call generic_smp_call_function_interrupt()
      wrapped in irq_{enter,exit}().
      Signed-off-by: NAlex Smith <alex.smith@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/10770/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      4ace6139
  5. 19 7月, 2015 1 次提交
  6. 18 7月, 2015 1 次提交
  7. 15 7月, 2015 1 次提交
    • R
      MIPS: SB1: Remove support for Pass 1 parts. · dd0bc75e
      Ralf Baechle 提交于
      Pass 1 parts had a number of significant erratas and were only available
      in small numbers and under NDA.  Full support also required the use of a
      special toolchain that kept branches properly aligned.  These workarounds
      were never upstreamed and the only toolchain known to have them is
      Montavista's GCC 3.0-based toolchain which completly obsoleted if not
      useless these days.
      
      So now that automated testing has tripped over the user of the
      -msb1-pass1-workarounds option, rather than fixing it remove support for
      pass 1 parts.
      
      Probably nobody will notice.  I seem to own the last know pass 1 board
      and I haven't noticed another one in the wild in the past decade, at
      least.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      dd0bc75e
  8. 10 7月, 2015 1 次提交
    • M
      MIPS: c-r4k: Fix cache flushing for MT cores · cccf34e9
      Markos Chandras 提交于
      MT_SMP is not the only SMP option for MT cores. The MT_SMP option
      allows more than one VPE per core to appear as a secondary CPU in the
      system. Because of how CM works, it propagates the address-based
      cache ops to the secondary cores but not the index-based ones.
      Because of that, the code does not use IPIs to flush the L1 caches on
      secondary cores because the CM would have done that already. However,
      the CM functionality is independent of the type of SMP kernel so even in
      non-MT kernels, IPIs are not necessary. As a result of which, we change
      the conditional to depend on the CM presence. Moreover, since VPEs on
      the same core share the same L1 caches, there is no need to send an
      IPI on all of them so we calculate a suitable cpumask with only one
      VPE per core.
      Signed-off-by: NMarkos Chandras <markos.chandras@imgtec.com>
      Cc: <stable@vger.kernel.org> # 3.15+
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/10654/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      cccf34e9
  9. 08 7月, 2015 1 次提交
  10. 26 6月, 2015 1 次提交
  11. 25 6月, 2015 3 次提交
  12. 24 6月, 2015 2 次提交
  13. 22 6月, 2015 8 次提交
    • L
      MIPS: Replace smp_mb with release barrier function in unlocks. · 6f6ed482
      Leonid Yegoshin 提交于
      Repleace smp_mb() in arch_write_unlock() and __clear_bit_unlock() to
      smp_mb__before_llsc() call which does "release" barrier functionality.
      
      It seems like it was missed in commit f252ffd5
      during introduction of "acquire" and "release" semantics.
      
      [ralf@linux-mips: The original patch submission was labelled a fix but
      actually it replaces a barrier with another less restrictive type of
      barrier so it doesn't fix any ill behaviour but rather squeezes out a
      tad better performance.  Further improvments will be possible once
      smp_release() has been merged.]
      Signed-off-by: NLeonid Yegoshin <Leonid.Yegoshin@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: benh@kernel.crashing.org
      Cc: will.deacon@arm.com
      Cc: linux-kernel@vger.kernel.org
      Cc: markos.chandras@imgtec.com
      Cc: macro@linux-mips.org
      Cc: Steven.Hill@imgtec.com
      Cc: alexander.h.duyck@redhat.com
      Cc: davem@davemloft.net
      Patchwork: https://patchwork.linux-mips.org/patch/10507/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      6f6ed482
    • P
      MIPS: i8259: DT support · 5f93ef5c
      Paul Burton 提交于
      Support probing the i8259 programmable interrupt controller, as found on
      the Malta board, and using its interrupts via device tree.
      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: Qais Yousef <qais.yousef@imgtec.com>
      Cc: Andrew Bresticker <abrestic@chromium.org>
      Cc: linux-kernel@vger.kernel.org
      Patchwork: http://patchwork.linux-mips.org/patch/10114/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      5f93ef5c
    • P
      MIPS: include errno.h for ENODEV in mips-cm.h · 56d4c99b
      Paul Burton 提交于
      A later patch in this series will include mips-cm.h but does not require
      errno.h. This leads to a build failure with ENODEV undeclared. Include
      errno.h from mips-cm.h to pull in the appropriate definition and avoid
      the build failure.
      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: James Hogan <james.hogan@imgtec.com>
      Cc: linux-kernel@vger.kernel.org
      Patchwork: http://patchwork.linux-mips.org/patch/10113/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      56d4c99b
    • P
      MIPS: Define GCR_GIC_STATUS register fields · 921d55e3
      Paul Burton 提交于
      Add definitions for the GICEX field in the GCR_GIC_STATUS register to
      mips-cm.h for use in a later patch.
      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: James Hogan <james.hogan@imgtec.com>
      Cc: linux-kernel@vger.kernel.org
      Patchwork: http://patchwork.linux-mips.org/patch/10112/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      921d55e3
    • J
      MIPS: Xtalk: Update xwidget.h with known Xtalk device numbers · de5792a4
      Joshua Kinard 提交于
      This is the first patch of two to clean up/update the Xtalk detection
      code used by IP27 with some of the code used in the IP30 port.
      
      This specific patch adds Xtalk widget manufacturer and widget device
      numbers to arch/mips/include/asm/xtalk/widget.h
      Signed-off-by: NJoshua Kinard <kumba@gentoo.org>
      Cc: Linux MIPS List <linux-mips@linux-mips.org>
      Patchwork: http://patchwork.linux-mips.org/patch/10174/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      de5792a4
    • P
      MIPS: Optimise non-EVA kernel user memory accesses · 12060666
      Paul Burton 提交于
      Commits ac1d8590 (MIPS: asm: uaccess: Use EVA instructions
      wrappers), 05c65160 (MIPS: asm: uaccess: Add EVA support to
      copy_{in, to,from}_user) & e3a9b07a (MIPS: asm: uaccess: Add EVA
      support for str*_user operations) added checks to various user memory
      access functions & macros in order to determine whether to perform
      standard memory accesses or their EVA userspace equivalents. In kernels
      built without support for EVA these checks are entirely redundant. Avoid
      emitting them & allow the compiler to optimise out the EVA userspace
      code in such kernels by checking config_enabled(CONFIG_EVA).
      
      This reduces the size of a malta_defconfig kernel built using GCC 4.9.2
      by approximately 33KB (from 5995072 to 5962304 bytes).
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Patchwork: http://patchwork.linux-mips.org/patch/10165/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      12060666
    • R
      MIPS: prepare for user enabling of CONFIG_OF · 01306aea
      Rob Herring 提交于
      In preparation to allow users to enable DeviceTree without arch or
      machine selecting it, we need to fix build errors on MIPS. When
      CONFIG_OF is enabled, device_tree_init cannot be resolved. This is
      trivially fixed by using CONFIG_USE_OF instead of CONFIG_OF for prom.h.
      Signed-off-by: NRob Herring <robh@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      01306aea
    • J
      MIPS: R12000: Enable branch prediction global history · 8d5ded16
      Joshua Kinard 提交于
      The R12000 added a new feature to enhance branch prediction called
      "global history".  Per the Vr10000 Series User Manual (U10278EJ4V0UM),
      Coprocessor 0, Diagnostic Register (22):
      
      """
      If bit 26 is set, branch prediction uses all eight bits of the global
      history register.  If bit 26 is not set, then bits 25:23 specify a count
      of the number of bits of global history to be used. Thus if bits 26:23
      are all zero, global history is disabled.
      
      The global history contains a record of the taken/not-taken status of
      recently executed branches, and when used is XOR'ed with the PC of a
      branch being predicted to produce a hashed value for indexing the BPT.
      Some programs with small "working set of conditional branches" benefit
      significantly from the use of such hashing, some see slight performance
      degradation.
      """
      
      This patch enables global history on R12000 CPUs and up by setting bit
      26 in the branch prediction diagnostic register (CP0 $22) to '1'.  Bits
      25:23 are left alone so that all eight bits of the global history
      register are available for branch prediction.
      Signed-off-by: NJoshua Kinard <kumba@gentoo.org>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      8d5ded16