linux/arch/powerpc
Michael Neuling bc2e6c6ac2 powerpc: Avoid link stack corruption for MMU on exceptions
When we have MMU on exceptions (POWER8) and a relocatable kernel, we
need to branch from the initial exception vectors at 0x0 to up high
where the kernel might be located.  Currently we do this using the link
register.

Unfortunately this corrupts the link stack and instead we should use the
count register.  We did this for the syscall entry path in:
  6a40480 powerpc: Avoid link stack corruption in MMU on syscall entry path
but I stupidly forgot to do the same for other exceptions.

This patch changes the initial exception vectors to use the count
register instead of the link register when we need to branch up to the
relocated kernel.

I have a dodgy userspace test which loops calling a function that reads
the PVR (mfpvr in userspace will be emulated by the kernel via the
program check exception).  On POWER8 and with CONFIG_RELOCATABLE=y, I
get a ~10% performance improvement with my userspace test with this
patch.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-08-14 15:33:18 +10:00
..
boot powerpc: Ignore zImage.epapr 2013-08-14 15:00:03 +10:00
configs powerpc/mpc85xx: Only emulate the unimplemented FP instructions on corenet64 2013-08-14 14:59:31 +10:00
crypto powerpc: Fix compile of sha1-powerpc-asm.S on 32-bit 2013-03-05 16:56:26 +11:00
include powerpc: Avoid link stack corruption for MMU on exceptions 2013-08-14 15:33:18 +10:00
kernel powerpc: Make chip-id information available to userspace 2013-08-14 15:33:17 +10:00
kvm powerpc: Stop using non-architected shared_proc field in lppaca 2013-08-14 11:50:26 +10:00
lib powerpc: Fix single step emulation of 32bit overflowed branches 2013-06-20 16:55:13 +10:00
math-emu powerpc/math-emu: Fix load/store indexed emulation 2013-08-14 14:59:57 +10:00
mm powerpc: Implement __get_user_pages_fast() 2013-08-14 14:57:14 +10:00
net ppc: bpf_jit: can call module_free() from any context 2013-05-20 14:03:50 -07:00
oprofile powerpc/perf: add 2 additional performance monitor counters for e6500 core 2013-08-07 18:38:03 -05:00
perf powerpc: Fix a number of sparse warnings 2013-08-14 11:50:24 +10:00
platforms powerpc/eeh: powerpc/eeh: Fix undefined variable 2013-08-14 15:33:16 +10:00
sysdev powerpc/pci: fix PCI-e check link issue 2013-08-07 18:38:08 -05:00
xmon Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-05-02 10:16:16 -07:00
Kconfig powerpc: split She math emulation into two parts 2013-08-14 14:59:19 +10:00
Kconfig.debug Merge branch 'kconfig-diet' from Dave Hansen 2013-07-04 11:25:51 -07:00
Makefile Revert "powerpc/e500: Update compilation flags with core specific options" 2013-08-14 15:00:28 +10:00
relocs_check.pl Fix warning typo "CONFIG_RELCOATABLE" 2013-05-29 15:11:30 +02:00