All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: "John A. Gregor" <john.gregor@qlogic.com>,
	ralph.campbell@qlogic.com, linux-kernel@vger.kernel.org,
	johng@diamond.mv.qlogic.com, Hongjiu.lu@intel.com
Subject: Re: [PATCH] x86_64/__iowrite32_copy: don't use string move for PIO writes
Date: Fri, 10 Jul 2009 08:07:13 -0700	[thread overview]
Message-ID: <4A575921.9030501@zytor.com> (raw)
In-Reply-To: <20090709231957.GC1469@ucw.cz>

Pavel Machek wrote:
>> - the current code is fine as long as it doesn't cross from cached to
>>   uncached memory, which it never should in any kind of sensible driver;
> 
> Should we add a comment somewhere saying that is not permitted (and why)?

It sounds like what we should do is simply remove
arch/x86/lib/iomap_copy_64.S, and probably add a comment to
lib/iomap_copy.c stating that rep string instructions have been reported
to cause anomalies when accessing WC memory, and that we rely on gcc not
generating them due thanks to the volatiles in the implementation of
__raw_writel().  H.J. Lu tells me that gcc will not generate string
instructions for volatiles, and that the x86 gcc team considers that
part of the definition for volatile.  (HJL: please correct if I got that
incorrect.)

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


  reply	other threads:[~2009-07-10 15:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-06 19:07 [PATCH] x86_64/__iowrite32_copy: don't use string move for PIO writes John Gregor
2009-07-06 21:30 ` H. Peter Anvin
2009-07-06 21:36   ` John A. Gregor
2009-07-06 22:47     ` H. Peter Anvin
2009-07-06 23:44       ` John A. Gregor
2009-07-07  0:03         ` H. Peter Anvin
2009-07-07 16:06           ` John A. Gregor
2009-07-08  0:46             ` H. Peter Anvin
2009-07-09 23:19       ` Pavel Machek
2009-07-10 15:07         ` H. Peter Anvin [this message]
2009-07-10 16:02           ` Lu, Hongjiu
2009-07-06 21:41   ` John A. Gregor

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=4A575921.9030501@zytor.com \
    --to=hpa@zytor.com \
    --cc=Hongjiu.lu@intel.com \
    --cc=john.gregor@qlogic.com \
    --cc=johng@diamond.mv.qlogic.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=ralph.campbell@qlogic.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 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.