[{"id":1477236,"web_url":"http://patchwork.ozlabs.org/comment/1477236/","msgid":"<20161010023415.GA18173@fergus.ozlabs.ibm.com>","date":"2016-10-10T02:34:15","subject":"Re: [PATCH 2/2] KVM: PPC: sparse: prototypes for functions called\n\tfrom assembler","submitter":{"id":67079,"url":"http://patchwork.ozlabs.org/api/people/67079/","name":"Paul Mackerras","email":"paulus@ozlabs.org"},"content":"On Mon, Oct 10, 2016 at 11:31:20AM +1100, Daniel Axtens wrote:\n> A bunch of KVM functions are only called from assembler.\n> Give them prototypes in asm-prototypes.h\n> This reduces sparse warnings.\n> \n> Signed-off-by: Daniel Axtens <dja@axtens.net>\n> ---\n>  arch/powerpc/include/asm/asm-prototypes.h | 44 +++++++++++++++++++++++++++++++\n>  arch/powerpc/kvm/book3s_64_vio_hv.c       |  1 +\n>  arch/powerpc/kvm/book3s_hv_builtin.c      |  1 +\n>  arch/powerpc/kvm/book3s_hv_ras.c          |  1 +\n>  arch/powerpc/kvm/book3s_hv_rm_mmu.c       |  1 +\n>  arch/powerpc/kvm/book3s_hv_rm_xics.c      |  1 +\n>  6 files changed, 49 insertions(+)\n> \n> diff --git a/arch/powerpc/include/asm/asm-prototypes.h b/arch/powerpc/include/asm/asm-prototypes.h\n> index d1492736d852..6c853bcd11fa 100644\n> --- a/arch/powerpc/include/asm/asm-prototypes.h\n> +++ b/arch/powerpc/include/asm/asm-prototypes.h\n> @@ -14,6 +14,9 @@\n>  \n>  #include <linux/threads.h>\n>  #include <linux/kprobes.h>\n> +#ifdef CONFIG_KVM\n> +#include <linux/kvm_host.h>\n> +#endif\n>  \n>  #include <uapi/asm/ucontext.h>\n>  \n> @@ -109,4 +112,45 @@ void early_setup_secondary(void);\n>  /* time */\n>  void accumulate_stolen_time(void);\n>  \n> +/* kvm */\n> +#ifdef CONFIG_KVM\n\nWhy do we need this ifdef?  Does the compilation break without it when\nCONFIG_KVM = n?\n\nPaul.","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3sskkD5DJDz9ryZ\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 10 Oct 2016 13:35:16 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3sskkD4QWdzDsww\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 10 Oct 2016 13:35:16 +1100 (AEDT)","from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3sskj56ktHzDrL1\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tMon, 10 Oct 2016 13:34:17 +1100 (AEDT)","by ozlabs.org (Postfix, from userid 1003)\n\tid 3sskj55B5nz9s2Q; Mon, 10 Oct 2016 13:34:17 +1100 (AEDT)"],"Date":"Mon, 10 Oct 2016 13:34:15 +1100","From":"Paul Mackerras <paulus@ozlabs.org>","To":"Daniel Axtens <dja@axtens.net>","Subject":"Re: [PATCH 2/2] KVM: PPC: sparse: prototypes for functions called\n\tfrom assembler","Message-ID":"<20161010023415.GA18173@fergus.ozlabs.ibm.com>","References":"<1476059480-18145-1-git-send-email-dja@axtens.net>\n\t<1476059480-18145-2-git-send-email-dja@axtens.net>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<1476059480-18145-2-git-send-email-dja@axtens.net>","User-Agent":"Mutt/1.5.24 (2015-08-30)","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org,\n\tkvm@vger.kernel.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1477245,"web_url":"http://patchwork.ozlabs.org/comment/1477245/","msgid":"<87a8ecykxy.fsf@possimpible.ozlabs.ibm.com>","date":"2016-10-10T02:52:41","subject":"Re: [PATCH 2/2] KVM: PPC: sparse: prototypes for functions called\n\tfrom assembler","submitter":{"id":65792,"url":"http://patchwork.ozlabs.org/api/people/65792/","name":"Daniel Axtens","email":"dja@axtens.net"},"content":"Paul Mackerras <paulus@ozlabs.org> writes:\n\n> On Mon, Oct 10, 2016 at 11:31:20AM +1100, Daniel Axtens wrote:\n>> A bunch of KVM functions are only called from assembler.\n>> Give them prototypes in asm-prototypes.h\n>> This reduces sparse warnings.\n>> \n>> Signed-off-by: Daniel Axtens <dja@axtens.net>\n>> ---\n>>  arch/powerpc/include/asm/asm-prototypes.h | 44 +++++++++++++++++++++++++++++++\n>>  arch/powerpc/kvm/book3s_64_vio_hv.c       |  1 +\n>>  arch/powerpc/kvm/book3s_hv_builtin.c      |  1 +\n>>  arch/powerpc/kvm/book3s_hv_ras.c          |  1 +\n>>  arch/powerpc/kvm/book3s_hv_rm_mmu.c       |  1 +\n>>  arch/powerpc/kvm/book3s_hv_rm_xics.c      |  1 +\n>>  6 files changed, 49 insertions(+)\n>> \n>> diff --git a/arch/powerpc/include/asm/asm-prototypes.h b/arch/powerpc/include/asm/asm-prototypes.h\n>> index d1492736d852..6c853bcd11fa 100644\n>> --- a/arch/powerpc/include/asm/asm-prototypes.h\n>> +++ b/arch/powerpc/include/asm/asm-prototypes.h\n>> @@ -14,6 +14,9 @@\n>>  \n>>  #include <linux/threads.h>\n>>  #include <linux/kprobes.h>\n>> +#ifdef CONFIG_KVM\n>> +#include <linux/kvm_host.h>\n>> +#endif\n>>  \n>>  #include <uapi/asm/ucontext.h>\n>>  \n>> @@ -109,4 +112,45 @@ void early_setup_secondary(void);\n>>  /* time */\n>>  void accumulate_stolen_time(void);\n>>  \n>> +/* kvm */\n>> +#ifdef CONFIG_KVM\n>\n> Why do we need this ifdef?  Does the compilation break without it when\n> CONFIG_KVM = n?\n\nYes it does - the 0day build bot picked it up when I did v1 without the\nifdef.\n\nSee: https://lists.01.org/pipermail/kbuild-all/2016-September/024742.html\n\nFor example:\n\n   arch/powerpc/include/asm/asm-prototypes.h:82:7: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]\n          unsigned long tce_list, unsigned long npages);\n          ^\n   arch/powerpc/include/asm/asm-prototypes.h:85:7: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]\n          unsigned long tce_value, unsigned long npages);\n          ^\n   arch/powerpc/include/asm/asm-prototypes.h:87:29: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]\n                                unsigned int yield_count);\n                                ^\n   arch/powerpc/include/asm/asm-prototypes.h:88:29: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]\n    long kvmppc_h_random(struct kvm_vcpu *vcpu);\n\n\nRegards,\nDaniel","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3ssl863WTXz9ry7\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 10 Oct 2016 13:54:14 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3ssl862HL8zDsWf\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 10 Oct 2016 13:54:14 +1100 (AEDT)","from mail-pa0-x242.google.com (mail-pa0-x242.google.com\n\t[IPv6:2607:f8b0:400e:c03::242])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3ssl6Q5DhDzDrL1\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tMon, 10 Oct 2016 13:52:46 +1100 (AEDT)","by mail-pa0-x242.google.com with SMTP id rw4so1387047pab.3\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tSun, 09 Oct 2016 19:52:46 -0700 (PDT)","from localhost ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id\n\tyo3sm49104160pac.42.2016.10.09.19.52.43\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSun, 09 Oct 2016 19:52:44 -0700 (PDT)"],"Authentication-Results":["ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=axtens.net header.i=@axtens.net\n\theader.b=IMpDC4fJ; dkim-atps=neutral","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=axtens.net header.i=@axtens.net\n\theader.b=IMpDC4fJ; dkim-atps=neutral","lists.ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=axtens.net header.i=@axtens.net\n\theader.b=IMpDC4fJ; dkim-atps=neutral"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google;\n\th=from:to:cc:subject:in-reply-to:references:user-agent:date\n\t:message-id:mime-version;\n\tbh=mqVQyVFKlnQelX8/4rFgLqTVtcJ9ZRMjj93f1L88HAI=;\n\tb=IMpDC4fJR8SMYfSnFHzqAZWSCD5kvKp5FU2qjcOFrp0M8VY3i6dQUIxKTZ4q8jsNLs\n\tJpBxISu5xbcb9mEeYRhzofkVrMG/e2KeRS8PlbohXCfaCQ7XIepZnw00qxyOHfCT03Oi\n\t21ql/YFEUQTT1cdRMYnf1el3zTNhrJc1hVZAY=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:in-reply-to:references\n\t:user-agent:date:message-id:mime-version;\n\tbh=mqVQyVFKlnQelX8/4rFgLqTVtcJ9ZRMjj93f1L88HAI=;\n\tb=OHZHO/j4l5CJ59Rq/A63MoPlt1lb7N2qM8BSQJvtdYPQb6X0cwznB5erdiFLB53gFu\n\tWDRGf1qvo9edjF6dH8pdYvK0BRPQ0jksA7Vx3Hjry3e5VMQDjQUusGwxGTD6b2xRGrhE\n\t7AEdMW53ASaYuoiQ6THmrEkx7wUCjyunTp8HZP1+Ljj9OipKaXIpM4YVGUix5LqMXEyk\n\t3wrL1WPgB8PDV9Mxg3zv/JXGer7+ATtvLCF17lQVr/1Qg4upDOK/I2F0S6cpcdXITlAo\n\t1IwM08T19Qi3bGfjiVZiOCZBWmj2ie4uEF7J3dlAJzBqH6UMmYF2la0dY9vao6D1ipGe\n\t9ilA==","X-Gm-Message-State":"AA6/9RkjZ/ucJpZTjnGOaqhjYKaBF/v++w9mPlGCmjmGQp/h6QA16dyzxLPl6aeAcxGE9g==","X-Received":"by 10.66.117.167 with SMTP id kf7mr50755786pab.110.1476067964666;\n\tSun, 09 Oct 2016 19:52:44 -0700 (PDT)","From":"Daniel Axtens <dja@axtens.net>","To":"Paul Mackerras <paulus@ozlabs.org>","Subject":"Re: [PATCH 2/2] KVM: PPC: sparse: prototypes for functions called\n\tfrom assembler","In-Reply-To":"<20161010023415.GA18173@fergus.ozlabs.ibm.com>","References":"<1476059480-18145-1-git-send-email-dja@axtens.net>\n\t<1476059480-18145-2-git-send-email-dja@axtens.net>\n\t<20161010023415.GA18173@fergus.ozlabs.ibm.com>","User-Agent":"Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1\n\t(x86_64-pc-linux-gnu)","Date":"Mon, 10 Oct 2016 13:52:41 +1100","Message-ID":"<87a8ecykxy.fsf@possimpible.ozlabs.ibm.com>","MIME-Version":"1.0","Content-Type":"text/plain","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org,\n\tkvm@vger.kernel.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1514303,"web_url":"http://patchwork.ozlabs.org/comment/1514303/","msgid":"<20161121050509.GI26748@fergus.ozlabs.ibm.com>","date":"2016-11-21T05:05:09","subject":"Re: [PATCH 2/2] KVM: PPC: sparse: prototypes for functions called\n\tfrom assembler","submitter":{"id":67079,"url":"http://patchwork.ozlabs.org/api/people/67079/","name":"Paul Mackerras","email":"paulus@ozlabs.org"},"content":"On Mon, Oct 10, 2016 at 11:31:20AM +1100, Daniel Axtens wrote:\n> A bunch of KVM functions are only called from assembler.\n> Give them prototypes in asm-prototypes.h\n> This reduces sparse warnings.\n> \n> Signed-off-by: Daniel Axtens <dja@axtens.net>\n\nThanks, applied to kvm-ppc-next.\n\nPaul.","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3tMc9F0XVlz9t1F\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 21 Nov 2016 16:09:53 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3tMc9D6tGwzDw60\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 21 Nov 2016 16:09:52 +1100 (AEDT)","from ozlabs.org (ozlabs.org [103.22.144.67])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3tMc7k5jhqzDt3R\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tMon, 21 Nov 2016 16:08:34 +1100 (AEDT)","by ozlabs.org (Postfix, from userid 1003)\n\tid 3tMc7k4QcKz9t1h; Mon, 21 Nov 2016 16:08:34 +1100 (AEDT)"],"Date":"Mon, 21 Nov 2016 16:05:09 +1100","From":"Paul Mackerras <paulus@ozlabs.org>","To":"Daniel Axtens <dja@axtens.net>","Subject":"Re: [PATCH 2/2] KVM: PPC: sparse: prototypes for functions called\n\tfrom assembler","Message-ID":"<20161121050509.GI26748@fergus.ozlabs.ibm.com>","References":"<1476059480-18145-1-git-send-email-dja@axtens.net>\n\t<1476059480-18145-2-git-send-email-dja@axtens.net>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<1476059480-18145-2-git-send-email-dja@axtens.net>","User-Agent":"Mutt/1.5.24 (2015-08-30)","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org,\n\tkvm@vger.kernel.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}}]