Index: linux-2.6-xen-sparse/arch/i386/mm/ioremap-xen.c =================================================================== --- linux-2.6-xen-sparse.orig/arch/i386/mm/ioremap-xen.c +++ linux-2.6-xen-sparse/arch/i386/mm/ioremap-xen.c @@ -91,7 +91,13 @@ static int __direct_remap_pfn_range(stru v++; } - if (v != u) { + /* + * If we didn't finish the page in the previous loop then we + * need to process it now. We take into account the v++ + * at the end of the loop, so the test to know if we finished + * or not is really a +1 difference and not an equal. + */ + if ((v - u) != 1) { /* get the ptep's filled in */ rc = apply_to_page_range(mm, start_address, address - start_address,