+36
−38
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
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:
Will Deacon <will.deacon@arm.com>
Bug: 31432001
Change-Id: Iacc638e1c93f6490dd615630901ca3804459be26
(cherry picked from commit 63648dd20fa0780ab6c1e923b5c276d257422cb3)
Signed-off-by:
Sami Tolvanen <samitolvanen@google.com>