aboutsummaryrefslogtreecommitdiffstats
path: root/lib/swiotlb.c
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2008-12-16 15:17:27 -0500
committerIngo Molnar <mingo@elte.hu>2008-12-16 15:31:40 -0500
commit0016fdee927f7aa0f428494bcf11ae60c7470a02 (patch)
treeca1080f691efe9c6f76965d38fface872fb856ac /lib/swiotlb.c
parent8c5df16bec8a60bb8589fc232b9e26cac0ed4b2c (diff)
swiotlb: move some definitions to header
Impact: cleanup Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'lib/swiotlb.c')
-rw-r--r--lib/swiotlb.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index abecb2857556..db724ba7ebf6 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -23,6 +23,7 @@
23#include <linux/spinlock.h> 23#include <linux/spinlock.h>
24#include <linux/swiotlb.h> 24#include <linux/swiotlb.h>
25#include <linux/string.h> 25#include <linux/string.h>
26#include <linux/swiotlb.h>
26#include <linux/types.h> 27#include <linux/types.h>
27#include <linux/ctype.h> 28#include <linux/ctype.h>
28 29
@@ -40,19 +41,6 @@
40#define SG_ENT_VIRT_ADDRESS(sg) (sg_virt((sg))) 41#define SG_ENT_VIRT_ADDRESS(sg) (sg_virt((sg)))
41#define SG_ENT_PHYS_ADDRESS(sg) virt_to_bus(SG_ENT_VIRT_ADDRESS(sg)) 42#define SG_ENT_PHYS_ADDRESS(sg) virt_to_bus(SG_ENT_VIRT_ADDRESS(sg))
42 43
43/*
44 * Maximum allowable number of contiguous slabs to map,
45 * must be a power of 2. What is the appropriate value ?
46 * The complexity of {map,unmap}_single is linearly dependent on this value.
47 */
48#define IO_TLB_SEGSIZE 128
49
50/*
51 * log of the size of each IO TLB slab. The number of slabs is command line
52 * controllable.
53 */
54#define IO_TLB_SHIFT 11
55
56#define SLABS_PER_PAGE (1 << (PAGE_SHIFT - IO_TLB_SHIFT)) 44#define SLABS_PER_PAGE (1 << (PAGE_SHIFT - IO_TLB_SHIFT))
57 45
58/* 46/*