]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Always use SPRN_SPRG_HSCRATCH0 when running in HV mode
authorPaul Mackerras <paulus@samba.org>
Tue, 5 Apr 2011 03:59:58 +0000 (13:59 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 20 Apr 2011 01:03:23 +0000 (11:03 +1000)
commit3007b9f9b38f37c462cc84209ca16cffb1866ace
tree71d5842f2dcfcd24370ef25f35c97f0f81ebae87
parent8874012dcbaeaeb305afdf1dfb090724f067ae36
powerpc: Always use SPRN_SPRG_HSCRATCH0 when running in HV mode

This uses feature sections to arrange that we always use HSPRG1
as the scratch register in the interrupt entry code rather than
SPRG2 when we're running in hypervisor mode on POWER7.  This will
ensure that we don't trash the guest's SPRG2 when we are running
KVM guests.  To simplify the code, we define GET_SCRATCH0() and
SET_SCRATCH0() macros like the GET_PACA/SET_PACA macros.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/exception-64s.h
arch/powerpc/include/asm/reg.h
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/kvm/book3s_rmhandlers.S
arch/powerpc/kvm/book3s_segment.S
arch/powerpc/platforms/iseries/exception.S
arch/powerpc/platforms/iseries/exception.h