Re: [PATCH] ioremap_cached()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 30, 2006 at 09:50:05PM +0200, Andi Kleen wrote:
> > That doesn't make any sense.  What's the point of ioremap_nocache() if
> > ioremap() does magic things that make things uncached? 
> 
> In theory ioremap_nocache would force uncached even if there is no MTRR
> and is better/clearer.
> 
> But on x86 there normally is, so lots of code gets it wrong.
> 
> My point is just that forcing a semantics that's not enforced
> on x86 would be a uphill battle for everybody else. Probably not
> a good idea. Better fake x86.

I think you misunderstood.  The right interface to call, that should
work everywhere, should be the simple, obvious one.  ioremap().  That
effectively is what everyone gets anyway (since they test on x86).
So change the *definition* of ioremap() to be uncached.  Then we can add
ioremap_wc() and ioremap_cached() for these special purpose mappings.

> It's unfortunately tricky to get it fully right on x86. The issue
> is to have a good way avoid illegal cache aliases. There were some
> attempts, but so far they never were polished up from the initial
> prototypes.

I know there's similar issues with Itanium.  IIRC, the EFI memory map
helps here by saying how various different types of memory should be
mapped.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux