From: Matthew Wilcox <matthew@wil.cx>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ioremap_cached()
Date: Thu, 30 Mar 2006 13:14:35 -0700 [thread overview]
Message-ID: <20060330201435.GM13590@parisc-linux.org> (raw)
In-Reply-To: <200603302150.05357.ak@suse.de>
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.
next prev parent reply other threads:[~2006-03-30 20:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-30 16:41 [PATCH] ioremap_cached() Matthew Wilcox
2006-03-30 18:27 ` Andi Kleen
2006-03-30 19:34 ` Matthew Wilcox
2006-03-30 19:50 ` Andi Kleen
2006-03-30 20:14 ` Matthew Wilcox [this message]
2006-03-30 20:17 ` Andi Kleen
2006-03-30 20:21 ` Kumar Gala
2006-03-30 20:27 ` Andi Kleen
2006-03-31 11:20 ` Arjan van de Ven
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=20060330201435.GM13590@parisc-linux.org \
--to=matthew@wil.cx \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.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