Skip to content
  1. Jul 18, 2014
    • Shawn Guo's avatar
      ARM: 8103/1: save/restore Cortex-A9 CP15 registers on suspend/resume · ddd0c530
      Shawn Guo authored
      
      
      The CP15 diagnostic register holds ARM errata bits on Cortex-A9, so it
      needs to be saved/restored on suspend/resume.  Otherwise, the
      effectiveness of errata workaround gets lost together with diagnostic
      register bit across suspend/resume cycle.  And the CP15 power control
      register of Cortex-A9 shares the same problem.
      
      The patch adds a couple of Cortex-A9 specific suspend/resume functions
      to save/restore these two Cortex-A9 CP15 registers across the
      suspend/resume cycle.
      
      Signed-off-by: default avatarShawn Guo <shawn.guo@freescale.com>
      Acked-by: default avatarNicolas Pitre <nico@linaro.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      ddd0c530
    • Will Deacon's avatar
      ARM: 8098/1: mcs lock: implement wfe-based polling for MCS locking · bf67fd31
      Will Deacon authored
      
      
      This patch introduces a wfe-based polling loop for spinning on contended
      MCS locks and waking up corresponding waiters when the lock is released.
      
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      bf67fd31
    • Daniel Thompson's avatar
      ARM: 8091/2: add get_user() support for 8 byte types · e38361d0
      Daniel Thompson authored
      
      
      Recent contributions, including to DRM and binder, introduce 64-bit
      values in their interfaces. A common motivation for this is to allow
      the same ABI for 32- and 64-bit userspaces (and therefore also a shared
      ABI for 32/64 hybrid userspaces). Anyhow, the developers would like to
      avoid gotchas like having to use copy_from_user().
      
      This feature is already implemented on x86-32 and the majority of other
      32-bit architectures. The current list of get_user_8 hold out
      architectures are: arm, avr32, blackfin, m32r, metag, microblaze,
      mn10300, sh.
      
      Credit:
      
          My name sits rather uneasily at the top of this patch. The v1 and
          v2 versions of the patch were written by Rob Clark and to produce v4
          I mostly copied code from Russell King and H. Peter Anvin. However I
          have mangled the patch sufficiently that *blame* is rightfully mine
          even if credit should more widely shared.
      
      Changelog:
      
      v5: updated to use the ret macro (requested by Russell King)
      v4: remove an inlined add on big endian systems (spotted by Russell King),
          used __ARMEB__ rather than BIG_ENDIAN (to match rest of file),
          cleared r3 on EFAULT during __get_user_8.
      v3: fix a couple of checkpatch issues
      v2: pass correct size to check_uaccess, and better handling of narrowing
          double word read with __get_user_xb() (Russell King's suggestion)
      v1: original
      
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      Signed-off-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      e38361d0
    • Baruch Siach's avatar
      ARM: 8097/1: unistd.h: relocate comments back to place · bc994c77
      Baruch Siach authored
      
      
      Commit cb8db5d4 (UAPI: (Scripted) Disintegrate arch/arm/include/asm) moved
      these syscall comments out of their context into the UAPI headers. Fix this.
      
      Fixes: cb8db5d4 ("UAPI: (Scripted) Disintegrate arch/arm/include/asm")
      
      Signed-off-by: default avatarBaruch Siach <baruch@tkos.co.il>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      bc994c77
    • Nikolay Borisov's avatar
      ARM: 8070/1: Introduce arm_get_current_stack_frame() · 9865f1d4
      Nikolay Borisov authored
      Currently there are numerous places where "struct pt_regs" are used to
      populate "struct stackframe", however all of those location do not
      consider the situation where the kernel might be compiled in THUMB2
      mode, in which case the framepointer member of pt_regs become ARM_r7
      instead of ARM_fp (r11). Document this idiosyncracy in the
      definition of "struct stackframe"
      
      The easiest solution is to introduce a new function (in the spirit of
      https://groups.google.com/forum/#!topic/linux.kernel/dA2YuUcSpZ4
      
      )
      which would hide the complexity of initializing the stackframe struct
      from pt_regs.
      
      Also implement a macro frame_pointer(regs) that would return the correct
      register so that we can use it in cases where we just require the frame
      pointer and not a whole struct stackframe
      
      Signed-off-by: default avatarNikolay Borisov <Nikolay.Borisov@arm.com>
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      Acked-by: default avatarRobert Richter <rric@kernel.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      9865f1d4
    • Russell King's avatar
      ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ · 6ebbf2ce
      Russell King authored
      
      
      ARMv6 and greater introduced a new instruction ("bx") which can be used
      to return from function calls.  Recent CPUs perform better when the
      "bx lr" instruction is used rather than the "mov pc, lr" instruction,
      and this sequence is strongly recommended to be used by the ARM
      architecture manual (section A.4.1.1).
      
      We provide a new macro "ret" with all its variants for the condition
      code which will resolve to the appropriate instruction.
      
      Rather than doing this piecemeal, and miss some instances, change all
      the "mov pc" instances to use the new macro, with the exception of
      the "movs" instruction and the kprobes code.  This allows us to detect
      the "mov pc, lr" case and fix it up - and also gives us the possibility
      of deploying this for other registers depending on the CPU selection.
      
      Reported-by: default avatarWill Deacon <will.deacon@arm.com>
      Tested-by: Stephen Warren <swarren@nvidia.com> # Tegra Jetson TK1
      Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> # mioa701_bootresume.S
      Tested-by: Andrew Lunn <andrew@lunn.ch> # Kirkwood
      Tested-by: default avatarShawn Guo <shawn.guo@freescale.com>
      Tested-by: Tony Lindgren <tony@atomide.com> # OMAPs
      Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com> # Armada XP, 375, 385
      Acked-by: Sekhar Nori <nsekhar@ti.com> # DaVinci
      Acked-by: Christoffer Dall <christoffer.dall@linaro.org> # kvm/hyp
      Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com> # PXA3xx
      Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> # Xen
      Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> # ARMv7M
      Tested-by: Simon Horman <horms+renesas@verge.net.au> # Shmobile
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      6ebbf2ce
    • Russell King's avatar
      ARM: make it easier to check the CPU part number correctly · af040ffc
      Russell King authored
      
      
      Ensure that platform maintainers check the CPU part number in the right
      manner: the CPU part number is meaningless without also checking the
      CPU implement(e|o)r (choose your preferred spelling!)  Provide an
      interface which returns both the implementer and part number together,
      and update the definitions to include the implementer.
      
      Mark the old function as being deprecated... indeed, using the old
      function with the definitions will now always evaluate as false, so
      people must update their un-merged code to the new function.  While
      this could be avoided by adding new definitions, we'd also have to
      create new names for them which would be awkward.
      
      Acked-by: default avatarNicolas Pitre <nico@linaro.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      af040ffc
    • Nicolas Pitre's avatar
      ARM: 8081/1: MCPM: provide infrastructure to allow for MCPM loopback · 3721924c
      Nicolas Pitre authored
      
      
      The kernel already has the responsibility to handle resources such as the
      
      CCI when hotplugging CPUs, during the booting of secondary CPUs, and when
      resuming from suspend/idle.  It would be more coherent and less confusing
      if the CCI for the boot CPU (or cluster)  was also initialized by the
      kernel rather than expecting the firmware/bootloader to do it and only in
      that case. After all, the kernel has all the necessary code already and
      the bootloader shouldn't have to care at all.
      
      The CCI may be turned on only when the cache is off. Leveraging the CPU
      suspend code to loop back through the low-level MCPM entry point is all
      that is needed to properly turn on the CCI from the kernel by using the
      same code as during secondary boot.
      
      Let's provide a generic MCPM loopback function that can be invoked by
      backend initialization code to set things (CCI or similar) on the boot
      CPU just as it is done for the other CPUs.
      
      Signed-off-by: default avatarNicolas Pitre <nico@linaro.org>
      Reviewed-by: default avatarKevin Hilman <khilman@linaro.org>
      Tested-by: default avatarKevin Hilman <khilman@linaro.org>
      Tested-by: default avatarDoug Anderson <dianders@chromium.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      3721924c
  2. Jul 01, 2014
  3. Jun 29, 2014
  4. Jun 18, 2014
  5. Jun 17, 2014
  6. Jun 07, 2014
  7. Jun 02, 2014
  8. Jun 01, 2014
  9. May 30, 2014
  10. May 29, 2014
  11. May 28, 2014
  12. May 27, 2014
  13. May 25, 2014
  14. May 23, 2014
  15. May 22, 2014
Loading