From: Ming Lei <tom.leiming@gmail.com>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: joerg.roedel@amd.com, stefanr@s5r6.in-berlin.de,
ben-linux@fluff.org, linux-kernel@vger.kernel.org
Subject: Re: dma-debug: check_for_stack background?
Date: Tue, 16 Jun 2009 14:41:43 +0800 [thread overview]
Message-ID: <d82e647a0906152341u57e170f7v41b6c6e5b9698211@mail.gmail.com> (raw)
In-Reply-To: <20090616151628V.fujita.tomonori@lab.ntt.co.jp>
2009/6/16 FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>:
> On Mon, 15 Jun 2009 10:13:55 +0200
> Joerg Roedel <joerg.roedel@amd.com> wrote:
>
>> On Sun, Jun 14, 2009 at 11:43:42PM +0200, Stefan Richter wrote:
>> > Ben Dooks wrote:
>> >> On Sun, Jun 14, 2009 at 08:56:29PM +0200, Stefan Richter wrote:
>> >>> the DMA debug facility warns about mappings of on-stack memory.
>> >>> What's the problem with that?
>> > ...
>> >> I'm not sure if it is possible on all architectures, however the
>> >> DMA mapping documentation prohibts the use of stack memory.
>> >
>> > Ah, it has all been documented in plain sight for ages. Thanks for the
>> > pointer.
>>
>> Problem is that the stack might go away or could be otherwise reused
>> while the DMA is in-flight. This could cause really hard to debug
>> problems.
>
> Not true. Even if you use the stack buffer for DMA synchronously, it
> doesn't work (we had the bad code like starting dma and waiting for
> the completion).
Yes, there is cache alignement problem for stack buffer also.
>
> On some architectures, we can't use the stack buffer for DMA. That's
> why the DMA mapping documentation prohibits the use of stack memory
> for DMA.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
Lei Ming
next prev parent reply other threads:[~2009-06-16 6:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-14 18:56 Stefan Richter
2009-06-14 21:20 ` Ben Dooks
2009-06-14 21:43 ` Stefan Richter
2009-06-15 8:13 ` Joerg Roedel
2009-06-16 6:16 ` FUJITA Tomonori
2009-06-16 6:41 ` Ming Lei [this message]
2009-06-16 8:14 ` Joerg Roedel
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=d82e647a0906152341u57e170f7v41b6c6e5b9698211@mail.gmail.com \
--to=tom.leiming@gmail.com \
--cc=ben-linux@fluff.org \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=joerg.roedel@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stefanr@s5r6.in-berlin.de \
/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
all inboxes | Powered by JetHome®