|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-devel
[Xen-devel] [PATCH 04 of 38] swiotlb: move some definitions to	header
 
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
---
 include/linux/swiotlb.h |   14 ++++++++++++++
 lib/swiotlb.c           |   14 +-------------
 2 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h
--- a/include/linux/swiotlb.h
+++ b/include/linux/swiotlb.h
@@ -7,6 +7,20 @@
 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/lib/swiotlb.c b/lib/swiotlb.c
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -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>
 
@@ -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))
 
 /*
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
 |   
 
| <Prev in Thread] | 
Current Thread | 
[Next in Thread>
 |  
| 
[Xen-devel] [PATCH 04 of 38] swiotlb: move some definitions to	header,
Jeremy Fitzhardinge <=
[Xen-devel] [PATCH 05 of 38] swiotlb: allow architectures to	override virt<->bus<->virt conversions, Jeremy Fitzhardinge
[Xen-devel] [PATCH 06 of 38] xen: clean up asm-x86/xen/hypervisor.h, Jeremy Fitzhardinge
[Xen-devel] [PATCH 09 of 38] x86: make sure we really have an hpet	mapping before using it, Jeremy Fitzhardinge
[Xen-devel] [PATCH 08 of 38] x86: make apic_* operations inline	functions, Jeremy Fitzhardinge
[Xen-devel] [PATCH 07 of 38] x86: add io_apic_ops, Jeremy Fitzhardinge
[Xen-devel] [PATCH 10 of 38] x86: add handle_irq() to allow	interrupt injection, Jeremy Fitzhardinge
[Xen-devel] [PATCH 11 of 38] x86: define no-op exit_idle() on 32-bit, Jeremy Fitzhardinge
[Xen-devel] [PATCH 12 of 38] xen/dom0: handle acpi lapic parsing in	Xen dom0, Jeremy Fitzhardinge
[Xen-devel] [PATCH 13 of 38] x86: unstatic mp_find_ioapic so it can	be used elsewhere, Jeremy Fitzhardinge
 |  
  
 | 
    | 
  
  
    |   | 
    |