* [PATCH 0/4] xtensa: fix build failure
@ 2015-09-08 13:18 Sudip Mukherjee
2015-09-08 13:18 ` [PATCH 1/4] xtensa: fix error with dma_{alloc,free}_{attrs,coherent} Sudip Mukherjee
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Sudip Mukherjee @ 2015-09-08 13:18 UTC (permalink / raw)
To: Chris Zankel, Max Filippov
Cc: linux-kernel, Andrew Morton, Christoph Hellwig, linux-xtensa,
Sudip Mukherjee
While building with allmodconfig the build failed with different dma
related errors. It turned out that the dma functions were moved to
asm-generic/dma-mapping-common.h() and as a result we were getting the
errors of "redefinition".
This patch series will move the functions as required and at the end of
the series, allmodconfig builds.
Only build tested with allmodconfig, common_defconfig, iss_defconfig on
next-20150908.
Sudip Mukherjee (4):
xtensa: fix error with dma_{alloc,free}_{attrs,coherent}
xtensa: fix error with dma_supported
xtensa: fix errors with dma_supported
xtensa: fix error with dma_set_mask
arch/xtensa/include/asm/dma-mapping.h | 57 +++--------------------------------
1 file changed, 4 insertions(+), 53 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/4] xtensa: fix error with dma_{alloc,free}_{attrs,coherent}
2015-09-08 13:18 [PATCH 0/4] xtensa: fix build failure Sudip Mukherjee
@ 2015-09-08 13:18 ` Sudip Mukherjee
2015-09-08 13:18 ` [PATCH 2/4] xtensa: fix error with dma_supported Sudip Mukherjee
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Sudip Mukherjee @ 2015-09-08 13:18 UTC (permalink / raw)
To: Chris Zankel, Max Filippov
Cc: linux-kernel, Andrew Morton, Christoph Hellwig, linux-xtensa,
Sudip Mukherjee
commit 59b5f4726434 ("dma-mapping: consolidate dma_{alloc,free}_{attrs,coherent}")
has removed dma_{alloc,free}_{attrs,coherent} functions from arch
specific files to asm-generic/dma-mapping-common.h. But they were not
removed for xtensa architecture and as a result we are getting errors
like:
error: redefinition of 'dma_alloc_attrs'
error: redefinition of 'dma_free_attrs'
while building with allmodconfig.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
arch/xtensa/include/asm/dma-mapping.h | 31 -------------------------------
1 file changed, 31 deletions(-)
diff --git a/arch/xtensa/include/asm/dma-mapping.h b/arch/xtensa/include/asm/dma-mapping.h
index f01cb30..bf24c90 100644
--- a/arch/xtensa/include/asm/dma-mapping.h
+++ b/arch/xtensa/include/asm/dma-mapping.h
@@ -34,37 +34,6 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev)
#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 dma_alloc_coherent(d, s, h, f) dma_alloc_attrs(d, s, h, f, NULL)
-#define dma_free_coherent(d, s, c, h) dma_free_attrs(d, s, c, h, NULL)
-
-static inline void *dma_alloc_attrs(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t gfp,
- struct dma_attrs *attrs)
-{
- void *ret;
- struct dma_map_ops *ops = get_dma_ops(dev);
-
- if (dma_alloc_from_coherent(dev, size, dma_handle, &ret))
- return ret;
-
- ret = ops->alloc(dev, size, dma_handle, gfp, attrs);
- debug_dma_alloc_coherent(dev, size, *dma_handle, ret);
-
- return ret;
-}
-
-static inline void dma_free_attrs(struct device *dev, size_t size,
- void *vaddr, dma_addr_t dma_handle,
- struct dma_attrs *attrs)
-{
- struct dma_map_ops *ops = get_dma_ops(dev);
-
- if (dma_release_from_coherent(dev, get_order(size), vaddr))
- return;
-
- ops->free(dev, size, vaddr, dma_handle, attrs);
- debug_dma_free_coherent(dev, size, vaddr, dma_handle);
-}
static inline int
dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/4] xtensa: fix error with dma_supported
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 ` Sudip Mukherjee
2015-09-08 13:18 ` [PATCH 3/4] xtensa: fix errors " Sudip Mukherjee
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Sudip Mukherjee @ 2015-09-08 13:18 UTC (permalink / raw)
To: Chris Zankel, Max Filippov
Cc: linux-kernel, Andrew Morton, Christoph Hellwig, linux-xtensa,
Sudip Mukherjee
commit 11bd9421d0ad ("dma-mapping: cosolidate dma_mapping_error") has
removed dma_mapping_error() from arch specific file to
asm-generic/dma-mapping-common.h but it was not removed from xtensa
architecture and as a result we were getting error like:
error: redefinition of 'dma_mapping_error'
while building with allmodconfig.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
arch/xtensa/include/asm/dma-mapping.h | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/arch/xtensa/include/asm/dma-mapping.h b/arch/xtensa/include/asm/dma-mapping.h
index bf24c90..5762d8d 100644
--- a/arch/xtensa/include/asm/dma-mapping.h
+++ b/arch/xtensa/include/asm/dma-mapping.h
@@ -36,15 +36,6 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev)
#define dma_free_noncoherent(d, s, v, h) dma_free_attrs(d, s, v, h, NULL)
static inline int
-dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
-{
- struct dma_map_ops *ops = get_dma_ops(dev);
-
- debug_dma_mapping_error(dev, dma_addr);
- return ops->mapping_error(dev, dma_addr);
-}
-
-static inline int
dma_supported(struct device *dev, u64 mask)
{
return 1;
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/4] xtensa: fix errors with dma_supported
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
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
4 siblings, 0 replies; 9+ messages in thread
From: Sudip Mukherjee @ 2015-09-08 13:18 UTC (permalink / raw)
To: Chris Zankel, Max Filippov
Cc: linux-kernel, Andrew Morton, Christoph Hellwig, linux-xtensa,
Sudip Mukherjee
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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/4] xtensa: fix error with dma_set_mask
2015-09-08 13:18 [PATCH 0/4] xtensa: fix build failure Sudip Mukherjee
` (2 preceding siblings ...)
2015-09-08 13:18 ` [PATCH 3/4] xtensa: fix errors " Sudip Mukherjee
@ 2015-09-08 13:18 ` Sudip Mukherjee
2015-09-08 17:34 ` [PATCH 0/4] xtensa: fix build failure Max Filippov
4 siblings, 0 replies; 9+ messages in thread
From: Sudip Mukherjee @ 2015-09-08 13:18 UTC (permalink / raw)
To: Chris Zankel, Max Filippov
Cc: linux-kernel, Andrew Morton, Christoph Hellwig, linux-xtensa,
Sudip Mukherjee
commit 13bad70fb5ba ("dma-mapping: consolidate dma_set_mask") has
removed dma_set_mask() from individual arch files to
asm-generic/dma-mapping-common.h. But it was not removed for xtensa
architecture and as a result we were getting errors like:
error: redefinition of 'dma_set_mask'
while building with allmodconfig.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
arch/xtensa/include/asm/dma-mapping.h | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/arch/xtensa/include/asm/dma-mapping.h b/arch/xtensa/include/asm/dma-mapping.h
index 019a94a..15992a3 100644
--- a/arch/xtensa/include/asm/dma-mapping.h
+++ b/arch/xtensa/include/asm/dma-mapping.h
@@ -43,17 +43,6 @@ dma_supported(struct device *dev, u64 mask)
#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)
-{
- if(!dev->dma_mask || !dma_supported(dev, mask))
- return -EIO;
-
- *dev->dma_mask = mask;
-
- return 0;
-}
-
void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
enum dma_data_direction direction);
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] xtensa: fix build failure
2015-09-08 13:18 [PATCH 0/4] xtensa: fix build failure Sudip Mukherjee
` (3 preceding siblings ...)
2015-09-08 13:18 ` [PATCH 4/4] xtensa: fix error with dma_set_mask Sudip Mukherjee
@ 2015-09-08 17:34 ` Max Filippov
2015-09-09 7:11 ` Sudip Mukherjee
4 siblings, 1 reply; 9+ messages in thread
From: Max Filippov @ 2015-09-08 17:34 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: Chris Zankel, LKML, Andrew Morton, Christoph Hellwig,
linux-xtensa@linux-xtensa.org
Sudip,
On Tue, Sep 8, 2015 at 4:18 PM, Sudip Mukherjee
<sudipm.mukherjee@gmail.com> wrote:
> While building with allmodconfig the build failed with different dma
> related errors. It turned out that the dma functions were moved to
> asm-generic/dma-mapping-common.h() and as a result we were getting the
> errors of "redefinition".
> This patch series will move the functions as required and at the end of
> the series, allmodconfig builds.
I believe it's fixed in the -mm tree and will be merged soon,
see the thread at https://lkml.org/lkml/2015/8/26/118
--
Thanks.
-- Max
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] xtensa: fix build failure
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
0 siblings, 1 reply; 9+ messages in thread
From: Sudip Mukherjee @ 2015-09-09 7:11 UTC (permalink / raw)
To: Max Filippov
Cc: Chris Zankel, LKML, Andrew Morton, Christoph Hellwig,
linux-xtensa@linux-xtensa.org, sfr
On Tue, Sep 08, 2015 at 08:34:56PM +0300, Max Filippov wrote:
> Sudip,
>
> On Tue, Sep 8, 2015 at 4:18 PM, Sudip Mukherjee
> <sudipm.mukherjee@gmail.com> wrote:
> > While building with allmodconfig the build failed with different dma
> > related errors. It turned out that the dma functions were moved to
> > asm-generic/dma-mapping-common.h() and as a result we were getting the
> > errors of "redefinition".
> > This patch series will move the functions as required and at the end of
> > the series, allmodconfig builds.
>
> I believe it's fixed in the -mm tree and will be merged soon,
> see the thread at https://lkml.org/lkml/2015/8/26/118
I guess its already merged in Linus tree now. I tested in the morning
with Linus tree and allmodconfig worked. But next-20150909 still failed.
BTW, yesterday when I was testing few of the defconfigs were not
working. Are they also being fixed?
regards
sudip
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] xtensa: fix build failure
2015-09-09 7:11 ` Sudip Mukherjee
@ 2015-09-09 12:52 ` Max Filippov
2015-09-09 13:40 ` Sudip Mukherjee
0 siblings, 1 reply; 9+ messages in thread
From: Max Filippov @ 2015-09-09 12:52 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: Chris Zankel, LKML, Andrew Morton, Christoph Hellwig,
linux-xtensa@linux-xtensa.org, Stephen Rothwell
On Wed, Sep 9, 2015 at 10:11 AM, Sudip Mukherjee
<sudipm.mukherjee@gmail.com> wrote:
> On Tue, Sep 08, 2015 at 08:34:56PM +0300, Max Filippov wrote:
>> Sudip,
>>
>> On Tue, Sep 8, 2015 at 4:18 PM, Sudip Mukherjee
>> <sudipm.mukherjee@gmail.com> wrote:
>> > While building with allmodconfig the build failed with different dma
>> > related errors. It turned out that the dma functions were moved to
>> > asm-generic/dma-mapping-common.h() and as a result we were getting the
>> > errors of "redefinition".
>> > This patch series will move the functions as required and at the end of
>> > the series, allmodconfig builds.
>>
>> I believe it's fixed in the -mm tree and will be merged soon,
>> see the thread at https://lkml.org/lkml/2015/8/26/118
>
> I guess its already merged in Linus tree now. I tested in the morning
> with Linus tree and allmodconfig worked. But next-20150909 still failed.
AFAICS it's not merged yet: arch/xtensa/include/dma-mapping.h still
has all functions deleted by patch in the mentioned thread.
> BTW, yesterday when I was testing few of the defconfigs were not
> working. Are they also being fixed?
There are many ways they can possibly fail, but mostly build errors are
caused by using wrong compiler. For more details please refer to
http://wiki.linux-xtensa.org/index.php/Linux_Kernel#Configuring_and_building_the_kernel
--
Thanks.
-- Max
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] xtensa: fix build failure
2015-09-09 12:52 ` Max Filippov
@ 2015-09-09 13:40 ` Sudip Mukherjee
0 siblings, 0 replies; 9+ messages in thread
From: Sudip Mukherjee @ 2015-09-09 13:40 UTC (permalink / raw)
To: Max Filippov
Cc: Chris Zankel, LKML, Andrew Morton, Christoph Hellwig,
linux-xtensa@linux-xtensa.org, Stephen Rothwell
On Wed, Sep 09, 2015 at 03:52:11PM +0300, Max Filippov wrote:
> On Wed, Sep 9, 2015 at 10:11 AM, Sudip Mukherjee
> <sudipm.mukherjee@gmail.com> wrote:
> > On Tue, Sep 08, 2015 at 08:34:56PM +0300, Max Filippov wrote:
> >> Sudip,
> >>
> >> On Tue, Sep 8, 2015 at 4:18 PM, Sudip Mukherjee
> >> <sudipm.mukherjee@gmail.com> wrote:
> >> > While building with allmodconfig the build failed with different dma
> >> > related errors. It turned out that the dma functions were moved to
> >> > asm-generic/dma-mapping-common.h() and as a result we were getting the
> >> > errors of "redefinition".
> >> > This patch series will move the functions as required and at the end of
> >> > the series, allmodconfig builds.
> >>
> >> I believe it's fixed in the -mm tree and will be merged soon,
> >> see the thread at https://lkml.org/lkml/2015/8/26/118
> >
> > I guess its already merged in Linus tree now. I tested in the morning
> > with Linus tree and allmodconfig worked. But next-20150909 still failed.
>
> AFAICS it's not merged yet: arch/xtensa/include/dma-mapping.h still
> has all functions deleted by patch in the mentioned thread.
Ohhh.. I didn't notice it in the morning. I saw Linus tree is building
and I thought it may have been merged. Now on checking I see that the
series by Christoph Hellwig which removes the arch specific functions is
still not in Linus tree and thats why I didnot get any error.
regards
sudip
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-09-09 13:40 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 3/4] xtensa: fix errors " Sudip Mukherjee
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox