ia64/linux-2.6.18-xen.hg

changeset 652:4dc80607377d

xen: don't round up swiotlb slab count

This has been unnecessary for a long time, as
xen_create_contiguous_region() is no longer called on the whole area
at once, and the rounding can (under certain circumstances) prevent
the kernel from successfully booting when a larger than the default
size is needed.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Aug 29 16:12:50 2008 +0100 (2008-08-29)
parents e86b8e0ac6fd
children 6fcc6c1e87f6 8566781df55e
files lib/swiotlb-xen.c
line diff
     1.1 --- a/lib/swiotlb-xen.c	Thu Aug 21 10:36:07 2008 +0100
     1.2 +++ b/lib/swiotlb-xen.c	Fri Aug 29 16:12:50 2008 +0100
     1.3 @@ -114,9 +114,6 @@ setup_io_tlb_npages(char *str)
     1.4  		iotlb_nslabs = simple_strtoul(str, &str, 0) <<
     1.5  			(20 - IO_TLB_SHIFT);
     1.6  		iotlb_nslabs = ALIGN(iotlb_nslabs, IO_TLB_SEGSIZE);
     1.7 -		/* Round up to power of two (xen_create_contiguous_region). */
     1.8 -		while (iotlb_nslabs & (iotlb_nslabs-1))
     1.9 -			iotlb_nslabs += iotlb_nslabs & ~(iotlb_nslabs-1);
    1.10  	}
    1.11  	if (*str == ',')
    1.12  		++str;
    1.13 @@ -147,9 +144,6 @@ swiotlb_init_with_default_size (size_t d
    1.14  	if (!iotlb_nslabs) {
    1.15  		iotlb_nslabs = (default_size >> IO_TLB_SHIFT);
    1.16  		iotlb_nslabs = ALIGN(iotlb_nslabs, IO_TLB_SEGSIZE);
    1.17 -		/* Round up to power of two (xen_create_contiguous_region). */
    1.18 -		while (iotlb_nslabs & (iotlb_nslabs-1))
    1.19 -			iotlb_nslabs += iotlb_nslabs & ~(iotlb_nslabs-1);
    1.20  	}
    1.21  
    1.22  	bytes = iotlb_nslabs * (1UL << IO_TLB_SHIFT);