diff options
author | Michael Neuling <mikey@neuling.org> | 2013-02-27 14:45:52 +0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-03-05 09:56:28 +0400 |
commit | 6a404806dfceba9b154015705a9e647fa7749fd8 (patch) | |
tree | 773110aa64ab8777c7ca4ba56a5556a6262de7d1 /arch/score/mm/cache.c | |
parent | 9276dfd27897a0b29d8b5814f39a1f82f56b6b6b (diff) | |
download | linux-6a404806dfceba9b154015705a9e647fa7749fd8.tar.xz |
powerpc: Avoid link stack corruption in MMU on syscall entry path
Currently we use the link register to branch up high in the early MMU on
syscall entry path. Unfortunately, this trashes the link stack as the
address we are going to is not associated with the earlier mflr.
This patch simply converts us to used the count register (volatile over
syscalls anyway) instead. This is much better at predicting in this
scenario and doesn't trash link stack causing a bunch of additional
branch mispredicts later. Benchmarking this on POWER8 saves a bunch of
cycles on Anton's null syscall benchmark here:
http://ozlabs.org/~anton/junkcode/null_syscall.c
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/score/mm/cache.c')
0 files changed, 0 insertions, 0 deletions