[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Re: [Xen-staging] [xen-unstable] linux: User-space grant table device.



On Sat, 2007-03-31 at 16:56 +0100, Keir Fraser wrote:
> On 31/3/07 16:46, "Alex Williamson" <alex.williamson@xxxxxx> wrote:
> 
> >    Maybe this could be moved to a more common spot since only x86 builds
> > with CONFIG_XEN_UTIL?  Thanks,
> 
> You can't get much more generic than a file named 'util.c' at the root of
> drivers/xen.
> 
> Everyone should build it and the x86-specific portions (if there really are
> any -- it all looks pretty generic to me even if no other architectures
> currently use the functions defined in there) should be ifdef'ed or perhaps
> relocated to a new file.

   True, util.c ought to be a good place to dump stuff like this.
Unfortunately we define our own alloc/free_vm_area(), so the existing
functions in there are the problems.  Maybe those should be moved to
arch/i386/mach-xen/util.c, or ifdef out as below.  Thanks,

        Alex

Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---

diff -r fbe52b559161 linux-2.6-xen-sparse/arch/ia64/Kconfig
--- a/linux-2.6-xen-sparse/arch/ia64/Kconfig    Sat Mar 31 14:05:57 2007 +0100
+++ b/linux-2.6-xen-sparse/arch/ia64/Kconfig    Sat Mar 31 10:24:30 2007 -0600
@@ -577,7 +577,7 @@ source "crypto/Kconfig"
 #
 if XEN
 config XEN_UTIL
-       default n
+       default y
 
 config XEN_BALLOON
        default y
diff -r fbe52b559161 linux-2.6-xen-sparse/drivers/xen/util.c
--- a/linux-2.6-xen-sparse/drivers/xen/util.c   Sat Mar 31 14:05:57 2007 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/util.c   Sat Mar 31 10:24:01 2007 -0600
@@ -21,6 +21,8 @@ struct class *get_xen_class(void)
        return xen_class;
 }
 EXPORT_SYMBOL_GPL(get_xen_class);
+
+#ifndef CONFIG_IA64
 
 static int f(pte_t *pte, struct page *pmd_page, unsigned long addr, void *data)
 {
@@ -63,3 +65,5 @@ void free_vm_area(struct vm_struct *area
        kfree(area);
 }
 EXPORT_SYMBOL_GPL(free_vm_area);
+
+#endif /* !CONFIG_IA64 */





 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.