lkml.org 
[lkml]   [2006]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ioremap_cached()
On Thu, Mar 30, 2006 at 08:27:53PM +0200, Andi Kleen wrote:
> Matthew Wilcox <matthew@wil.cx> writes:
>
> > We currently have three ways for getting access to device memory --
> > ioremap(), ioremap_nocache() and pci_iomap(). 99% of the callers of
> > ioremap() are doing it to access device registers, and really, really
> > want to use ioremap_nocache() instead. I presume nobody notices on PCs
> > because they have write-through caches, but it ought to trip up people
> > trying to flush writes.
>
> Actually MTRRs take care of that on x86.
> So essentially on x86 ioremap() for devices is already ioremap_uncached()
> And ioremap on memory is cached.
>
> That's nice and simple semantics that other platforms can emulate too.
> Doing things differently will just cause pain for the other platforms
> when they have to fix up drivers all the time.

That doesn't make any sense. What's the point of ioremap_nocache() if
ioremap() does magic things that make things uncached? And who says
you're allowed to ioremap() memory anyway?

> It all works fine until someone wants WC too. I would rather add a
> ioremap_wc(), that would be more useful.

ioremap_wc() sounds like a good idea.
-
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/

\
 
 \ /
  Last update: 2006-03-30 21:37    [W:0.233 / U:1.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site