[PATCH 4/9] dma: move dma_map/unmap_single from ARM to common code

Sascha Hauer sha at pengutronix.de
Wed Mar 3 12:08:04 GMT 2021


Hi Ahmad,

On Sun, Feb 28, 2021 at 08:08:31PM +0100, Ahmad Fatoum wrote:
> There's nothing ARM specific about these functions. Move them to a
> common location, so other arches can use them as well.
> 
> Signed-off-by: Ahmad Fatoum <ahmad at a3f.at>
> ---
>  arch/arm/cpu/mmu-common.c | 41 +-------------------------------------
>  drivers/dma/Makefile      |  1 +
>  drivers/dma/map.c         | 42 +++++++++++++++++++++++++++++++++++++++
>  3 files changed, 44 insertions(+), 40 deletions(-)
>  create mode 100644 drivers/dma/map.c

This breaks several arm configs:

drivers/dma/map.c:26:12: error: redefinition of 'dma_map_single'
   26 | dma_addr_t dma_map_single(struct device_d *dev, void *ptr, size_t size,
      |            ^~~~~~~~~~~~~~
In file included from include/dma.h:13,
                 from drivers/dma/map.c:4:
/ptx/work/WORK_EIHEI/sha/backup/barebox/barebox-maintainer-utils/barebox/arch/arm/include/asm/dma.h:35:26: note: previous definition of 'dma_map_single' was here
   35 | static inline dma_addr_t dma_map_single(struct device_d *dev, void *ptr, size_t size,
      |                          ^~~~~~~~~~~~~~
drivers/dma/map.c:36:6: error: redefinition of 'dma_unmap_single'
   36 | void dma_unmap_single(struct device_d *dev, dma_addr_t dma_addr, size_t size,
      |      ^~~~~~~~~~~~~~~~
In file included from include/dma.h:13,
                 from drivers/dma/map.c:4:
/ptx/work/WORK_EIHEI/sha/backup/barebox/barebox-maintainer-utils/barebox/arch/arm/include/asm/dma.h:41:20: note: previous definition of 'dma_unmap_single' was here
   41 | static inline void dma_unmap_single(struct device_d *dev, dma_addr_t addr, size_t size,
      |                    ^~~~~~~~~~~~~~~~

This happens for example in dss11_defconfig, but several others as well.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list