aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/bitops.h
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2013-02-27 10:45:52 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-03-05 16:56:28 +1100
commit6a404806dfceba9b154015705a9e647fa7749fd8 (patch)
tree773110aa64ab8777c7ca4ba56a5556a6262de7d1 /arch/powerpc/include/asm/bitops.h
parentdrivers/tty/hvc: Use strlcpy instead of strncpy (diff)
downloadlinux-dev-6a404806dfceba9b154015705a9e647fa7749fd8.tar.xz
linux-dev-6a404806dfceba9b154015705a9e647fa7749fd8.zip
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/powerpc/include/asm/bitops.h')
0 files changed, 0 insertions, 0 deletions