]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Fix compile error that occurs when CONFIG_ALTIVEC=n
authorPaul Mackerras <paulus@ozlabs.org>
Tue, 13 Feb 2018 04:16:01 +0000 (15:16 +1100)
committerPaul Mackerras <paulus@ozlabs.org>
Tue, 13 Feb 2018 04:23:39 +0000 (15:23 +1100)
commit7b943c8457531eaa01c88dc92f29e41fe9cc99e3
tree9678fd0269790ea5d0fa561455fade0e0e6154bd
parentae0945d7fbe5a6a5e767169d0c9ca622784b3c38
KVM: PPC: Fix compile error that occurs when CONFIG_ALTIVEC=n

Commit 112f8d6f2bd5 ("KVM: Move vcpu_load to arch-specific
kvm_arch_vcpu_ioctl_run", 2017-12-04) added a "goto out"
statement and an "out:" label to kvm_arch_vcpu_ioctl_run().
Since the only "goto out" is inside a CONFIG_VSX block,
compiling with CONFIG_VSX=n gives a warning that label "out"
is defined but not used, and because arch/powerpc is compiled
with -Werror, that becomes a compile error that makes the kernel
build fail.

Merge commit 39b3f485f089 ("Merge tag 'kvm-ppc-next-4.16-2' of
git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc",
2018-02-09) added a similar block of code inside a #ifdef
CONFIG_ALTIVEC, with a "goto out" statement.

In order to make the build succeed, this adds a #ifdef around the
"out:" label.  This is a minimal, ugly fix, to be replaced later
by a refactoring of the code.  Since CONFIG_VSX depends on
CONFIG_ALTIVEC, it is sufficient to use #ifdef CONFIG_ALTIVEC here.

Fixes: 112f8d6f2bd5 ("KVM: Move vcpu_load to arch-specific kvm_arch_vcpu_ioctl_run")
Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/powerpc.c