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

[Xen-devel] minor issues while compiling pv_ops kernel after last changes



Hello,

I had some minor issues while compiling pv_ops kernel after last changes.

1. Compilation error in drivers/xen/blktap/device.c while 
CONFIG_XEN_BLKDEV_BACKEND=m

../blkback/blkback-pagemap.h should be included when CONFIG_XEN_BLKDEV_BACKEND 
is defined (for 
CONFIG_XEN_BLKDEV_BACKEND=y) as well as when CONFIG_XEN_BLKDEV_BACKEND_MODULE 
is defined (for 
CONFIG_XEN_BLKDEV_BACKEND=m)

the same problem is with drivers/xen/blktap/ring.c

2. Compilation error in arch/x86/mm/gup.c while without XEN

mm->context.has_foreign_mappings is valid only when compiling with XEN, so I 
have surrounded this portion of 
code with #ifdef CONFIG_XEN

3. Linker error caused by undefined function xen_late_unpin_pgd when compiling 
without XEN

#ifdef CONFIG_XEN in void pgd_free() definition in arch/x86/mm/pgtable.c helped 
this time too.

See the attached patch solving the above issues.

----8<----
diff -Nurp linux-2.6-xen.orig/arch/x86/mm/gup.c 
linux-2.6-xen.BL/arch/x86/mm/gup.c
--- linux-2.6-xen.orig/arch/x86/mm/gup.c        2009-12-06 20:49:26.000000000 
+0000
+++ linux-2.6-xen.BL/arch/x86/mm/gup.c  2009-12-07 12:45:22.000000000 +0000
@@ -313,8 +313,10 @@ int get_user_pages_fast(unsigned long st
                goto slow_irqon;
 #endif
 
+#ifdef CONFIG_XEN
        if (unlikely(mm->context.has_foreign_mappings))
                goto slow_irqon;
+#endif
 
        /*
         * XXX: batch / limit 'nr', to avoid large irq off latency
diff -Nurp linux-2.6-xen.orig/arch/x86/mm/pgtable.c 
linux-2.6-xen.BL/arch/x86/mm/pgtable.c
--- linux-2.6-xen.orig/arch/x86/mm/pgtable.c    2009-12-06 20:49:26.000000000 
+0000
+++ linux-2.6-xen.BL/arch/x86/mm/pgtable.c      2009-12-07 12:45:22.000000000 
+0000
@@ -277,9 +277,11 @@ out:
 
 void pgd_free(struct mm_struct *mm, pgd_t *pgd)
 {
+#ifdef CONFIG_XEN
        /* EEW */
        extern void xen_late_unpin_pgd(struct mm_struct *mm, pgd_t *pgd);
        xen_late_unpin_pgd(mm, pgd);
+#endif
        pgd_mop_up_pmds(mm, pgd);
        pgd_dtor(pgd);
        paravirt_pgd_free(mm, pgd);
diff -Nurp linux-2.6-xen.orig/drivers/xen/blktap/device.c 
linux-2.6-xen.BL/drivers/xen/blktap/device.c
--- linux-2.6-xen.orig/drivers/xen/blktap/device.c      2009-12-06 
20:49:26.000000000 +0000
+++ linux-2.6-xen.BL/drivers/xen/blktap/device.c        2009-12-07 
12:45:24.000000000 +0000
@@ -16,7 +16,7 @@
 
 #include "blktap.h"
 
-#ifdef CONFIG_XEN_BLKDEV_BACKEND
+#if defined(CONFIG_XEN_BLKDEV_BACKEND) || 
defined(CONFIG_XEN_BLKDEV_BACKEND_MODULE)
 #include "../blkback/blkback-pagemap.h"
 #else
 struct blkback_pagemap { };
diff -Nurp linux-2.6-xen.orig/drivers/xen/blktap/ring.c 
linux-2.6-xen.BL/drivers/xen/blktap/ring.c
--- linux-2.6-xen.orig/drivers/xen/blktap/ring.c        2009-12-06 
20:49:26.000000000 +0000
+++ linux-2.6-xen.BL/drivers/xen/blktap/ring.c  2009-12-07 12:45:24.000000000 
+0000
@@ -8,7 +8,7 @@
 
 #include "blktap.h"
 
-#ifdef CONFIG_XEN_BLKDEV_BACKEND
+#if defined(CONFIG_XEN_BLKDEV_BACKEND) || 
defined(CONFIG_XEN_BLKDEV_BACKEND_MODULE)
 #include "../blkback/blkback-pagemap.h"
 #else
 #define blkback_pagemap_contains_page(page) 0
----8<----

Regards,

-- 
Bartosz Lis @ Inst. of Information Technology, Technical Univ. of Lodz, Poland
   bartoszl @ ics.p.lodz.pl


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


 


Rackspace

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