]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
powerpc/kvm: Fix the build for 32-bit Book 3S (classic) processors
authorPaul Mackerras <paulus@samba.org>
Wed, 11 May 2011 00:39:50 +0000 (00:39 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 20 May 2011 03:43:41 +0000 (13:43 +1000)
Commits a5d4f3ad3a ("powerpc: Base support for exceptions using
HSRR0/1") and 673b189a2e ("powerpc: Always use SPRN_SPRG_HSCRATCH0
when running in HV mode") cause compile and link errors for 32-bit
classic Book 3S processors when KVM is enabled.  This fixes these
errors.

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

index fdec5933305362ac6984fef87dd2c618618e190e..c5cae0dd176c300d2dddb86a36a018653e2aab40 100644 (file)
        FTR_SECTION_ELSE_NESTED(66);                    \
        mtspr   SPRN_SPRG_HSCRATCH0,rX;                 \
        ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_HVMODE_206, 66)
+
+#else /* CONFIG_PPC_BOOK3S_64 */
+#define GET_SCRATCH0(rX)       mfspr   rX,SPRN_SPRG_SCRATCH0
+#define SET_SCRATCH0(rX)       mtspr   SPRN_SPRG_SCRATCH0,rX
+
 #endif
 
 #ifdef CONFIG_PPC_BOOK3E_64
index ae99af66ca340a36c95afeac6fb167d8fd8b88fb..1a1b34487e718ecc54d1bf5338100b8a9c05c288 100644 (file)
@@ -112,7 +112,9 @@ INTERRUPT_TRAMPOLINE        BOOK3S_INTERRUPT_MACHINE_CHECK
 INTERRUPT_TRAMPOLINE   BOOK3S_INTERRUPT_DATA_STORAGE
 INTERRUPT_TRAMPOLINE   BOOK3S_INTERRUPT_INST_STORAGE
 INTERRUPT_TRAMPOLINE   BOOK3S_INTERRUPT_EXTERNAL
+#ifdef CONFIG_PPC_BOOK3S_64
 INTERRUPT_TRAMPOLINE   BOOK3S_INTERRUPT_EXTERNAL_HV
+#endif
 INTERRUPT_TRAMPOLINE   BOOK3S_INTERRUPT_ALIGNMENT
 INTERRUPT_TRAMPOLINE   BOOK3S_INTERRUPT_PROGRAM
 INTERRUPT_TRAMPOLINE   BOOK3S_INTERRUPT_FP_UNAVAIL