From 133fdfa35747b86e8a5ec5afd4d77889c82c17f8 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Tue, 16 Dec 2008 12:17:27 -0800 Subject: [PATCH] --- yaml --- r: 123204 b: refs/heads/master c: 0016fdee927f7aa0f428494bcf11ae60c7470a02 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/swiotlb.h | 14 ++++++++++++++ trunk/lib/swiotlb.c | 14 +------------- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index e1f747b39994..ae952189b0e1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8c5df16bec8a60bb8589fc232b9e26cac0ed4b2c +refs/heads/master: 0016fdee927f7aa0f428494bcf11ae60c7470a02 diff --git a/trunk/include/linux/swiotlb.h b/trunk/include/linux/swiotlb.h index b8c5fc766a56..58b996a642f9 100644 --- a/trunk/include/linux/swiotlb.h +++ b/trunk/include/linux/swiotlb.h @@ -7,6 +7,20 @@ struct device; struct dma_attrs; struct scatterlist; +/* + * Maximum allowable number of contiguous slabs to map, + * must be a power of 2. What is the appropriate value ? + * The complexity of {map,unmap}_single is linearly dependent on this value. + */ +#define IO_TLB_SEGSIZE 128 + + +/* + * log of the size of each IO TLB slab. The number of slabs is command line + * controllable. + */ +#define IO_TLB_SHIFT 11 + extern void swiotlb_init(void); diff --git a/trunk/lib/swiotlb.c b/trunk/lib/swiotlb.c index abecb2857556..db724ba7ebf6 100644 --- a/trunk/lib/swiotlb.c +++ b/trunk/lib/swiotlb.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -40,19 +41,6 @@ #define SG_ENT_VIRT_ADDRESS(sg) (sg_virt((sg))) #define SG_ENT_PHYS_ADDRESS(sg) virt_to_bus(SG_ENT_VIRT_ADDRESS(sg)) -/* - * Maximum allowable number of contiguous slabs to map, - * must be a power of 2. What is the appropriate value ? - * The complexity of {map,unmap}_single is linearly dependent on this value. - */ -#define IO_TLB_SEGSIZE 128 - -/* - * log of the size of each IO TLB slab. The number of slabs is command line - * controllable. - */ -#define IO_TLB_SHIFT 11 - #define SLABS_PER_PAGE (1 << (PAGE_SHIFT - IO_TLB_SHIFT)) /*