mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Dan Gora" <dan.gora@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: PCI Bursting with PIO
Date: Thu, 14 Feb 2008 19:28:55 -0800	[thread overview]
Message-ID: <4779de450802141928led16cebkfb989551eb88a8cb@mail.gmail.com> (raw)

Hi,

I am trying to optimize a driver for a slave only PCI device and am
having a lot of trouble getting any kind of PCI burst transactions in
either the read or the write direction.  Using bcopy/memcpy or even a
hand-crafted while (len) { *pdst++ = *psrc++} (with pdst and psrc
unsigned long*) I can only get writes to burst and even in that case
only for 2 data phases (8 bytes) and only on 64 bit machines.  The
best that I have managed is to use a hand crafted asm function which
copies the data through mmx registers on i386 machines, but that still
only bursts a maximum of 16 bytes in the write direction and not at
all in the read direction.  The source and destination pointers are
both aligned to 8 byte boundaries, so I don't think that it's an
alignment issue.

Is there any way to get PIO to burst over the PCI bus in the read and
write direction?  My device has 4 BAR registers, but the area where I
am transferring data is marked 'prefetchable' (although the others are
not).  I read here: http://lkml.org/lkml/2004/9/23/393 that this was a
prerequisite, but it is apparently not sufficient.  He also mentioned
that the area had to be marked as write-back, but it's not clear how
you can tell (no /proc/mtrr doesn't tell you) or that it has anything
to do with bursting reads.

Any ideas would be really appreciated,

thanks-
dan

             reply	other threads:[~2008-02-15  3:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-15  3:28 Dan Gora [this message]
2008-02-15 10:54 ` Andi Kleen
2008-02-15 17:55   ` Dan Gora
2008-02-15 13:02 ` Alan Cox
2008-02-15 18:00   ` Dan Gora
2008-02-15 18:41     ` H. Peter Anvin
2008-02-15 19:00     ` Alan Cox
     [not found] <fa.Mbzb1/2dWnp5V/5ElzijlkAstZU@ifi.uio.no>
2008-02-16  6:00 ` Robert Hancock
2008-02-17  4:53   ` Dan Gora
     [not found] <fa.QF1nJvJhMpLvtquNDa6sbADHwhs@ifi.uio.no>
     [not found] ` <fa.LrKLA2l3F3abMpHk4aDjFfwzFVI@ifi.uio.no>
     [not found]   ` <fa.kFanAY/O5VMnSf6YXqEyxmsR62U@ifi.uio.no>
2008-02-17 19:06     ` Robert Hancock

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=4779de450802141928led16cebkfb989551eb88a8cb@mail.gmail.com \
    --to=dan.gora@gmail.com \
    --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

all inboxes | Powered by JetHome®