All of lore.kernel.org
 help / color / mirror / Atom feed
From: "George Spelvin" <linux@horizon.com>
To: linux@horizon.com, htejun@gmail.com
Cc: Shane.Huang@amd.com, mdnelson8@gmail.com,
	linux-ide@vger.kernel.org, jgarzik@redhat.com,
	grundler@google.com
Subject: Re: What's the SB600 64-bit DMA problem?
Date: Mon, 29 Sep 2008 00:08:11 -0400	[thread overview]
Message-ID: <20080929040812.8784.qmail@science.horizon.com> (raw)
In-Reply-To: <48E0112C.7010901@gmail.com>

Tejun Heo <htejun@gmail.com> wrote:

> George Spelvin wrote:
>> Tejun Heo <htejun@gmail.com> wrote:
>>>> Q: Does the fact that I'm using the GART IOMMU mean that I'm not really using
>>>> using 64-bit DMA at all?
>>> Can you turn it off and see what happens?
>> 
>> I can if I can verify that every other bus-master PCI device in the
>> system can do 64-bit DMA.
>> 
>> Do you know how to check that?  I haven't found a file under /sys or
>> /proc that tells me what the DMA masks are of various system
>> drivers, but that doesn't mean that it doesn't exist.
>
> It doesn't really matter.  The kernel will bounce buffers as
> necessary.

Er, according to the docs I can find, that's iommu=soft, and still
doesn't guarantee 64-bit DMA.  I was thinking about using iommu=off,
which disables everything including bounce buffers, and thereby forces
64-bit DMA.

Um... actually, I just tried it, and when there's >4G of memory, the kernel
forces iommu=soft, and it works.  At least as far as e2fsck -n on every
file system (including a 1.7 TB RAID-5) can tell.

It still doesn't definitively tell me that a DMA to and from an address
>4G was done, but it's an awfully strong hint.  I was thinking of
inserting a debug message that logs every time the "highest DMA address
used" increases, than I can watch it to see for sure.

ATM I'm just recompiling the kernel from -rc6 to -rc7.

It's in single-user mode so I can't ssh over the boot messages, but
they definitely included "64bit" from ahci_print_info().

Speaking of anci_print_info(), sould something like the following be a good
thing?

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 2e1a7cb..18137d2 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -2464,22 +2464,22 @@ static void ahci_print_info(struct ata_host *host)
 		"%s\n"
 		,
 
-		cap & (1 << 31) ? "64bit " : "",
-		cap & (1 << 30) ? "ncq " : "",
-		cap & (1 << 29) ? "sntf " : "",
-		cap & (1 << 28) ? "ilck " : "",
-		cap & (1 << 27) ? "stag " : "",
-		cap & (1 << 26) ? "pm " : "",
-		cap & (1 << 25) ? "led " : "",
-
-		cap & (1 << 24) ? "clo " : "",
-		cap & (1 << 19) ? "nz " : "",
-		cap & (1 << 18) ? "only " : "",
-		cap & (1 << 17) ? "pmp " : "",
-		cap & (1 << 15) ? "pio " : "",
-		cap & (1 << 14) ? "slum " : "",
-		cap & (1 << 13) ? "part " : "",
-		cap & (1 << 6) ? "ems ": ""
+		cap & HOST_CAP_64   ? "64bit " : "",
+		cap & HOST_CAP_NCQ  ? "ncq " : "",
+		cap & HOST_CAP_SNTF ? "sntf " : "",
+		cap & (1 << 28)     ? "ilck " : "",
+		cap & HOST_CAP_SSS  ? "stag " : "",
+		cap & HOST_CAP_ALPM ? "pm " : "",
+		cap & (1 << 25)     ? "led " : "",
+
+		cap & HOST_CAP_CLO  ? "clo " : "",
+		cap & (1 << 19)     ? "nz " : "",
+		cap & (1 << 18)     ? "only " : "",
+		cap & HOST_CAP_PMP  ? "pmp " : "",
+		cap & (1 << 15)     ? "pio " : "",
+		cap & HOST_CAP_SSC  ? "slum " : "",
+		cap & (1 << 13)     ? "part " : "",
+		cap & HOST_CAP_EMS  ? "ems ": ""
 		);
 }
 


  reply	other threads:[~2008-09-29  4:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-20 15:17 What's the SB600 64-bit DMA problem? George Spelvin
2008-09-20 22:28 ` Grant Grundler
2008-09-21  0:15   ` George Spelvin
2008-09-24  0:30     ` Mark Nelson
2008-09-24  9:46       ` Tejun Heo
2008-09-24 10:19         ` Huang, Shane
2008-09-25  3:24           ` George Spelvin
2008-09-26 14:06             ` Tejun Heo
2008-09-28 21:04               ` George Spelvin
2008-09-28 23:20                 ` Tejun Heo
2008-09-29  4:08                   ` George Spelvin [this message]
2008-09-29  4:25                     ` Tejun Heo
2008-09-30  2:00                       ` George Spelvin
2008-10-01  3:57                         ` Tejun Heo
2008-10-01 13:26                           ` George Spelvin
2008-09-26 16:04             ` Grant Grundler

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=20080929040812.8784.qmail@science.horizon.com \
    --to=linux@horizon.com \
    --cc=Shane.Huang@amd.com \
    --cc=grundler@google.com \
    --cc=htejun@gmail.com \
    --cc=jgarzik@redhat.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=mdnelson8@gmail.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.