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] [PATCH 05/15] [swiotlb] Respect the io_tlb_nslabs argument v

The search and replace removed the option to override
the amount of slabs via swiotlb=<x> argument. This puts
it back in.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
 lib/swiotlb.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 3499001..cf29f03 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -198,10 +198,11 @@ swiotlb_init_with_default_size(size_t default_size, int 
verbose)
 {
        unsigned long i, bytes;
 
-       if (!iommu_sw->nslabs) {
+       if (!io_tlb_nslabs) {
                iommu_sw->nslabs = (default_size >> IO_TLB_SHIFT);
                iommu_sw->nslabs = ALIGN(iommu_sw->nslabs, IO_TLB_SEGSIZE);
-       }
+       } else
+               iommu_sw->nslabs = io_tlb_nslabs;
 
        bytes = iommu_sw->nslabs << IO_TLB_SHIFT;
 
@@ -252,10 +253,11 @@ swiotlb_late_init_with_default_size(size_t default_size)
        unsigned long i, bytes, req_nslabs = iommu_sw->nslabs;
        unsigned int order;
 
-       if (!iommu_sw->nslabs) {
+       if (!io_tlb_nslabs) {
                iommu_sw->nslabs = (default_size >> IO_TLB_SHIFT);
                iommu_sw->nslabs = ALIGN(iommu_sw->nslabs, IO_TLB_SEGSIZE);
-       }
+       } else
+               iommu_sw->nslabs = io_tlb_nslabs;
 
        /*
         * Get IO TLB memory from the low pages
-- 
1.6.2.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

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