Loading include/linux/swiotlb.h +14 −0 Original line number Diff line number Diff line Loading @@ -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); Loading lib/swiotlb.c +1 −13 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #include <linux/spinlock.h> #include <linux/swiotlb.h> #include <linux/string.h> #include <linux/swiotlb.h> #include <linux/types.h> #include <linux/ctype.h> Loading @@ -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)) /* Loading Loading
include/linux/swiotlb.h +14 −0 Original line number Diff line number Diff line Loading @@ -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); Loading
lib/swiotlb.c +1 −13 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #include <linux/spinlock.h> #include <linux/swiotlb.h> #include <linux/string.h> #include <linux/swiotlb.h> #include <linux/types.h> #include <linux/ctype.h> Loading @@ -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)) /* Loading