1. 14 11月, 2014 2 次提交
    • W
      arm64: entry: use ldp/stp instead of push/pop when saving/restoring regs · 63648dd2
      Will Deacon 提交于
      The push/pop instructions can be suboptimal when saving/restoring large
      amounts of data to/from the stack, for example on entry/exit from the
      kernel. This is because:
      
        (1) They act on descending addresses (i.e. the newly decremented sp),
            which may defeat some hardware prefetchers
      
        (2) They introduce an implicit dependency between each instruction, as
            the sp has to be updated in order to resolve the address of the
            next access.
      
      This patch removes the push/pop instructions from our kernel entry/exit
      macros in favour of ldp/stp plus offset.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      63648dd2
    • W
      arm64: entry: avoid writing lr explicitly for constructing return paths · d54e81f9
      Will Deacon 提交于
      Using an explicit adr instruction to set the link register to point at
      ret_fast_syscall/ret_to_user can defeat branch and return stack predictors.
      
      Instead, use the standard calling instructions (bl, blr) and have an
      unconditional branch as the following instruction.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      d54e81f9
  2. 23 9月, 2014 1 次提交
  3. 10 7月, 2014 3 次提交
  4. 18 6月, 2014 1 次提交
  5. 12 5月, 2014 3 次提交
  6. 08 5月, 2014 1 次提交
    • A
      arm64: defer reloading a task's FPSIMD state to userland resume · 005f78cd
      Ard Biesheuvel 提交于
      If a task gets scheduled out and back in again and nothing has touched
      its FPSIMD state in the mean time, there is really no reason to reload
      it from memory. Similarly, repeated calls to kernel_neon_begin() and
      kernel_neon_end() will preserve and restore the FPSIMD state every time.
      
      This patch defers the FPSIMD state restore to the last possible moment,
      i.e., right before the task returns to userland. If a task does not return to
      userland at all (for any reason), the existing FPSIMD state is preserved
      and may be reused by the owning task if it gets scheduled in again on the
      same CPU.
      
      This patch adds two more functions to abstract away from straight FPSIMD
      register file saves and restores:
      - fpsimd_restore_current_state -> ensure current's FPSIMD state is loaded
      - fpsimd_flush_task_state -> invalidate live copies of a task's FPSIMD state
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      005f78cd
  7. 13 1月, 2014 1 次提交
  8. 20 12月, 2013 1 次提交
  9. 26 11月, 2013 1 次提交
    • M
      arm64: let the core code deal with preempt_count · 64681787
      Marc Zyngier 提交于
      Commit f27dde8d (sched: Add NEED_RESCHED to the preempt_count)
      introduced the use of bit 31 in preempt_count for obscure scheduling
      purposes.
      
      This causes interrupts taken from EL0 to hit the (open coded) BUG when
      this flag is flipped while handling the interrupt (we compare the
      values before and after, and kill the kernel if they are different).
      
      The fix is to stop messing with the preempt count entirely, as this
      is already being dealt with in the generic code (irq_enter/irq_exit).
      
      Tested on a dual A53 FPGA running cyclictest.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      64681787
  10. 05 11月, 2013 1 次提交
  11. 03 9月, 2013 1 次提交
  12. 22 8月, 2013 1 次提交
  13. 26 7月, 2013 1 次提交
  14. 31 5月, 2013 1 次提交
    • M
      arm64: treat unhandled compat el0 traps as undef · 381cc2b9
      Mark Rutland 提交于
      Currently, if a compat process reads or writes from/to a disabled
      cp15/cp14 register, the trap is not handled by the el0_sync_compat
      handler, and the kernel will head to bad_mode, where it will die(), and
      oops(). For 64 bit processes, disabled system register accesses are
      currently treated as unhandled instructions.
      
      This patch modifies entry.S to treat these unhandled traps as undefined
      instructions, sending a SIGILL to userspace. This gives processes a
      chance to handle this and stop using inaccessible registers, and
      prevents further issues in the kernel as a result of the die().
      Reported-by: NJohannes Jensen <Johannes.Jensen@arm.com>
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      381cc2b9
  15. 17 4月, 2013 1 次提交
  16. 14 2月, 2013 1 次提交
  17. 05 12月, 2012 1 次提交
  18. 23 10月, 2012 1 次提交
  19. 17 10月, 2012 3 次提交
  20. 11 10月, 2012 1 次提交
  21. 09 10月, 2012 1 次提交
  22. 17 9月, 2012 1 次提交