Provide dma_mmap_coherent() and dma_get_sgtable()
Subsystems (4)
Geert Uytterhoeven
maintainerPATCH v2 1/9 avr32: Provide dma_mmap_coherent() and dma_get_sgtable()
In reply to Geert Uytterhoevenavr32/allmodconfig:
drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_mmap’:drivers/media/v4l2-core/videobuf2-dma-contig.c:204: error: implicit declaration of function ‘dma_mmap_coherent’ drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_get_base_sgt’:drivers/media/v4l2-core/videobuf2-dma-contig.c:387: error: implicit declaration of function ‘dma_get_sgtable’
For architectures using dma_map_ops, dma_mmap_coherent() and dma_get_sgtable() are provided in <asm-generic/dma-mapping-common.h>.
Avr32 does not use dma_map_ops, hence it should implement them as inline stubs using dma_common_mmap() and dma_common_get_sgtable().
---
v2: No changes
--- arch/avr32/include/asm/dma-mapping.h | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
arch/avr32/include/asm/dma-mapping.h +10 -0
@@ -336,4 +336,14 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,#define dma_alloc_noncoherent (d, s, h, f) dma_alloc_coherent(d, s, h, f)#define dma_free_noncoherent (d, s, v, h) dma_free_coherent(d, s, v, h) +/* drivers/base/dma-mapping.c */ +extern int dma_common_mmap (struct device *dev,struct vm_area_struct *vma, +void *cpu_addr,dma_addr_t dma_addr,size_t size); +extern int dma_common_get_sgtable (struct device *dev,struct sg_table *sgt, +void *cpu_addr,dma_addr_t dma_addr, +size_t size); + +#define dma_mmap_coherent (d, v, c, h, s) dma_common_mmap(d, v, c, h, s) +#define dma_get_sgtable (d, t, v, h, s) dma_common_get_sgtable(d, t, v, h, s) +#endif /* __ASM_AVR32_DMA_MAPPING_H */
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v2 2/9 blackfin: Provide dma_mmap_coherent() and dma_get_sgtable()
In reply to Geert Uytterhoevenblackfin/allmodconfig:
drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_mmap’:drivers/media/v4l2-core/videobuf2-dma-contig.c:204: error: implicit declaration of function ‘dma_mmap_coherent’ drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_get_base_sgt’:drivers/media/v4l2-core/videobuf2-dma-contig.c:387: error: implicit declaration of function ‘dma_get_sgtable’
For architectures using dma_map_ops, dma_mmap_coherent() and dma_get_sgtable() are provided in <asm-generic/dma-mapping-common.h>.
Blackfin does not use dma_map_ops, hence it should implement them as inline stubs using dma_common_mmap() and dma_common_get_sgtable().
---
v2: No changes
--- arch/blackfin/include/asm/dma-mapping.h | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
arch/blackfin/include/asm/dma-mapping.h +10 -0
@@ -154,4 +154,14 @@ dma_cache_sync(struct device *dev, void *vaddr, size_t size, _dma_sync((dma_addr_t)vaddr, size, dir); } +/* drivers/base/dma-mapping.c */ +extern int dma_common_mmap (struct device *dev,struct vm_area_struct *vma, +void *cpu_addr,dma_addr_t dma_addr,size_t size); +extern int dma_common_get_sgtable (struct device *dev,struct sg_table *sgt, +void *cpu_addr,dma_addr_t dma_addr, +size_t size); + +#define dma_mmap_coherent (d, v, c, h, s) dma_common_mmap(d, v, c, h, s) +#define dma_get_sgtable (d, t, v, h, s) dma_common_get_sgtable(d, t, v, h, s) +#endif /* _BLACKFIN_DMA_MAPPING_H */
Signature · 6 lines
1.7.0.4 _______________________________________________ Uclinux-dist-devel mailing list [email protected] https://blackfin.uclinux.org/mailman/listinfo/uclinux-dist-devel
Geert Uytterhoeven
maintainerPATCH v2 4/9 cris: Provide dma_mmap_coherent() and dma_get_sgtable()
In reply to Geert Uytterhoevencris/allmodconfig:
drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_mmap’:drivers/media/v4l2-core/videobuf2-dma-contig.c:204: error: implicit declaration of function ‘dma_mmap_coherent’ drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_get_base_sgt’:drivers/media/v4l2-core/videobuf2-dma-contig.c:387: error: implicit declaration of function ‘dma_get_sgtable’
For architectures using dma_map_ops, dma_mmap_coherent() and dma_get_sgtable() are provided in <asm-generic/dma-mapping-common.h>.
Cris does not use dma_map_ops, hence it should implement them as inline stubs using dma_common_mmap() and dma_common_get_sgtable().
---
v2: No changes
--- arch/cris/include/asm/dma-mapping.h | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
arch/cris/include/asm/dma-mapping.h +10 -0
@@ -158,5 +158,15 @@ dma_cache_sync(struct device *dev, void *vaddr, size_t size, { } +/* drivers/base/dma-mapping.c */ +extern int dma_common_mmap (struct device *dev,struct vm_area_struct *vma, +void *cpu_addr,dma_addr_t dma_addr,size_t size); +extern int dma_common_get_sgtable (struct device *dev,struct sg_table *sgt, +void *cpu_addr,dma_addr_t dma_addr, +size_t size); + +#define dma_mmap_coherent (d, v, c, h, s) dma_common_mmap(d, v, c, h, s) +#define dma_get_sgtable (d, t, v, h, s) dma_common_get_sgtable(d, t, v, h, s) +#endif
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v2 6/9 m68k: Provide dma_mmap_coherent() and dma_get_sgtable()
In reply to Geert Uytterhoevenm68k/allmodconfig:
drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_mmap’:drivers/media/v4l2-core/videobuf2-dma-contig.c:204: error: implicit declaration of function ‘dma_mmap_coherent’ drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_get_base_sgt’:drivers/media/v4l2-core/videobuf2-dma-contig.c:387: error: implicit declaration of function ‘dma_get_sgtable’
For architectures using dma_map_ops, dma_mmap_coherent() and dma_get_sgtable() are provided in <asm-generic/dma-mapping-common.h>.
M68k does not use dma_map_ops, hence it should implement them as inline stubs using dma_common_mmap() and dma_common_get_sgtable().
---
v2: No changes
--- arch/m68k/include/asm/dma-mapping.h | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
arch/m68k/include/asm/dma-mapping.h +10 -0
@@ -110,4 +110,14 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t handle) return 0; } +/* drivers/base/dma-mapping.c */ +extern int dma_common_mmap (struct device *dev,struct vm_area_struct *vma, +void *cpu_addr,dma_addr_t dma_addr,size_t size); +extern int dma_common_get_sgtable (struct device *dev,struct sg_table *sgt, +void *cpu_addr,dma_addr_t dma_addr, +size_t size); + +#define dma_mmap_coherent (d, v, c, h, s) dma_common_mmap(d, v, c, h, s) +#define dma_get_sgtable (d, t, v, h, s) dma_common_get_sgtable(d, t, v, h, s) +#endif /* _M68K_DMA_MAPPING_H */
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v2 7/9 mn10300: Provide dummy dma_mmap_coherent() and dma_get_sgtable()
In reply to Geert Uytterhoevenmn10300/allmodconfig:
drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_mmap’:drivers/media/v4l2-core/videobuf2-dma-contig.c:204: error: implicit declaration of function ‘dma_mmap_coherent’ drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_get_base_sgt’:drivers/media/v4l2-core/videobuf2-dma-contig.c:387: error: implicit declaration of function ‘dma_get_sgtable’
For architectures using dma_map_ops, dma_mmap_coherent() and dma_get_sgtable() are provided in <asm-generic/dma-mapping-common.h>.
Mn10300 does not use dma_map_ops, hence it should implement them itself. For now, use dummy implementations that just return -EINVAL, until the API has been finalized.
---
v2: Dummy implementations that just return -EINVAL
--- arch/mn10300/include/asm/dma-mapping.h | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
arch/mn10300/include/asm/dma-mapping.h +15 -0
@@ -168,4 +168,19 @@ void dma_cache_sync(void *vaddr, size_t size, mn10300_dcache_flush_inv(); } +/* Not supported for now */ +static inline int dma_mmap_coherent (struct device *dev, +struct vm_area_struct *vma,void *cpu_addr, +dma_addr_t dma_addr,size_t size) +{ +return -EINVAL ; +} + +static inline int dma_get_sgtable (struct device *dev,struct sg_table *sgt, +void *cpu_addr,dma_addr_t dma_addr, +size_t size) +{ +return -EINVAL ; +} +#endif
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v2 8/9 parisc: Provide dummy dma_mmap_coherent() and dma_get_sgtable()
In reply to Geert Uytterhoevenparisc/allmodconfig:
drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_mmap’:drivers/media/v4l2-core/videobuf2-dma-contig.c:204: error: implicit declaration of function ‘dma_mmap_coherent’ drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_get_base_sgt’:drivers/media/v4l2-core/videobuf2-dma-contig.c:387: error: implicit declaration of function ‘dma_get_sgtable’
For architectures using dma_map_ops, dma_mmap_coherent() and dma_get_sgtable() are provided in <asm-generic/dma-mapping-common.h>.
Parisc does not use dma_map_ops, hence it should implement them itself. For now, use dummy implementations that just return -EINVAL, until the API has been finalized, as it cannot be supported on PA-RISC as-is.
---
v2: Dummy implementations that just return -EINVAL
--- arch/parisc/include/asm/dma-mapping.h | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
arch/parisc/include/asm/dma-mapping.h +15 -0
@@ -238,4 +238,19 @@ void * sba_get_iommu(struct parisc_device *dev);/* At the moment, we panic on error for IOMMU resource exaustion */ #define dma_mapping_error (dev, x) 0 +/* This API cannot be supported on PA-RISC */ +static inline int dma_mmap_coherent (struct device *dev, +struct vm_area_struct *vma,void *cpu_addr, +dma_addr_t dma_addr,size_t size) +{ +return -EINVAL ; +} + +static inline int dma_get_sgtable (struct device *dev,struct sg_table *sgt, +void *cpu_addr,dma_addr_t dma_addr, +size_t size) +{ +return -EINVAL ; +} +#endif
Signature · 6 lines
1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven
maintainerPATCH v2 9/9 xtensa: Provide dummy dma_mmap_coherent() and dma_get_sgtable()
In reply to Geert Uytterhoevenxtensa/allmodconfig:
drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_mmap’:drivers/media/v4l2-core/videobuf2-dma-contig.c:204: error: implicit declaration of function ‘dma_mmap_coherent’ drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_get_base_sgt’:drivers/media/v4l2-core/videobuf2-dma-contig.c:387: error: implicit declaration of function ‘dma_get_sgtable’
For architectures using dma_map_ops, dma_mmap_coherent() and dma_get_sgtable() are provided in <asm-generic/dma-mapping-common.h>.
Xtensa does not use dma_map_ops, hence it should implement them itself. For now, use dummy implementations that just return -EINVAL, until the API has been finalized.
---
v2: Dummy implementations that just return -EINVAL
--- arch/xtensa/include/asm/dma-mapping.h | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
arch/xtensa/include/asm/dma-mapping.h +15 -0
@@ -170,4 +170,19 @@ dma_cache_sync(struct device *dev, void *vaddr, size_t size, consistent_sync(vaddr, size, direction); } +/* Not supported for now */ +static inline int dma_mmap_coherent (struct device *dev, +struct vm_area_struct *vma,void *cpu_addr, +dma_addr_t dma_addr,size_t size) +{ +return -EINVAL ; +} + +static inline int dma_get_sgtable (struct device *dev,struct sg_table *sgt, +void *cpu_addr,dma_addr_t dma_addr, +size_t size) +{ +return -EINVAL ; +} +#endif /* _XTENSA_DMA_MAPPING_H */
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerv2 cover Provide dma_mmap_coherent() and dma_get_sgtable()
dma_common_mmap() and dma_common_get_sgtable() are defined in drivers/base/dma-mapping.c, and always compiled if CONFIG_HAS_DMA=y.
However, their forward declarations and the inline functions defined on top of them (dma_mmap_attrs(), dma_mmap_coherent(), dma_mmap_writecombine(), dma_get_sgtable_attrs()), dma_get_sgtable()) are in <asm-generic/dma-mapping-common.h>, which is not included by all architectures supporting CONFIG_HAS_DMA=y. There exist no alternative implementations.
Hence for e.g. m68k allmodconfig, I get:
drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_mmap’:drivers/media/v4l2-core/videobuf2-dma-contig.c:204: error: implicit declaration of function ‘dma_mmap_coherent’ drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_get_base_sgt’:drivers/media/v4l2-core/videobuf2-dma-contig.c:387: error: implicit declaration of function ‘dma_get_sgtable’
This series adds dma_mmap_coherent() and dma_get_sgtable() for all architectures that set CONFIG_HAS_DMA=y, but don't use dma_map_ops.
- On architectures for which I received an ack (avr32, blackfin, cris, and m68k), the patches are unchanged compared to v1: dma_mmap_coherent() and dma_get_sgtable() are implement as inline stubs using dma_common_mmap() and dma_common_get_sgtable().
- On architectures where the current API cannot be implemented (parisc), dma_mmap_coherent() and dma_get_sgtable() are dummy implementations that just return -EINVAL, until the API has been finalized.
- On architectures for which I did not receive an ack (c6x, frv, mn10300, and xtensa), dma_mmap_coherent() and dma_get_sgtable() are dummy implementations that just return -EINVAL, too.
I'll add this to the m68k for-next branch, so hopefully we can get an unbroken build in 3.8.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Geert Uytterhoeven
maintainerPATCH v2 3/9 c6x: Provide dummy dma_mmap_coherent() and dma_get_sgtable()
c6x/allmodconfig (assumed):
drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_mmap’:drivers/media/v4l2-core/videobuf2-dma-contig.c:204: error: implicit declaration of function ‘dma_mmap_coherent’ drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_get_base_sgt’:drivers/media/v4l2-core/videobuf2-dma-contig.c:387: error: implicit declaration of function ‘dma_get_sgtable’
For architectures using dma_map_ops, dma_mmap_coherent() and dma_get_sgtable() are provided in <asm-generic/dma-mapping-common.h>.
C6x does not use dma_map_ops, hence it should implement them itself. For now, use dummy implementations that just return -EINVAL, until the API has been finalized.
---
v2: Dummy implementations that just return -EINVAL
Not compile-tested due to lack of cross-compiler
--- arch/c6x/include/asm/dma-mapping.h | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
arch/c6x/include/asm/dma-mapping.h +15 -0
@@ -89,4 +89,19 @@ extern void dma_free_coherent(struct device *, size_t, void *, dma_addr_t);#define dma_alloc_noncoherent (d, s, h, f) dma_alloc_coherent((d), (s), (h), (f))#define dma_free_noncoherent (d, s, v, h) dma_free_coherent((d), (s), (v), (h)) +/* Not supported for now */ +static inline int dma_mmap_coherent (struct device *dev, +struct vm_area_struct *vma,void *cpu_addr, +dma_addr_t dma_addr,size_t size) +{ +return -EINVAL ; +} + +static inline int dma_get_sgtable (struct device *dev,struct sg_table *sgt, +void *cpu_addr,dma_addr_t dma_addr, +size_t size) +{ +return -EINVAL ; +} +#endif /* _ASM_C6X_DMA_MAPPING_H */
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v2 6/9 m68k: Provide dma_mmap_coherent() and dma_get_sgtable()
In reply to Geert Uytterhoevenm68k/allmodconfig:
drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_mmap’:drivers/media/v4l2-core/videobuf2-dma-contig.c:204: error: implicit declaration of function ‘dma_mmap_coherent’ drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_get_base_sgt’:drivers/media/v4l2-core/videobuf2-dma-contig.c:387: error: implicit declaration of function ‘dma_get_sgtable’
For architectures using dma_map_ops, dma_mmap_coherent() and dma_get_sgtable() are provided in <asm-generic/dma-mapping-common.h>.
M68k does not use dma_map_ops, hence it should implement them as inline stubs using dma_common_mmap() and dma_common_get_sgtable().
---
v2: No changes
--- arch/m68k/include/asm/dma-mapping.h | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
arch/m68k/include/asm/dma-mapping.h +10 -0
@@ -110,4 +110,14 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t handle) return 0; } +/* drivers/base/dma-mapping.c */ +extern int dma_common_mmap (struct device *dev,struct vm_area_struct *vma, +void *cpu_addr,dma_addr_t dma_addr,size_t size); +extern int dma_common_get_sgtable (struct device *dev,struct sg_table *sgt, +void *cpu_addr,dma_addr_t dma_addr, +size_t size); + +#define dma_mmap_coherent (d, v, c, h, s) dma_common_mmap(d, v, c, h, s) +#define dma_get_sgtable (d, t, v, h, s) dma_common_get_sgtable(d, t, v, h, s) +#endif /* _M68K_DMA_MAPPING_H */
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v2 5/9 frv: Provide dummy dma_mmap_coherent() and dma_get_sgtable()
In reply to Geert Uytterhoevenfrv/allmodconfig:
drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_mmap’:drivers/media/v4l2-core/videobuf2-dma-contig.c:204: error: implicit declaration of function ‘dma_mmap_coherent’ drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_get_base_sgt’:drivers/media/v4l2-core/videobuf2-dma-contig.c:387: error: implicit declaration of function ‘dma_get_sgtable’
For architectures using dma_map_ops, dma_mmap_coherent() and dma_get_sgtable() are provided in <asm-generic/dma-mapping-common.h>.
Frv does not use dma_map_ops, hence it should implement them itself. For now, use dummy implementations that just return -EINVAL, until the API has been finalized.
---
v2: Dummy implementations that just return -EINVAL
--- arch/frv/include/asm/dma-mapping.h | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
arch/frv/include/asm/dma-mapping.h +15 -0
@@ -132,4 +132,19 @@ void dma_cache_sync(struct device *dev, void *vaddr, size_t size, flush_write_buffers(); } +/* Not supported for now */ +static inline int dma_mmap_coherent (struct device *dev, +struct vm_area_struct *vma,void *cpu_addr, +dma_addr_t dma_addr,size_t size) +{ +return -EINVAL ; +} + +static inline int dma_get_sgtable (struct device *dev,struct sg_table *sgt, +void *cpu_addr,dma_addr_t dma_addr, +size_t size) +{ +return -EINVAL ; +} +#endif /* _ASM_DMA_MAPPING_H */
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerQuoted 2 lines · Geert Uytterhoeven
I'll add this to the m68k for-next branch, so hopefully we can get an unbroken build in 3.8.
Sorry, I meant "for-linus", as it's destined for 3.8, not 3.9.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Hi Geert,
Quoted 6 lines · Geert Uytterhoeven
Quoted 2 lines · Geert Uytterhoeven
I'll add this to the m68k for-next branch, so hopefully we can get an unbroken build in 3.8.
Sorry, I meant "for-linus", as it's destined for 3.8, not 3.9.
Do you want me to take those patches via dma-mapping tree or get my ack and put them together with your other m68k fixes for v3.8?
Best regards
Signature · 2 lines
Marek Szyprowski Samsung Poland R&D Center
Geert Uytterhoeven
maintainerHi Marek,
Quoted 10 lines · Marek Szyprowski
Quoted 6 lines · Geert Uytterhoeven
Quoted 2 lines · Geert Uytterhoeven
I'll add this to the m68k for-next branch, so hopefully we can get an unbroken build in 3.8.
Sorry, I meant "for-linus", as it's destined for 3.8, not 3.9.
Do you want me to take those patches via dma-mapping tree or get my ack and put them together with your other m68k fixes for v3.8?
I don't mind if you take them, as that means less work for me ;-) Thanks!
The other m68k fixes were pulled by Linus in 3.8-rc5, so I have no other things left for 3.8.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Re: [uclinux-dist-devel] [PATCH v2 2/9] blackfin: Provide dma_mmap_coherent() and dma_get_sgtable()
In reply to Geert UytterhoevenQuoted 10 lines · Geert Uytterhoeven
blackfin/allmodconfig:
drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_mmap’:drivers/media/v4l2-core/videobuf2-dma-contig.c:204: error: implicit declaration of function ‘dma_mmap_coherent’drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_get_base_sgt’:drivers/media/v4l2-core/videobuf2-dma-contig.c:387: error: implicit declaration of function ‘dma_get_sgtable’For architectures using
dma_map_ops,dma_mmap_coherent()anddma_get_sgtable()are provided in <asm-generic/dma-mapping-common.h>.
Quoted 7 lines
Blackfin does not use
dma_map_ops, hence it should implement them as inline stubs usingdma_common_mmap()anddma_common_get_sgtable().Signed-off-by Geert Uytterhoeven <[email protected]>Cc Marek Szyprowski <[email protected]>Acked-by Scott Jiang <[email protected]>
Thanks,
Will be applied to my blackfin arch tree.
Quoted 28 lines
---
v2: No changes--- arch/blackfin/include/asm/dma-mapping.h | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)arch/blackfin/include/asm/dma-mapping.h +10
-1@@ -154,4 +154,14 @@ dma_cache_sync(struct device *dev, void *vaddr, size_t size, _dma_sync((dma_addr_t)vaddr, size, dir); } +/* drivers/base/dma-mapping.c */ +extern int dma_common_mmap (struct device *dev,struct vm_area_struct *vma, +void *cpu_addr,dma_addr_t dma_addr,size_t size); +extern int dma_common_get_sgtable (struct device *dev,struct sg_table *sgt, +void *cpu_addr,dma_addr_t dma_addr, +size_t size); + +#define dma_mmap_coherent (d, v, c, h, s) dma_common_mmap(d, v, c, h, s) +#define dma_get_sgtable (d, t, v, h, s) dma_common_get_sgtable(d, t, v, h, s) +#endif /* _BLACKFIN_DMA_MAPPING_H */ --1.7.0.4
Signature · 2 lines
Regards, --Bob