WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] PV-on-HVM: Include compatibility kzalloc

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] PV-on-HVM: Include compatibility kzalloc implementation for kernels
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 25 Oct 2006 15:20:35 +0000
Delivery-date: Wed, 25 Oct 2006 08:22:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
# Node ID 9f0b88aaf17076bcdc42dfef0870ba9f39e72f23
# Parent  db0d3f22e149d832e722173fa0e037e574db5f37
PV-on-HVM: Include compatibility kzalloc implementation for kernels
before 2.6.14.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@xxxxxxxxxx>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@xxxxxxxxxxxxxx>
---
 unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h |    4 ++
 unmodified_drivers/linux-2.6/platform-pci/platform-compat.c       |   17 
++++++++++
 2 files changed, 21 insertions(+)

diff -r db0d3f22e149 -r 9f0b88aaf170 
unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
--- a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h Wed Oct 
25 13:58:30 2006 +0100
+++ b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h Wed Oct 
25 13:58:30 2006 +0100
@@ -41,4 +41,8 @@ signed long schedule_timeout_interruptib
 signed long schedule_timeout_interruptible(signed long timeout);
 #endif
 
+#if defined(_LINUX_SLAB_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
+void *kzalloc(size_t size, int flags);
 #endif
+
+#endif
diff -r db0d3f22e149 -r 9f0b88aaf170 
unmodified_drivers/linux-2.6/platform-pci/platform-compat.c
--- a/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c       Wed Oct 
25 13:58:30 2006 +0100
+++ b/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c       Wed Oct 
25 13:58:30 2006 +0100
@@ -4,6 +4,7 @@
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/sched.h>
+#include <linux/slab.h>
 
 #include <xen/platform-compat.h>
 
@@ -97,3 +98,19 @@ signed long schedule_timeout_interruptib
 }
 EXPORT_SYMBOL(schedule_timeout_interruptible);
 #endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
+/**
+ * kzalloc - allocate memory. The memory is set to zero.
+ * @size: how many bytes of memory are required.
+ * @flags: the type of memory to allocate.
+ */
+void *kzalloc(size_t size, int flags)
+{
+       void *ret = kmalloc(size, flags);
+       if (ret)
+               memset(ret, 0, size);
+       return ret;
+}
+EXPORT_SYMBOL(kzalloc);
+#endif

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] PV-on-HVM: Include compatibility kzalloc implementation for kernels, Xen patchbot-unstable <=