All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qian Cai <cai@lca.pw>
To: pbonzini@redhat.com, rkrcmar@redhat.com
Cc: karahmed@amazon.de, konrad.wilk@oracle.com, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, Qian Cai <cai@lca.pw>
Subject: [PATCH -next] kvm: fix compilation errors with mem[re|un]map()
Date: Fri, 17 May 2019 10:01:53 -0400	[thread overview]
Message-ID: <1558101713-15325-1-git-send-email-cai@lca.pw> (raw)

The linux-next commit e45adf665a53 ("KVM: Introduce a new guest mapping
API") introduced compilation errors on arm64.

arch/arm64/kvm/../../../virt/kvm/kvm_main.c:1764:9: error: implicit
declaration of function 'memremap'
[-Werror,-Wimplicit-function-declaration]
                hva = memremap(pfn_to_hpa(pfn), PAGE_SIZE, MEMREMAP_WB);
                      ^
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:1764:9: error: this function
declaration is not a prototype [-Werror,-Wstrict-prototypes]
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:1764:46: error: use of
undeclared identifier 'MEMREMAP_WB'
                hva = memremap(pfn_to_hpa(pfn), PAGE_SIZE, MEMREMAP_WB);
                                                           ^
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:1796:3: error: implicit
declaration of function 'memunmap'
[-Werror,-Wimplicit-function-declaration]
                memunmap(map->hva);

Fixed it by including io.h in kvm_main.c.

Signed-off-by: Qian Cai <cai@lca.pw>
---
 virt/kvm/kvm_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 8d83a787fd6b..5c5102799c2c 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -51,6 +51,7 @@
 #include <linux/slab.h>
 #include <linux/sort.h>
 #include <linux/bsearch.h>
+#include <linux/io.h>
 
 #include <asm/processor.h>
 #include <asm/io.h>
-- 
1.8.3.1


             reply	other threads:[~2019-05-17 14:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-17 14:01 Qian Cai [this message]
2019-05-17 14:04 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1558101713-15325-1-git-send-email-cai@lca.pw \
    --to=cai@lca.pw \
    --cc=karahmed@amazon.de \
    --cc=konrad.wilk@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --subject='Re: [PATCH -next] kvm: fix compilation errors with mem[re|un]map()' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.