Knowledge Base Article

error: implicit declaration of function 'dma_zalloc_coherent'

Description
Due to a kernel version difference, aocl install might fail with error: implicit declaration of function \'dma_zalloc_coherent\'.  
Resolution

To workaround this problem, include following code in to linux64/driver/aclpci.c file in your Arria 10 BSP:

static inline void *dma_zalloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag)

{

      void *ret = dma_alloc_coherent(dev, size, dma_handle, flag);

      if (ret)

         memset(ret, 0, size);

      return ret;

}


This problem is scheduled to be resolved in a future release of aocl.

Updated 20 days ago
Version 3.0
No CommentsBe the first to comment