* Re: crypto/async_tx/* doesn't build on s390
[not found] <0C7297FA1D2D244A9C7F6959C0BF1E521D1C6C@azsmsx413.amr.corp.intel.com>
@ 2008-02-01 11:37 ` Cornelia Huck
2008-02-01 21:31 ` Dan Williams
0 siblings, 1 reply; 7+ messages in thread
From: Cornelia Huck @ 2008-02-01 11:37 UTC (permalink / raw)
To: Williams, Dan J; +Cc: heiko.carstens, herbert, neilb, schwidefsky, linux-kernel
On Thu, 31 Jan 2008 12:49:00 -0700,
"Williams, Dan J" <dan.j.williams@intel.com> wrote:
> I am mistaken, the 'depends on ARCH...' precludes HAS_DMA. Perhaps the compiler is emitting a call to async_tx_find_channel when it needs to be inline? On x86 do_async_xor is successfully compiled away when CONFIG_DMA_ENGINE=n.
Just checked why it compiled for me on one box but not on the other and
found that deactivating CONFIG_SECTION_MISMATCH makes it go away. Hmm...
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: crypto/async_tx/* doesn't build on s390
2008-02-01 11:37 ` crypto/async_tx/* doesn't build on s390 Cornelia Huck
@ 2008-02-01 21:31 ` Dan Williams
2008-02-03 11:40 ` Heiko Carstens
0 siblings, 1 reply; 7+ messages in thread
From: Dan Williams @ 2008-02-01 21:31 UTC (permalink / raw)
To: Cornelia Huck; +Cc: heiko.carstens, herbert, neilb, schwidefsky, linux-kernel
On Feb 1, 2008 4:37 AM, Cornelia Huck <cornelia.huck@de.ibm.com> wrote:
> On Thu, 31 Jan 2008 12:49:00 -0700,
> "Williams, Dan J" <dan.j.williams@intel.com> wrote:
>
> > I am mistaken, the 'depends on ARCH...' precludes HAS_DMA. Perhaps the compiler is emitting a call to async_tx_find_channel when it needs to be inline? On x86 do_async_xor is successfully compiled away when CONFIG_DMA_ENGINE=n.
>
> Just checked why it compiled for me on one box but not on the other and
> found that deactivating CONFIG_SECTION_MISMATCH makes it go away. Hmm...
>
Here is what I have come up with as a fix.
--
Dan
---
async_tx: prevent do_async_xor from compiling on !HAS_DMA archs
With the addition of -fno-inline in CONFIG_DEBUG_SECTION_MISMATCH
do_async_xor is no longer compiled away on !HAS_DMA archs like s390.
Other async_tx calls to the dma-api are already open coded inline.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
crypto/async_tx/async_xor.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/crypto/async_tx/async_xor.c b/crypto/async_tx/async_xor.c
index 2575f67..393f07d 100644
--- a/crypto/async_tx/async_xor.c
+++ b/crypto/async_tx/async_xor.c
@@ -41,6 +41,14 @@ do_async_xor(struct dma_async_tx_descriptor *tx,
struct dma_device *device,
enum dma_data_direction dir;
int i;
+ /* if this function is not inlined we need to prevent
+ * the rest of the routine from compiling on !HAS_DMA
+ * archs
+ */
+ #ifndef CONFIG_DMA_ENGINE
+ return;
+ #endif
+
pr_debug("%s: len: %zu\n", __FUNCTION__, len);
dir = (flags & ASYNC_TX_ASSUME_COHERENT) ?
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: crypto/async_tx/* doesn't build on s390
2008-02-01 21:31 ` Dan Williams
@ 2008-02-03 11:40 ` Heiko Carstens
2008-02-03 14:10 ` Dan Williams
0 siblings, 1 reply; 7+ messages in thread
From: Heiko Carstens @ 2008-02-03 11:40 UTC (permalink / raw)
To: Dan Williams
Cc: Cornelia Huck, herbert, neilb, schwidefsky, linux-kernel, Andrew Morton
On Fri, Feb 01, 2008 at 02:31:28PM -0700, Dan Williams wrote:
> On Feb 1, 2008 4:37 AM, Cornelia Huck <cornelia.huck@de.ibm.com> wrote:
> > On Thu, 31 Jan 2008 12:49:00 -0700,
> > "Williams, Dan J" <dan.j.williams@intel.com> wrote:
> >
> > > I am mistaken, the 'depends on ARCH...' precludes HAS_DMA. Perhaps the compiler is emitting a call to async_tx_find_channel when it needs to be inline? On x86 do_async_xor is successfully compiled away when CONFIG_DMA_ENGINE=n.
> >
> > Just checked why it compiled for me on one box but not on the other and
> > found that deactivating CONFIG_SECTION_MISMATCH makes it go away. Hmm...
> >
>
> Here is what I have come up with as a fix.
The fix works for me. Thanks! However your mailer replaced tabs with spaces
and added an extra line break.
> ---
> async_tx: prevent do_async_xor from compiling on !HAS_DMA archs
>
> With the addition of -fno-inline in CONFIG_DEBUG_SECTION_MISMATCH
> do_async_xor is no longer compiled away on !HAS_DMA archs like s390.
> Other async_tx calls to the dma-api are already open coded inline.
>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
>
> crypto/async_tx/async_xor.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
>
> diff --git a/crypto/async_tx/async_xor.c b/crypto/async_tx/async_xor.c
> index 2575f67..393f07d 100644
> --- a/crypto/async_tx/async_xor.c
> +++ b/crypto/async_tx/async_xor.c
> @@ -41,6 +41,14 @@ do_async_xor(struct dma_async_tx_descriptor *tx,
> struct dma_device *device,
> enum dma_data_direction dir;
> int i;
>
> + /* if this function is not inlined we need to prevent
> + * the rest of the routine from compiling on !HAS_DMA
> + * archs
> + */
> + #ifndef CONFIG_DMA_ENGINE
> + return;
> + #endif
> +
> pr_debug("%s: len: %zu\n", __FUNCTION__, len);
>
> dir = (flags & ASYNC_TX_ASSUME_COHERENT) ?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: crypto/async_tx/* doesn't build on s390
2008-02-03 11:40 ` Heiko Carstens
@ 2008-02-03 14:10 ` Dan Williams
2008-02-04 11:48 ` Cornelia Huck
0 siblings, 1 reply; 7+ messages in thread
From: Dan Williams @ 2008-02-03 14:10 UTC (permalink / raw)
To: Heiko Carstens
Cc: Cornelia Huck, herbert, neilb, schwidefsky, linux-kernel, Andrew Morton
[-- Attachment #1: Type: text/plain, Size: 528 bytes --]
On Feb 3, 2008 4:40 AM, Heiko Carstens <heiko.carstens@de.ibm.com> wrote:
> On Fri, Feb 01, 2008 at 02:31:28PM -0700, Dan Williams wrote:
[..]
> The fix works for me. Thanks! However your mailer replaced tabs with spaces
> and added an extra line break.
>
The attached patch is slightly cleaner, and still works. It marks
do_async_xor as '__always_inline'.
I have pushed this out to a git repository [1] and will be requesting
a pull later today.
--
Dan
[1] git://lost.foo-projects.org/~dwillia2/git/iop async-tx-for-linus
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: async-tx-fix-xor-compile.patch --]
[-- Type: text/x-patch; name=async-tx-fix-xor-compile.patch, Size: 995 bytes --]
async_tx: fix compile breakage, mark do_async_xor __always_inline
From: Dan Williams <dan.j.williams@intel.com>
do_async_xor must be compiled away on !HAS_DMA archs.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
crypto/async_tx/async_xor.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/crypto/async_tx/async_xor.c b/crypto/async_tx/async_xor.c
index 2575f67..716885a 100644
--- a/crypto/async_tx/async_xor.c
+++ b/crypto/async_tx/async_xor.c
@@ -30,7 +30,11 @@
#include <linux/raid/xor.h>
#include <linux/async_tx.h>
-static void
+/* do_async_xor - dma map the pages and perform the xor with an engine.
+ * This routine is marked __always_inline so it can be compiled away
+ * when CONFIG_DMA_ENGINE=n
+ */
+static __always_inline void
do_async_xor(struct dma_async_tx_descriptor *tx, struct dma_device *device,
struct dma_chan *chan, struct page *dest, struct page **src_list,
unsigned int offset, unsigned int src_cnt, size_t len,
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: crypto/async_tx/* doesn't build on s390
2008-02-03 14:10 ` Dan Williams
@ 2008-02-04 11:48 ` Cornelia Huck
0 siblings, 0 replies; 7+ messages in thread
From: Cornelia Huck @ 2008-02-04 11:48 UTC (permalink / raw)
To: Dan Williams
Cc: Heiko Carstens, herbert, neilb, schwidefsky, linux-kernel, Andrew Morton
On Sun, 3 Feb 2008 07:10:50 -0700,
"Dan Williams" <dan.j.williams@intel.com> wrote:
> On Feb 3, 2008 4:40 AM, Heiko Carstens <heiko.carstens@de.ibm.com> wrote:
> > On Fri, Feb 01, 2008 at 02:31:28PM -0700, Dan Williams wrote:
> [..]
> > The fix works for me. Thanks! However your mailer replaced tabs with spaces
> > and added an extra line break.
> >
>
> The attached patch is slightly cleaner, and still works. It marks
> do_async_xor as '__always_inline'.
>
I can confirm that the patch works for me. Thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: crypto/async_tx/* doesn't build on s390
2008-01-31 14:50 Heiko Carstens
@ 2008-01-31 17:26 ` Cornelia Huck
0 siblings, 0 replies; 7+ messages in thread
From: Cornelia Huck @ 2008-01-31 17:26 UTC (permalink / raw)
To: Heiko Carstens
Cc: Dan Williams, Herbert Xu, NeilBrown, Martin Schwidefsky, linux-kernel
On Thu, 31 Jan 2008 15:50:58 +0100,
Heiko Carstens <heiko.carstens@de.ibm.com> wrote:
> I get the following:
>
> crypto/built-in.o: In function `do_async_xor':
> async_xor.c:49: undefined reference to `dma_map_page'
> async_xor.c:56: undefined reference to `dma_map_page'
>
> This is mainly because s390 doesn't support DMA at all,
> but these files get selected via MD_RAID456 anyway.
deja-vu: http://marc.info/?l=linux-kernel&m=118056140212764&w=2
and indeed, async_memcpy.c doesn't seem to suffer from this affliction.
async_xor.c needs a similar treatment; maybe async_memset.c as well
(didn't check).
(No, I didn't actually look at the code :))
^ permalink raw reply [flat|nested] 7+ messages in thread
* crypto/async_tx/* doesn't build on s390
@ 2008-01-31 14:50 Heiko Carstens
2008-01-31 17:26 ` Cornelia Huck
0 siblings, 1 reply; 7+ messages in thread
From: Heiko Carstens @ 2008-01-31 14:50 UTC (permalink / raw)
To: Dan Williams; +Cc: Herbert Xu, NeilBrown, Martin Schwidefsky, linux-kernel
I get the following:
crypto/built-in.o: In function `do_async_xor':
async_xor.c:49: undefined reference to `dma_map_page'
async_xor.c:56: undefined reference to `dma_map_page'
This is mainly because s390 doesn't support DMA at all,
but these files get selected via MD_RAID456 anyway.
Any idea how to fix this?
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-02-04 11:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <0C7297FA1D2D244A9C7F6959C0BF1E521D1C6C@azsmsx413.amr.corp.intel.com>
2008-02-01 11:37 ` crypto/async_tx/* doesn't build on s390 Cornelia Huck
2008-02-01 21:31 ` Dan Williams
2008-02-03 11:40 ` Heiko Carstens
2008-02-03 14:10 ` Dan Williams
2008-02-04 11:48 ` Cornelia Huck
2008-01-31 14:50 Heiko Carstens
2008-01-31 17:26 ` Cornelia Huck
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).