The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@suse.cz>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: kernel list <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@elte.hu>, Dave Jones <davej@codemonkey.org.uk>,
	Andi Kleen <andi@firstfloor.org>,
	Trivial patch monkey <trivial@kernel.org>
Subject: Re: pci-gart_64.c: could we get better explanation?
Date: Thu, 26 Jun 2008 00:25:43 +0200	[thread overview]
Message-ID: <20080625222543.GD1844@elf.ucw.cz> (raw)
In-Reply-To: <1211831499.3286.2.camel@pasglop>

On Tue 2008-05-27 05:51:39, Benjamin Herrenschmidt wrote:
> 
> On Mon, 2008-05-26 at 20:47 +0200, Pavel Machek wrote:
> > Hi!
> > 
> > +++ b/arch/x86/kernel/pci-gart_64.c
> > @@ -774,6 +778,7 @@ #endif
> >  
> >         /*
> >          * Try to workaround a bug (thanks to BenH)
> >          * Set unmapped entries to a scratch page instead of 0.
> >          * Any prefetches that hit unmapped entries won't get an bus abort
> > 
> > Could someone explain? Which bug is being worked around? CPUs
> > prefetching over NULL?
> 
> P2P bridge prefetching on DMA reads.

---

Add better explanation to pci-gart.

Signed-off-by: Pavel Machek <pavel@suse.cz>

diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
index 838a1d3..e72e583 100644
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -800,10 +800,10 @@ #endif
 	wbinvd();
 
 	/*
-	 * Try to workaround a bug (thanks to BenH)
+	 * Try to workaround a bug (thanks to BenH):
 	 * Set unmapped entries to a scratch page instead of 0.
 	 * Any prefetches that hit unmapped entries won't get an bus abort
-	 * then.
+	 * then. (P2P bridge may be prefetching on DMA reads).
 	 */
 	scratch = get_zeroed_page(GFP_KERNEL);
 	if (!scratch)

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2008-06-25 22:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-26 18:47 pci-gart_64.c: could we get better explanation? Pavel Machek
2008-05-26 19:51 ` Benjamin Herrenschmidt
2008-06-25 22:25   ` Pavel Machek [this message]
2008-06-26 13:17     ` Ingo Molnar

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=20080625222543.GD1844@elf.ucw.cz \
    --to=pavel@suse.cz \
    --cc=andi@firstfloor.org \
    --cc=benh@kernel.crashing.org \
    --cc=davej@codemonkey.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=trivial@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