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?
On Thu, 31 Jan 2008 15:50:58 +0100,
Heiko Carstens <[email protected]> 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 :))
On Thu, 31 Jan 2008 12:49:00 -0700,
"Williams, Dan J" <[email protected]> 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...
On Feb 1, 2008 4:37 AM, Cornelia Huck <[email protected]> wrote:
> On Thu, 31 Jan 2008 12:49:00 -0700,
> "Williams, Dan J" <[email protected]> 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 <[email protected]>
---
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) ?
On Fri, Feb 01, 2008 at 02:31:28PM -0700, Dan Williams wrote:
> On Feb 1, 2008 4:37 AM, Cornelia Huck <[email protected]> wrote:
> > On Thu, 31 Jan 2008 12:49:00 -0700,
> > "Williams, Dan J" <[email protected]> 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 <[email protected]>
> ---
>
> 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) ?
On Feb 3, 2008 4:40 AM, Heiko Carstens <[email protected]> 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
On Sun, 3 Feb 2008 07:10:50 -0700,
"Dan Williams" <[email protected]> wrote:
> On Feb 3, 2008 4:40 AM, Heiko Carstens <[email protected]> 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!