diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-10 21:19:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-10 21:19:42 -0400 |
commit | 33e247c7e58d335d70ecb84fd869091e2e4b8dcb (patch) | |
tree | e8561e1993dff03f8e56d10a5795fe9d379a3390 /arch/x86/include/asm/dma-mapping.h | |
parent | d71fc239b6915a8b750e9a447311029ff45b6580 (diff) | |
parent | 452e06af1f0149b01201f94264d452cd7a95db7a (diff) |
Merge branch 'akpm' (patches from Andrew)
Merge third patch-bomb from Andrew Morton:
- even more of the rest of MM
- lib/ updates
- checkpatch updates
- small changes to a few scruffy filesystems
- kmod fixes/cleanups
- kexec updates
- a dma-mapping cleanup series from hch
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (81 commits)
dma-mapping: consolidate dma_set_mask
dma-mapping: consolidate dma_supported
dma-mapping: cosolidate dma_mapping_error
dma-mapping: consolidate dma_{alloc,free}_noncoherent
dma-mapping: consolidate dma_{alloc,free}_{attrs,coherent}
mm: use vma_is_anonymous() in create_huge_pmd() and wp_huge_pmd()
mm: make sure all file VMAs have ->vm_ops set
mm, mpx: add "vm_flags_t vm_flags" arg to do_mmap_pgoff()
mm: mark most vm_operations_struct const
namei: fix warning while make xmldocs caused by namei.c
ipc: convert invalid scenarios to use WARN_ON
zlib_deflate/deftree: remove bi_reverse()
lib/decompress_unlzma: Do a NULL check for pointer
lib/decompressors: use real out buf size for gunzip with kernel
fs/affs: make root lookup from blkdev logical size
sysctl: fix int -> unsigned long assignments in INT_MIN case
kexec: export KERNEL_IMAGE_SIZE to vmcoreinfo
kexec: align crash_notes allocation to make it be inside one physical page
kexec: remove unnecessary test in kimage_alloc_crash_control_pages()
kexec: split kexec_load syscall from kexec core code
...
Diffstat (limited to 'arch/x86/include/asm/dma-mapping.h')
-rw-r--r-- | arch/x86/include/asm/dma-mapping.h | 34 |
1 files changed, 5 insertions, 29 deletions
diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h index 1f5b7287d1ad..953b7263f844 100644 --- a/arch/x86/include/asm/dma-mapping.h +++ b/arch/x86/include/asm/dma-mapping.h | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/dma-attrs.h> | 12 | #include <linux/dma-attrs.h> |
13 | #include <asm/io.h> | 13 | #include <asm/io.h> |
14 | #include <asm/swiotlb.h> | 14 | #include <asm/swiotlb.h> |
15 | #include <asm-generic/dma-coherent.h> | ||
16 | #include <linux/dma-contiguous.h> | 15 | #include <linux/dma-contiguous.h> |
17 | 16 | ||
18 | #ifdef CONFIG_ISA | 17 | #ifdef CONFIG_ISA |
@@ -41,24 +40,13 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev) | |||
41 | #endif | 40 | #endif |
42 | } | 41 | } |
43 | 42 | ||
44 | #include <asm-generic/dma-mapping-common.h> | 43 | bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp); |
45 | 44 | #define arch_dma_alloc_attrs arch_dma_alloc_attrs | |
46 | /* Make sure we keep the same behaviour */ | ||
47 | static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) | ||
48 | { | ||
49 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
50 | debug_dma_mapping_error(dev, dma_addr); | ||
51 | if (ops->mapping_error) | ||
52 | return ops->mapping_error(dev, dma_addr); | ||
53 | |||
54 | return (dma_addr == DMA_ERROR_CODE); | ||
55 | } | ||
56 | |||
57 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | ||
58 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | ||
59 | 45 | ||
46 | #define HAVE_ARCH_DMA_SUPPORTED 1 | ||
60 | extern int dma_supported(struct device *hwdev, u64 mask); | 47 | extern int dma_supported(struct device *hwdev, u64 mask); |
61 | extern int dma_set_mask(struct device *dev, u64 mask); | 48 | |
49 | #include <asm-generic/dma-mapping-common.h> | ||
62 | 50 | ||
63 | extern void *dma_generic_alloc_coherent(struct device *dev, size_t size, | 51 | extern void *dma_generic_alloc_coherent(struct device *dev, size_t size, |
64 | dma_addr_t *dma_addr, gfp_t flag, | 52 | dma_addr_t *dma_addr, gfp_t flag, |
@@ -125,16 +113,4 @@ static inline gfp_t dma_alloc_coherent_gfp_flags(struct device *dev, gfp_t gfp) | |||
125 | return gfp; | 113 | return gfp; |
126 | } | 114 | } |
127 | 115 | ||
128 | #define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL) | ||
129 | |||
130 | void * | ||
131 | dma_alloc_attrs(struct device *dev, size_t size, dma_addr_t *dma_handle, | ||
132 | gfp_t gfp, struct dma_attrs *attrs); | ||
133 | |||
134 | #define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL) | ||
135 | |||
136 | void dma_free_attrs(struct device *dev, size_t size, | ||
137 | void *vaddr, dma_addr_t bus, | ||
138 | struct dma_attrs *attrs); | ||
139 | |||
140 | #endif | 116 | #endif |