From: "Michael S. Tsirkin" <mst@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: "Xie, Huawei" <huawei.xie@intel.com>,
virtualization@lists.linux-foundation.org
Subject: [PATCH 1/4] tools/virtio: fix build after 4.2 changes
Date: Thu, 10 Sep 2015 10:23:42 +0300 [thread overview]
Message-ID: <1441869802-15847-2-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1441869802-15847-1-git-send-email-mst@redhat.com>
more stubs, mostly
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
tools/virtio/asm/barrier.h | 2 ++
tools/virtio/linux/export.h | 3 +++
tools/virtio/linux/kernel.h | 8 ++++++++
3 files changed, 13 insertions(+)
create mode 100644 tools/virtio/linux/export.h
diff --git a/tools/virtio/asm/barrier.h b/tools/virtio/asm/barrier.h
index aff61e1..26b7926 100644
--- a/tools/virtio/asm/barrier.h
+++ b/tools/virtio/asm/barrier.h
@@ -3,6 +3,8 @@
#define mb() __sync_synchronize()
#define smp_mb() mb()
+# define dma_rmb() barrier()
+# define dma_wmb() barrier()
# define smp_rmb() barrier()
# define smp_wmb() barrier()
/* Weak barriers should be used. If not - it's a bug */
diff --git a/tools/virtio/linux/export.h b/tools/virtio/linux/export.h
new file mode 100644
index 0000000..416875e
--- /dev/null
+++ b/tools/virtio/linux/export.h
@@ -0,0 +1,3 @@
+#define EXPORT_SYMBOL_GPL(sym) extern typeof(sym) sym
+#define EXPORT_SYMBOL(sym) extern typeof(sym) sym
+
diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h
index 1e8ce69..0a3da64 100644
--- a/tools/virtio/linux/kernel.h
+++ b/tools/virtio/linux/kernel.h
@@ -22,6 +22,7 @@
typedef unsigned long long dma_addr_t;
typedef size_t __kernel_size_t;
+typedef unsigned int __wsum;
struct page {
unsigned long long dummy;
@@ -47,6 +48,13 @@ static inline void *kmalloc(size_t s, gfp_t gfp)
return __kmalloc_fake;
return malloc(s);
}
+static inline void *kzalloc(size_t s, gfp_t gfp)
+{
+ void *p = kmalloc(s, gfp);
+
+ memset(p, 0, s);
+ return p;
+}
static inline void kfree(void *p)
{
--
MST
next prev parent reply other threads:[~2015-09-10 7:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-10 7:23 [PATCH 0/4] vhost test fixes Michael S. Tsirkin
2015-09-10 7:23 ` Michael S. Tsirkin [this message]
2015-09-10 7:23 ` [PATCH 2/4] vhost: move features to core Michael S. Tsirkin
2015-09-10 19:15 ` Sergei Shtylyov
2015-09-10 7:23 ` [PATCH 3/4] tools/virtio: propagate V=X to kernel build Michael S. Tsirkin
2015-09-10 7:23 ` [PATCH 4/4] virtio: introduce avail cache Michael S. Tsirkin
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=1441869802-15847-2-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=huawei.xie@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox