linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm: dma-mapping: fix compilation error when CONFIG_MMU is not present
@ 2014-10-19 15:59 Stefan Hengelein
  2014-10-20  7:42 ` Marek Szyprowski
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Hengelein @ 2014-10-19 15:59 UTC (permalink / raw)
  To: linux-arm-kernel

When CONFIG_MMU is not present, the variable 'atomic_pool' and the
function '__in_atomic_pool' are undeclared but used in part of the
code. Therefore, the compilation breaks.
Now, they are defined to dummy values when CONFIG_MMU is undefined.

This error was found with vampyr.

Signed-off-by: Stefan Hengelein <stefan.hengelein@fau.de>
---
 arch/arm/mm/dma-mapping.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index c245d90..7d04cf7 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -573,12 +573,14 @@ static inline pgprot_t __get_dma_pgprot(struct dma_attrs *attrs, pgprot_t prot)
 #else	/* !CONFIG_MMU */
 
 #define nommu() 1
+#define atomic_pool 0
 
 #define __get_dma_pgprot(attrs, prot)	__pgprot(0)
 #define __alloc_remap_buffer(dev, size, gfp, prot, ret, c)	NULL
 #define __alloc_from_pool(size, ret_page)			NULL
 #define __alloc_from_contiguous(dev, size, prot, ret, c)	NULL
 #define __free_from_pool(cpu_addr, size)			0
+#define __in_atomic_pool(start, size)				0
 #define __free_from_contiguous(dev, page, cpu_addr, size)	do { } while (0)
 #define __dma_free_remap(cpu_addr, size)			do { } while (0)
 
-- 
1.9.1

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

end of thread, other threads:[~2014-10-27 11:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-19 15:59 [PATCH] arm: dma-mapping: fix compilation error when CONFIG_MMU is not present Stefan Hengelein
2014-10-20  7:42 ` Marek Szyprowski
     [not found]   ` <CABv5NL_GdtZegpw8wxau9oD6xXWdX3GUySLqCaoaoa549Kg_GQ@mail.gmail.com>
2014-10-21  0:05     ` Laura Abbott
2014-10-23  8:15       ` Marek Szyprowski
2014-10-24 13:15         ` Stefan Hengelein
2014-10-27 11:59           ` Marek Szyprowski

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).