Commit b23bbf74 authored by Russell King's avatar Russell King

[ARM] Remove consistent_alloc/consistent_free

Since we've eliminated users of these functions, we can unexport
them.  Instead, drivers should use the DMA API interfaces.
parent 5f4a46d3
......@@ -134,6 +134,7 @@ static struct vm_region *vm_region_find(struct vm_region *head, unsigned long ad
* This allocates one page of cache-coherent memory space and returns
* both the virtual and a "dma" address to that space.
*/
static
void *consistent_alloc(int gfp, size_t size, dma_addr_t *handle,
unsigned long cache_flags)
{
......@@ -209,7 +210,6 @@ void *consistent_alloc(int gfp, size_t size, dma_addr_t *handle,
no_page:
return NULL;
}
EXPORT_SYMBOL(consistent_alloc);
/*
* Since we have the DMA mask available to us here, we could try to do
......@@ -243,7 +243,7 @@ EXPORT_SYMBOL(dma_alloc_writecombine);
/*
* free a page as defined by the above mapping.
*/
void consistent_free(void *vaddr, size_t size, dma_addr_t handle)
void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr_t handle)
{
struct vm_region *c;
unsigned long flags;
......@@ -253,7 +253,7 @@ void consistent_free(void *vaddr, size_t size, dma_addr_t handle)
spin_lock_irqsave(&consistent_lock, flags);
c = vm_region_find(&consistent_head, (unsigned long)vaddr);
c = vm_region_find(&consistent_head, (unsigned long)cpu_addr);
if (!c)
goto no_area;
......@@ -302,7 +302,7 @@ void consistent_free(void *vaddr, size_t size, dma_addr_t handle)
"invalid area: %p\n", vaddr);
dump_stack();
}
EXPORT_SYMBOL(consistent_free);
EXPORT_SYMBOL(dma_free_coherent);
/*
* Initialise the consistent memory allocation.
......
......@@ -14,8 +14,6 @@
* devices. This is the "generic" version. The PCI specific version
* is in pci.h
*/
extern void *consistent_alloc(int gfp, size_t size, dma_addr_t *handle, unsigned long flags);
extern void consistent_free(void *vaddr, size_t size, dma_addr_t handle);
extern void consistent_sync(void *kaddr, size_t size, int rw);
/*
......@@ -99,12 +97,9 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, int gfp)
* References to memory and mappings associated with cpu_addr/handle
* during and after this call executing are illegal.
*/
static inline void
extern void
dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
dma_addr_t handle)
{
consistent_free(cpu_addr, size, handle);
}
dma_addr_t handle);
/**
* dma_alloc_writecombine - allocate writecombining memory for DMA
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment