minor issues while compiling pv_ops kernel after last changes
Subsystems (3)
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<----
arch/x86/mm/gup.c +2 -0
@@ -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
arch/x86/mm/pgtable.c +2 -0
@@ -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);
drivers/xen/blktap/device.c +1 -1
@@ -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 { };
drivers/xen/blktap/ring.c +1 -1
@@ -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,
Signature · 2 lines
Bartosz Lis @ Inst. of Information Technology, Technical Univ. of Lodz, Poland bartoszl @ ics.p.lodz.pl
Quoted 11 lines · Bartosz Lis
1. Compilation error in
drivers/xen/blktap/device.cwhileCONFIG_XEN_BLKDEV_BACKEND=m
../blkback/blkback-pagemap.hshould be included whenCONFIG_XEN_BLKDEV_BACKENDis defined (forCONFIG_XEN_BLKDEV_BACKEND=y) as well as whenCONFIG_XEN_BLKDEV_BACKEND_MODULEis defined (forCONFIG_XEN_BLKDEV_BACKEND=m)the same problem is with
drivers/xen/blktap/ring.c
There are some changes from Jan in linux-2.6.18-xen.hg which were made after the point that the version of blktap2 in the pv-ops tree was forked which look like they resolve this issue. I was planning to take a look at them today but never got round to it.
Ian.