Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106961
b: refs/heads/master
c: 1fe5326
h: refs/heads/master
i:
  106959: 00b8cfa
v: v3
  • Loading branch information
Dmitry Baryshkov authored and Ingo Molnar committed Jul 18, 2008
1 parent d7155f2 commit 97cc954
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 538c29d43ebdac2edcef96ac07982d2296a63077
refs/heads/master: 1fe532685a1984dc9f2603ed20bd5e630ba79709
1 change: 1 addition & 0 deletions trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ config ARM
select HAVE_KRETPROBES if (HAVE_KPROBES)
select HAVE_FTRACE if (!XIP_KERNEL)
select HAVE_DYNAMIC_FTRACE if (HAVE_FTRACE)
select HAVE_GENERIC_DMA_COHERENT
help
The ARM series is a line of low-power-consumption RISC chip designs
licensed by ARM Ltd and targeted at embedded applications and
Expand Down
8 changes: 8 additions & 0 deletions trunk/arch/arm/mm/consistent.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,11 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp,
void *
dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp)
{
void *memory;

if (dma_alloc_from_coherent(dev, size, handle, &memory))
return memory;

if (arch_is_coherent()) {
void *virt;

Expand Down Expand Up @@ -362,6 +367,9 @@ void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr

WARN_ON(irqs_disabled());

if (dma_release_from_coherent(dev, get_order(size), cpu_addr))
return;

if (arch_is_coherent()) {
kfree(cpu_addr);
return;
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-arm/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#include <linux/scatterlist.h>

#include <asm-generic/dma-coherent.h>

/*
* DMA-consistent mapping functions. These allocate/free a region of
* uncached, unwrite-buffered mapped memory space for use with DMA
Expand Down

0 comments on commit 97cc954

Please sign in to comment.