All of lore.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: David Miller <davem@davemloft.net>,
	jeff@garzik.org, James.Bottomley@HansenPartnership.com,
	mingo@elte.hu, tglx@linutronix.de, linux-kernel@vger.kernel.org,
	torvalds@linux-foundation.org
Subject: Re: [patch] x86, voyager: fix ioremap_nocache()
Date: Wed, 30 Apr 2008 13:35:47 -0700	[thread overview]
Message-ID: <m1od7rkrmk.fsf@frodo.ebiederm.org> (raw)
In-Reply-To: <48150667.90806@zytor.com> (H. Peter Anvin's message of "Sun, 27 Apr 2008 16:04:07 -0700")

"H. Peter Anvin" <hpa@zytor.com> writes:

> David Miller wrote:
>> I think this is a reasonable course of action.
>>
>> That leaves one of Jeff's concerns, what to do with pci_iomap().  That
>> was designed to give mappings with caching enabled, and as a result we
>> probably should make it behave that way.
>
> Yes, it should.  Just be clear that *that* is a semantic change over what the
> code currently does; it would appear that that is what the code is *trying* to
> do.
>
> I believe on x86 it will still get clamped by the MTRRs, at least initially (I
> don't think we have flipped the default MTRR type to WB yet) but that would
> immediately change the behaviour on non-x86 architectures.

Flipping the default MTRR type to WB has the potential to break an SMM
monitor which does I/O and isn't using our page tables.  So we need to
be very careful about that direction.  Finally I remember what
the specific and really scary failure mode with SMM and mucking with
the MTRRs is.

There don't appear to be many bars that set IORESOURCE_CACHABLE for use
with pci_iomap so it doesn't appear to be much of an issue.

In addition it looks like we should map IORESOURCE_PREFETCH to ioremap_wc
in pci_iomap, for those places that can take advantage of it.  It
might not always work (hardware is like that) but semantically pci
prefetch is the same as the WC attribute (reads and writes have no
side effects).  I believe on x86 if we want to get cacheline sized
reads (read prefetch) there is special instruction in the latest
processors we need to use on a wc area.

Eric

  reply	other threads:[~2008-04-30 20:39 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-27 20:51 Breakage caused by unreviewed patch in x86 tree James Bottomley
2008-04-27 20:53 ` David Miller
2008-04-27 21:48 ` [patch] x86, voyager: fix ioremap_nocache() Ingo Molnar
2008-04-27 22:05   ` James Bottomley
2008-04-27 22:36     ` Willy Tarreau
2008-04-27 22:41     ` Ingo Molnar
2008-04-27 23:18     ` Ingo Molnar
2008-04-27 23:31       ` David Miller
2008-04-28  0:31         ` Rik van Riel
2008-04-28  0:45           ` Al Viro
2008-04-28  0:52             ` H. Peter Anvin
2008-04-28  9:01         ` Alan Cox
2008-04-28  9:17           ` David Miller
2008-04-28  9:48             ` Adrian Bunk
2008-04-28 11:50             ` Ingo Molnar
2008-04-28  6:10       ` Christoph Hellwig
2008-04-28 16:55         ` H. Peter Anvin
2008-04-27 22:34   ` James Bottomley
2008-04-27 22:39     ` Jeff Garzik
2008-04-27 22:44       ` H. Peter Anvin
2008-04-27 22:46       ` David Miller
2008-04-27 22:52         ` H. Peter Anvin
2008-04-27 22:58           ` David Miller
2008-04-27 23:04             ` H. Peter Anvin
2008-04-30 20:35               ` Eric W. Biederman [this message]
2008-04-27 23:34           ` Jeff Garzik
2008-04-27 23:39             ` H. Peter Anvin
2008-04-27 22:53         ` Jeff Garzik
2008-04-27 22:56           ` H. Peter Anvin
2008-04-27 22:59             ` David Miller
2008-04-27 23:02             ` Jeff Garzik
2008-04-27 23:14               ` Arjan van de Ven
2008-04-27 23:01         ` Arjan van de Ven
2008-04-30 21:44           ` James Bottomley
2008-04-30 22:39             ` H. Peter Anvin
2008-04-27 23:01       ` Thomas Gleixner
2008-04-28 14:10       ` Arjan van de Ven
2008-04-28 14:29         ` James Bottomley
2008-04-28 15:07           ` Arjan van de Ven
2008-04-28 19:59             ` H. Peter Anvin
2008-04-27 22:00 ` Breakage caused by unreviewed patch in x86 tree H. Peter Anvin
2008-04-27 22:10   ` James Bottomley
2008-04-27 22:13     ` H. Peter Anvin
2008-04-27 22:18       ` James Bottomley
2008-04-27 22:31         ` H. Peter Anvin
2008-04-27 22:58 ` Arjan van de Ven
2008-04-27 23:00   ` David Miller
2008-04-27 23:07     ` Arjan van de Ven
2008-04-27 23:03   ` James Bottomley
2008-04-27 23:11     ` Arjan van de Ven
2008-04-27 23:17     ` H. Peter Anvin

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=m1od7rkrmk.fsf@frodo.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=davem@davemloft.net \
    --cc=hpa@zytor.com \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.