Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/kvm: Fix the build for 32-bit Book 3S (classic) processors

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>

authored by

Paul Mackerras and committed by
Benjamin Herrenschmidt
593adf31 44075d95

+7
+5
arch/powerpc/include/asm/reg.h
··· 824 824 FTR_SECTION_ELSE_NESTED(66); \ 825 825 mtspr SPRN_SPRG_HSCRATCH0,rX; \ 826 826 ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_HVMODE_206, 66) 827 + 828 + #else /* CONFIG_PPC_BOOK3S_64 */ 829 + #define GET_SCRATCH0(rX) mfspr rX,SPRN_SPRG_SCRATCH0 830 + #define SET_SCRATCH0(rX) mtspr SPRN_SPRG_SCRATCH0,rX 831 + 827 832 #endif 828 833 829 834 #ifdef CONFIG_PPC_BOOK3E_64
+2
arch/powerpc/kvm/book3s_rmhandlers.S
··· 112 112 INTERRUPT_TRAMPOLINE BOOK3S_INTERRUPT_DATA_STORAGE 113 113 INTERRUPT_TRAMPOLINE BOOK3S_INTERRUPT_INST_STORAGE 114 114 INTERRUPT_TRAMPOLINE BOOK3S_INTERRUPT_EXTERNAL 115 + #ifdef CONFIG_PPC_BOOK3S_64 115 116 INTERRUPT_TRAMPOLINE BOOK3S_INTERRUPT_EXTERNAL_HV 117 + #endif 116 118 INTERRUPT_TRAMPOLINE BOOK3S_INTERRUPT_ALIGNMENT 117 119 INTERRUPT_TRAMPOLINE BOOK3S_INTERRUPT_PROGRAM 118 120 INTERRUPT_TRAMPOLINE BOOK3S_INTERRUPT_FP_UNAVAIL