public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Ivan Djelic <ivan.djelic@parrot.com>
To: Bryan Wu <cooloney@kernel.org>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [MTD/NAND] Blackfin NFC driver DMA bug ?
Date: Fri, 22 Feb 2008 09:54:03 +0100	[thread overview]
Message-ID: <20080222085403.GA2870@parrot.com> (raw)
In-Reply-To: <20080222084533.GA2543@parrot.com>

On Fri, Feb 22, 2008 at 09:45:33AM +0100, Ivan Djelic wrote:
> > Oh, I am not fully understand your concern.  The code is invalidating
> > or flushing buf before DMA operation.
> > And invalidate and flush operation is OK for buf which is not
> > cache-aligned on Blackfin arch. it also should be
> > OK for other arch.
> 
> Well, consider the following scenario, in which 'buf' is not cache-aligned:
> 
> 1) function bf5xx_nand_dma_rw() is called for reading data.
> 
> 2) dcache is partially invalidated on a range containing 'buf': this range is
> cache-aligned, of course.
> 
> 3) some variable residing nearby 'buf' (in the same cache line interval) is
> read (not modified), resulting in a cache line being fetched. Cache line is not
> dirty.

Also, the variable contents in 3) may also be corrupted because of the
invalidation in 2).

  reply	other threads:[~2008-02-22  8:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-21 17:58 [MTD/NAND] Blackfin NFC driver DMA bug ? Ivan Djelic
2008-02-22  2:52 ` Bryan Wu
2008-02-22  7:05   ` David Woodhouse
2008-02-25 10:29     ` Bryan Wu
2008-02-22  8:45   ` Ivan Djelic
2008-02-22  8:54     ` Ivan Djelic [this message]
2008-02-25 11:15       ` Bryan Wu

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=20080222085403.GA2870@parrot.com \
    --to=ivan.djelic@parrot.com \
    --cc=cooloney@kernel.org \
    --cc=linux-mtd@lists.infradead.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