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-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] minor issues while compiling pv_ops kernel after last changes
From: Bartosz Lis <bartoszl@xxxxxxxxxxxxx>
Date: Mon, 7 Dec 2009 17:27:06 +0100
Delivery-date: Mon, 07 Dec 2009 08:27:36 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Politechnika Łódzka
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.12.4 (Linux/2.6.28.10-3; KDE/4.3.4; x86_64; ; )
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

<Prev in Thread] Current Thread [Next in Thread>