• Will Deacon's avatar
    arm64: entry: use ldp/stp instead of push/pop when saving/restoring regs · 63648dd2
    Will Deacon authored
    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: default avatarWill Deacon <will.deacon@arm.com>
    63648dd2
entry.S 15.8 KB