public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Alexey, Korolev" <alexey.korolev@intel.com>
To: Josh Boyer <jwboyer@gmail.com>, Nicolas Pitre <nico@cam.org>,
	Jared Hulbert <jaredeh@gmail.com>
Cc: linux-mtd@lists.infradead.org, timofey.kutergin@intel.com
Subject: Re: [RFC/PATCH] map drivers. DCACHE option for physmap and mphysmap drivers
Date: Tue, 31 Jan 2006 14:03:30 +0300	[thread overview]
Message-ID: <43DF4402.9090803@intel.com> (raw)
In-Reply-To: <625fc13d0601271419o7914b1ddu8a579e87deba9fb5@mail.gmail.com>

Jared, Josh

I looked at the map.h code. There is the only one function which 
operates cached regions. It is map_copy_from function.
This function is used for read operations only for almost all flash 
devices.
I found the only device driver which uses map_copy_from for write. It is 
AMDSTD device driver.
Josh I can bet that the cache write issues you faced were on AMDSTD 
devices. All other devices use cached regions in read only mode.
AMDSTD is obsolete and depends on CONFIG_BROKEN.
So functionally we can guarantee read only mode for cache. We can avoid 
data Cache mappings for AMDSTD or fix driver or do nothing because it's 
obsolete.

Nicolas,

Non standardized cache invalidation and mapping is a big issue for the 
kernel. I guess it's possible to provide universal interface for cahce 
operating. I don't think that it is a reason why we have to decline 
cache mapping for flash devices. I think eventually cache interfaces 
will be stadartized. I think we can do this for the first time for the 
ARM platforms. Solution with physmap and mphysmap are very flexible. For 
example we have platforms where the flash type, number of flash devices, 
band width, and map size may vary. The only good solution for these 
cases are physmap and mphysmap drivers.

Thanks,
Alexey

> On 1/27/06, Nicolas Pitre <nico@cam.org> wrote:
> > On Fri, 27 Jan 2006, Josh Boyer wrote:
> >
> > > On 1/27/06, Jared Hulbert <jaredeh@gmail.com> wrote:
> > > > When I first did a patch like this I used a very platform dependent
> > > > embedded assembly loop to _invalidate_ NOT _flush_ the specific
> > > > cachelines possibly affected by the flash program or erase.
> > >
> > > Yep, that would be better.
> >
> > No it wouldn't.  It would quickly become crufty and unreadable as more
> > architectures add their stuff.
>
> /me sighs.
>
> Yes, I misread what Jared had said.  I was solely focusing on
> "_invalidate_ NOT _flush_" and missed the embedded assembly loop part.
>
> I think you're probably right in that there is no clean way to do this
> in a non-platform specific driver.  At least not a way that would be
> worthwhile.
>
> josh
>

  reply	other threads:[~2006-01-31 11:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-26 17:24 [RFC/PATCH] map drivers. DCACHE option for physmap and mphysmap drivers Korolev, Alexey
2006-01-26 17:48 ` Josh Boyer
2006-01-27 15:31   ` Alexey, Korolev
2006-01-27 19:15     ` Jared Hulbert
2006-01-27 19:51       ` Josh Boyer
2006-01-27 20:47         ` Nicolas Pitre
2006-01-27 22:19           ` Josh Boyer
2006-01-31 11:03             ` Alexey, Korolev [this message]
2006-01-27 20:39       ` Nicolas Pitre

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=43DF4402.9090803@intel.com \
    --to=alexey.korolev@intel.com \
    --cc=jaredeh@gmail.com \
    --cc=jwboyer@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=nico@cam.org \
    --cc=timofey.kutergin@intel.com \
    /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