From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Chris Zankel <chris@zankel.net>, Max Filippov <jcmvbkbc@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Christoph Hellwig <hch@lst.de>,
linux-xtensa@linux-xtensa.org,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: [PATCH 3/4] xtensa: fix errors with dma_supported
Date: Tue, 8 Sep 2015 18:48:33 +0530 [thread overview]
Message-ID: <1441718314-11208-4-git-send-email-sudipm.mukherjee@gmail.com> (raw)
In-Reply-To: <1441718314-11208-1-git-send-email-sudipm.mukherjee@gmail.com>
commit eec17ba9f049 ("dma-mapping: consolidate dma_supported") has
removed dma_supported() from individual arch files to
asm-generic/dma-mapping-common.h or if arch has its own implementation
then we need to set the flag HAVE_ARCH_DMA_SUPPORTED. Otherwise we were
getting error like:
error: redefinition of 'dma_supported'
while building with allmodconfig.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
arch/xtensa/include/asm/dma-mapping.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/xtensa/include/asm/dma-mapping.h b/arch/xtensa/include/asm/dma-mapping.h
index 5762d8d..019a94a 100644
--- a/arch/xtensa/include/asm/dma-mapping.h
+++ b/arch/xtensa/include/asm/dma-mapping.h
@@ -30,10 +30,7 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev)
return &xtensa_dma_map_ops;
}
-#include <asm-generic/dma-mapping-common.h>
-
-#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_attrs(d, s, h, f, NULL)
-#define dma_free_noncoherent(d, s, v, h) dma_free_attrs(d, s, v, h, NULL)
+#define HAVE_ARCH_DMA_SUPPORTED 1
static inline int
dma_supported(struct device *dev, u64 mask)
@@ -41,6 +38,11 @@ dma_supported(struct device *dev, u64 mask)
return 1;
}
+#include <asm-generic/dma-mapping-common.h>
+
+#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_attrs(d, s, h, f, NULL)
+#define dma_free_noncoherent(d, s, v, h) dma_free_attrs(d, s, v, h, NULL)
+
static inline int
dma_set_mask(struct device *dev, u64 mask)
{
--
1.9.1
next prev parent reply other threads:[~2015-09-08 13:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-08 13:18 [PATCH 0/4] xtensa: fix build failure Sudip Mukherjee
2015-09-08 13:18 ` [PATCH 1/4] xtensa: fix error with dma_{alloc,free}_{attrs,coherent} Sudip Mukherjee
2015-09-08 13:18 ` [PATCH 2/4] xtensa: fix error with dma_supported Sudip Mukherjee
2015-09-08 13:18 ` Sudip Mukherjee [this message]
2015-09-08 13:18 ` [PATCH 4/4] xtensa: fix error with dma_set_mask Sudip Mukherjee
2015-09-08 17:34 ` [PATCH 0/4] xtensa: fix build failure Max Filippov
2015-09-09 7:11 ` Sudip Mukherjee
2015-09-09 12:52 ` Max Filippov
2015-09-09 13:40 ` Sudip Mukherjee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1441718314-11208-4-git-send-email-sudipm.mukherjee@gmail.com \
--to=sudipm.mukherjee@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=chris@zankel.net \
--cc=hch@lst.de \
--cc=jcmvbkbc@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xtensa@linux-xtensa.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox