[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] The entire swiotlb aperture does not need to be contiguous.
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 7b6f55756f9c3079e9fb46cfe44a7c14f16a81b0 # Parent 2de42ce9ffffe24e10b7204389516bf4028034f5 The entire swiotlb aperture does not need to be contiguous. Only individual aligned SEGSIZE blocks need to be contiguous. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> diff -r 2de42ce9ffff -r 7b6f55756f9c linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c Fri Aug 19 09:36:12 2005 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c Fri Aug 19 09:42:12 2005 @@ -94,9 +94,6 @@ iotlb_nslabs = simple_strtoul(str, &str, 0) << (20 - IO_TLB_SHIFT); iotlb_nslabs = ALIGN(iotlb_nslabs, IO_TLB_SEGSIZE); - /* Round up to power of two (xen_create_contiguous_region). */ - while (iotlb_nslabs & (iotlb_nslabs-1)) - iotlb_nslabs += iotlb_nslabs & ~(iotlb_nslabs-1); } if (*str == ',') ++str; @@ -123,9 +120,6 @@ if (!iotlb_nslabs) { iotlb_nslabs = (default_size >> IO_TLB_SHIFT); iotlb_nslabs = ALIGN(iotlb_nslabs, IO_TLB_SEGSIZE); - /* Round up to power of two (xen_create_contiguous_region). */ - while (iotlb_nslabs & (iotlb_nslabs-1)) - iotlb_nslabs += iotlb_nslabs & ~(iotlb_nslabs-1); } bytes = iotlb_nslabs * (1UL << IO_TLB_SHIFT); @@ -139,8 +133,10 @@ "Use dom0_mem Xen boot parameter to reserve\n" "some DMA memory (e.g., dom0_mem=-128M).\n"); - xen_create_contiguous_region( - (unsigned long)iotlb_virt_start, get_order(bytes)); + for (i = 0; i < iotlb_nslabs; i += IO_TLB_SEGSIZE) + xen_create_contiguous_region( + (unsigned long)iotlb_virt_start + (i << IO_TLB_SHIFT), + get_order(IO_TLB_SEGSIZE << IO_TLB_SHIFT)); iotlb_virt_end = iotlb_virt_start + bytes; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |