From patchwork Tue Feb 13 19:04:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christian Zigotzky X-Patchwork-Id: 10217333 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E8CAB60467 for ; Tue, 13 Feb 2018 19:10:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D8D78287FD for ; Tue, 13 Feb 2018 19:10:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCF3828A71; Tue, 13 Feb 2018 19:10:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MIME_QP_LONG_LINE, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8151428DA8 for ; Tue, 13 Feb 2018 19:10:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754234AbeBMTKn (ORCPT ); Tue, 13 Feb 2018 14:10:43 -0500 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.217]:14267 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751819AbeBMTKm (ORCPT ); Tue, 13 Feb 2018 14:10:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1518549040; s=strato-dkim-0002; d=xenosoft.de; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date: In-Reply-To:From:Subject:Content-Type:X-RZG-CLASS-ID:X-RZG-AUTH; bh=9dzYVIrj0s5pjn/XHCx/XJ++foTmspjeJa3v9XO0wyo=; b=EtW9YUVBX/YuOQO/K69eDnkvxJTpbW3mAWV6fQri1puZm2555usrj+zR+N8d9fBcEO je9Dct9rCAPRNDrKwdBMMnnMdeJ+l980IuS4C7QRpgGO0T+3xdv+Nh6+D6B/4GwWA3KD iQHVQPvPhPynsYj70LScHHLbw1B1SuoRkjJu9NfubKLTwimh47UUhttGTUi7DwlJLLaE 5I2VnygunaOMvI+HIuw5j69owj1YlzU1u7ADptPvIygLC5X1PCAGl4EfCwyL3pRpB3SZ woFmqq1iouvcnRe2pw2fWkNoFudcuI3bBuElmtw6355s4BN9D/yoTjPMOieD1Uwuh953 t4gg== X-RZG-AUTH: :L2QefEenb+UdBJSdRCXu93KJ1bmSGnhMdmOod1DhGN0rBVhd9dFr6KxrfO5Oh7R7b2dxjbpixCXv0LwcdHFM0gWKFYVoJyflY3Xo0uIY X-RZG-CLASS-ID: mo00 Mime-Version: 1.0 (1.0) Subject: [PATCH 1/2] KVM: PPC: Fix compile error that occurs when CONFIG_ALTIVEC=n From: Christian Zigotzky X-Mailer: iPhone Mail (15C202) In-Reply-To: <20180213045130.r35rdy24uokzixho@oak.ozlabs.ibm.com> Date: Tue, 13 Feb 2018 20:04:39 +0100 Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Message-Id: References: <20180213045130.r35rdy24uokzixho@oak.ozlabs.ibm.com> To: Paul Mackerras Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP I successfully compiled the latest Git kernel with this patch without enabled AltiVec for my Freescale P5020 board today. The patch works without any problems. — Christian Sent from my iPhone On 13. Feb 2018, at 05:51, Paul Mackerras wrote: Commit accb757d798c ("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 1ab03c072feb ("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: accb757d798c ("KVM: Move vcpu_load to arch-specific kvm_arch_vcpu_ioctl_run") Reported-by: Christian Zigotzky Signed-off-by: Paul Mackerras --- arch/powerpc/kvm/powerpc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 403e642c78f5..0083142c2f84 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -1608,7 +1608,9 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run) kvm_sigset_deactivate(vcpu); +#ifdef CONFIG_ALTIVEC out: +#endif vcpu_put(vcpu); return r; }