linux/arch/powerpc/kernel/vdso64
Scott Wood 9d378dfac8 powerpc/booke64: Use SPRG7 for VDSO
Previously SPRG3 was marked for use by both VDSO and critical
interrupts (though critical interrupts were not fully implemented).

In commit 8b64a9dfb0 ("powerpc/booke64:
Use SPRG0/3 scratch for bolted TLB miss & crit int"), Mihai Caraman
made an attempt to resolve this conflict by restoring the VDSO value
early in the critical interrupt, but this has some issues:

 - It's incompatible with EXCEPTION_COMMON which restores r13 from the
   by-then-overwritten scratch (this cost me some debugging time).
 - It forces critical exceptions to be a special case handled
   differently from even machine check and debug level exceptions.
 - It didn't occur to me that it was possible to make this work at all
   (by doing a final "ld r13, PACA_EXCRIT+EX_R13(r13)") until after
   I made (most of) this patch. :-)

It might be worth investigating using a load rather than SPRG on return
from all exceptions (except TLB misses where the scratch never leaves
the SPRG) -- it could save a few cycles.  Until then, let's stick with
SPRG for all exceptions.

Since we cannot use SPRG4-7 for scratch without corrupting the state of
a KVM guest, move VDSO to SPRG7 on book3e.  Since neither SPRG4-7 nor
critical interrupts exist on book3s, SPRG3 is still used for VDSO
there.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Mihai Caraman <mihai.caraman@freescale.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: kvm-ppc@vger.kernel.org
2014-03-19 19:57:14 -05:00
..
.gitignore [POWERPC] Update .gitignore for new vdso generated files 2007-10-08 08:38:12 -05:00
cacheflush.S [POWERPC] vdso: Fixes for cache block sizes 2007-11-20 13:56:31 +11:00
datapage.S
getcpu.S powerpc/booke64: Use SPRG7 for VDSO 2014-03-19 19:57:14 -05:00
gettimeofday.S powerpc: Add VDSO version of time 2013-04-23 16:05:05 +10:00
Makefile powerpc: Add VDSO version of getcpu 2012-07-11 14:18:40 +10:00
note.S
sigtramp.S powerpc: Wrong DWARF CFI in the kernel vdso for little-endian / ELFv2 2013-11-21 09:19:23 +11:00
vdso64_wrapper.S powerpc: Use unstripped VDSO image for more accurate profiling data 2014-02-17 11:19:37 +11:00
vdso64.lds.S powerpc: Add ability to build little endian kernels 2013-10-11 16:48:56 +11:00