linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xtensa: Provide dummy dma_alloc_attrs() and dma_free_attrs()
@ 2015-04-21 20:11 Guenter Roeck
  2015-04-22 15:39 ` Max Filippov
  0 siblings, 1 reply; 2+ messages in thread
From: Guenter Roeck @ 2015-04-21 20:11 UTC (permalink / raw)
  To: Chris Zankel; +Cc: Max Filippov, linux-xtensa, linux-kernel, Guenter Roeck

xtensa:allmodconfig fails to build with the following errors.

drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:
	In function ‘gk20a_instobj_dtor_dma’:
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:154:2: error:
	implicit declaration of function ‘dma_free_attrs’
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:
	In function ‘gk20a_instobj_ctor_dma’:
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:218:2: error:
	implicit declaration of function ‘dma_alloc_attrs’

Xtensa does not provide those functions at this time.
Provide dummy implementations to avoid build errors.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 arch/xtensa/include/asm/dma-mapping.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/xtensa/include/asm/dma-mapping.h b/arch/xtensa/include/asm/dma-mapping.h
index 172a02a6ad14..ba78ccf651e7 100644
--- a/arch/xtensa/include/asm/dma-mapping.h
+++ b/arch/xtensa/include/asm/dma-mapping.h
@@ -185,4 +185,17 @@ static inline int dma_get_sgtable(struct device *dev, struct sg_table *sgt,
 	return -EINVAL;
 }
 
+static inline void *dma_alloc_attrs(struct device *dev, size_t size,
+				    dma_addr_t *dma_handle, gfp_t flag,
+				    struct dma_attrs *attrs)
+{
+	return NULL;
+}
+
+static inline void dma_free_attrs(struct device *dev, size_t size,
+				  void *vaddr, dma_addr_t dma_handle,
+				  struct dma_attrs *attrs)
+{
+}
+
 #endif	/* _XTENSA_DMA_MAPPING_H */
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xtensa: Provide dummy dma_alloc_attrs() and dma_free_attrs()
  2015-04-21 20:11 [PATCH] xtensa: Provide dummy dma_alloc_attrs() and dma_free_attrs() Guenter Roeck
@ 2015-04-22 15:39 ` Max Filippov
  0 siblings, 0 replies; 2+ messages in thread
From: Max Filippov @ 2015-04-22 15:39 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Chris Zankel, linux-xtensa, LKML

On Tue, Apr 21, 2015 at 11:11 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> xtensa:allmodconfig fails to build with the following errors.
>
> drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:
>         In function ‘gk20a_instobj_dtor_dma’:
> drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:154:2: error:
>         implicit declaration of function ‘dma_free_attrs’
> drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:
>         In function ‘gk20a_instobj_ctor_dma’:
> drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:218:2: error:
>         implicit declaration of function ‘dma_alloc_attrs’
>
> Xtensa does not provide those functions at this time.
> Provide dummy implementations to avoid build errors.
>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

Acked-by: Max Filippov <jcmvbkbc@gmail.com>

-- 
Thanks.
-- Max

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-22 15:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-21 20:11 [PATCH] xtensa: Provide dummy dma_alloc_attrs() and dma_free_attrs() Guenter Roeck
2015-04-22 15:39 ` Max Filippov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).