1. 26 9月, 2014 1 次提交
  2. 18 7月, 2014 1 次提交
    • R
      ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ · 6ebbf2ce
      Russell King 提交于
      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: NWill 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: NShawn 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: NRussell King <rmk+kernel@arm.linux.org.uk>
      6ebbf2ce
  3. 02 6月, 2014 2 次提交
  4. 30 5月, 2014 1 次提交
    • A
      ARM: 8062/1: Modify ldrt fixup handler to re-execute the userspace instruction · 3780f7ab
      Arun K S 提交于
      We will reach fixup handler when one thread(say cpu0) caused an undefined exception, while another thread(say cpu1) is unmmaping the page.
      
      Fixup handler returns to the next userspace instruction which has caused the undef execption, rather than going to the same instruction.
      
      ARM ARM says that after undefined exception, the PC will be pointing
      to the next instruction. ie +4 offset in case of ARM and +2 in case of Thumb
      
      And there is no correction offset passed to vector_stub in case of
      undef exception.
      
      File: arch/arm/kernel/entry-armv.S +1085
      vector_stub     und, UND_MODE
      
      During an undefined exception, in normal scenario(ie when ldrt
      instruction does not cause an abort) after resorting the context in
      VFP hardware, the PC is modified as show below before jumping to
      ret_from_exception which is in r9.
      
      File: arch/arm/vfp/vfphw.S +169
      @ The context stored in the VFP hardware is up to date with this thread
      vfp_hw_state_valid:
         tst     r1, #FPEXC_EX
         bne     process_exception     @ might as well handle the pending
                                       @ exception before retrying branch
                                       @ out before setting an FPEXC that
                                       @ stops us reading stuff
              VFPFMXR FPEXC, r1        @ Restore FPEXC last
              sub     r2, r2, #4       @ Retry current instruction - if Thumb
              str     r2, [sp, #S_PC]  @ mode it's two 16-bit instructions,
                                       @ else it's one 32-bit instruction, so
                                       @ always subtract 4 from the following
                                       @ instruction address.
      
      But if ldrt results in an abort, we reach the fixup handler and return
      to ret_from_execption without correcting the pc.
      
      This patch modifes the fixup handler to re-execute the same instruction which caused undefined execption.
      Signed-off-by: NVinayak Menon <vinayakm.list@gmail.com>
      Signed-off-by: NArun KS <getarunks@gmail.com>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      3780f7ab
  5. 25 4月, 2014 1 次提交
  6. 28 1月, 2014 1 次提交
  7. 07 11月, 2013 1 次提交
  8. 20 10月, 2013 1 次提交
  9. 07 8月, 2013 1 次提交
    • R
      ARM: Fix !kuser helpers case · 1b16c4bc
      Russell King 提交于
      Fix yet another build failure caused by a weird set of configuration
      settings:
      
        LD      init/built-in.o
      arch/arm/kernel/built-in.o: In function `__dabt_usr':
      /home/tom3q/kernel/arch/arm/kernel/entry-armv.S:377: undefined reference to `kuser_cmpxchg64_fixup'
      arch/arm/kernel/built-in.o: In function `__irq_usr':
      /home/tom3q/kernel/arch/arm/kernel/entry-armv.S:387: undefined reference to `kuser_cmpxchg64_fixup'
      
      caused by:
      CONFIG_KUSER_HELPERS=n
      CONFIG_CPU_32v6K=n
      CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG=n
      Reported-by: NTomasz Figa <tomasz.figa@gmail.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      1b16c4bc
  10. 01 8月, 2013 5 次提交
  11. 24 6月, 2013 1 次提交
  12. 04 4月, 2013 1 次提交
    • K
      ARM: 7688/1: add support for context tracking subsystem · b0088480
      Kevin Hilman 提交于
      commit 91d1aa43 (context_tracking: New context tracking susbsystem)
      generalized parts of the RCU userspace extended quiescent state into
      the context tracking subsystem.  Context tracking is then used
      to implement adaptive tickless (a.k.a extended nohz)
      
      To support the new context tracking subsystem on ARM, the user/kernel
      boundary transtions need to be instrumented.
      
      For exceptions and IRQs in usermode, the existing usr_entry macro is
      used to instrument the user->kernel transition.  For the return to
      usermode path, the ret_to_user* path is instrumented.  Using the
      usr_entry macro, this covers interrupts in userspace, data abort and
      prefetch abort exceptions in userspace as well as undefined exceptions
      in userspace (which is where FP emulation and VFP are handled.)
      
      For syscalls, the slow return path is covered by instrumenting the
      ret_to_user path.  In addition, the syscall entry point is
      instrumented which covers the user->kernel transition for both fast
      and slow syscalls, and an additional instrumentation point is added
      for the fast syscall return path (ret_fast_syscall).
      
      Cc: Mats Liljegren <mats.liljegren@enea.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NKevin Hilman <khilman@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      b0088480
  13. 03 4月, 2013 2 次提交
  14. 24 2月, 2013 1 次提交
  15. 31 7月, 2012 1 次提交
    • R
      ARM: Fix undefined instruction exception handling · 15ac49b6
      Russell King 提交于
      While trying to get a v3.5 kernel booted on the cubox, I noticed that
      VFP does not work correctly with VFP bounce handling.  This is because
      of the confusion over 16-bit vs 32-bit instructions, and where PC is
      supposed to point to.
      
      The rule is that FP handlers are entered with regs->ARM_pc pointing at
      the _next_ instruction to be executed.  However, if the exception is
      not handled, regs->ARM_pc points at the faulting instruction.
      
      This is easy for ARM mode, because we know that the next instruction and
      previous instructions are separated by four bytes.  This is not true of
      Thumb2 though.
      
      Since all FP instructions are 32-bit in Thumb2, it makes things easy.
      We just need to select the appropriate adjustment.  Do this by moving
      the adjustment out of do_undefinstr() into the assembly code, as only
      the assembly code knows whether it's dealing with a 32-bit or 16-bit
      instruction.
      
      Cc: <stable@vger.kernel.org>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      15ac49b6
  16. 16 6月, 2012 1 次提交
  17. 05 5月, 2012 1 次提交
  18. 29 3月, 2012 1 次提交
  19. 14 3月, 2012 1 次提交
  20. 22 2月, 2012 1 次提交
  21. 03 2月, 2012 1 次提交
  22. 27 11月, 2011 1 次提交
  23. 16 11月, 2011 1 次提交
  24. 17 10月, 2011 2 次提交
  25. 02 7月, 2011 9 次提交