vserver 1.9.5.x5
[linux-2.6.git] / arch / ppc / kernel / dma-mapping.c
index c859f11..59359d8 100644 (file)
 #include <linux/bootmem.h>
 #include <linux/highmem.h>
 #include <linux/dma-mapping.h>
+#include <linux/hardirq.h>
 
 #include <asm/pgalloc.h>
 #include <asm/prom.h>
 #include <asm/io.h>
-#include <asm/hardirq.h>
 #include <asm/mmu_context.h>
 #include <asm/pgtable.h>
 #include <asm/mmu.h>
@@ -71,7 +71,7 @@ int map_page(unsigned long va, phys_addr_t pa, int flags);
  * This is the page table (2MB) covering uncached, DMA consistent allocations
  */
 static pte_t *consistent_pte;
-static spinlock_t consistent_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(consistent_lock);
 
 /*
  * VM region handling support.
@@ -254,6 +254,7 @@ __dma_alloc_coherent(size_t size, dma_addr_t *handle, int gfp)
  no_page:
        return NULL;
 }
+EXPORT_SYMBOL(__dma_alloc_coherent);
 
 /*
  * free a page as defined by the above mapping.
@@ -317,7 +318,7 @@ void __dma_free_coherent(size_t size, void *vaddr)
               __func__, vaddr);
        dump_stack();
 }
-EXPORT_SYMBOL(dma_free_coherent);
+EXPORT_SYMBOL(__dma_free_coherent);
 
 /*
  * Initialise the consistent memory allocation.
@@ -380,6 +381,7 @@ void __dma_sync(void *vaddr, size_t size, int direction)
                break;
        }
 }
+EXPORT_SYMBOL(__dma_sync);
 
 #ifdef CONFIG_HIGHMEM
 /*
@@ -437,3 +439,4 @@ void __dma_sync_page(struct page *page, unsigned long offset,
        __dma_sync((void *)start, size, direction);
 #endif
 }
+EXPORT_SYMBOL(__dma_sync_page);