linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: David Miller <davem@davemloft.net>
Cc: bjorn@helgaas.com, bjorn.helgaas@gmail.com,
	sparclinux@vger.kernel.org, linux-pci@vger.kernel.org,
	yinghai@kernel.org, david.ahern@oracle.com,
	linux-kernel@vger.kernel.org
Subject: Re: d63e2e1f3df breaks sparc/T5-8
Date: Fri, 3 Apr 2015 10:45:26 -0500	[thread overview]
Message-ID: <20150403154526.GB10892@google.com> (raw)
In-Reply-To: <20150329.113250.2136683943336875789.davem@davemloft.net>

On Sun, Mar 29, 2015 at 11:32:50AM -0700, David Miller wrote:
> From: Bjorn Helgaas <bjorn.helgaas@gmail.com>
> Date: Sun, 29 Mar 2015 08:30:40 -0500
> 
> > Help me understand the sparc64 situation: are you saying that BAR
> > addresses, i.e., MMIO transactions from a CPU or a peer-to-peer DMA can be
> > 64 bits, but a DMA to main memory can only be 32 bits?
> > 
> > I assume this would work if we made dma_addr_t 64 bits on sparc64.  What
> > would be the cost of doing that?
> 
> The cost is 4 extra bytes in every datastructure, kernel wide, that
> stores DMA addresses.

That much is fairly obvious.  What I don't know is how much difference this
makes in the end.

> Don't use DMA addresses for PCI addresses.  They are absolutely not
> the same, especially when an IOMMU is always present because in that
> case all DMA addresses are virtual and exist in a different realm
> and set of constraints/restrictions.

I'm still trying to figure out a clear description of how a DMA address is
different from a PCI address.  If you capture a transaction with a PCI
analyzer, I don't think you can tell a DMA address from a PCI address
unless you know how bridge windows are programmed.  Even then, I'm not sure
you can tell a CPU-generated PCI address from a DMA address in a
device-generated peer-to-peer transaction.

Bjorn

  reply	other threads:[~2015-04-03 15:45 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26 16:51 d63e2e1f3df breaks sparc/T5-8 David Ahern
2015-03-26 20:43 ` Yinghai Lu
2015-03-26 23:27   ` David Ahern
2015-03-27 21:01     ` Yinghai Lu
2015-03-27 21:50       ` David Miller
2015-03-27 22:51         ` Yinghai Lu
     [not found]         ` <CABhMZUVqgsYdT4wn2H8hsrh4f=6hT0G+sg=wwYSt33+jtvBS9A@mail.gmail.com>
2015-03-29 18:32           ` David Miller
2015-04-03 15:45             ` Bjorn Helgaas [this message]
2015-04-03 16:48               ` David Miller
2015-03-27 23:57       ` Yinghai Lu
2015-03-28  0:32         ` David Ahern
2015-03-28  0:36           ` David Ahern
2015-03-28  3:19             ` Yinghai Lu
2015-03-28  3:22               ` David Ahern
2015-03-28  3:27                 ` Yinghai Lu
2015-03-28  3:45               ` David Ahern
2015-03-28  5:26                 ` Yinghai Lu
2015-03-28 14:48                   ` David Ahern
2015-03-28 20:24                     ` Yinghai Lu
2015-03-29 14:47                       ` David Ahern
2015-03-29 20:07                         ` Yinghai Lu
2015-03-30 22:54                           ` David Ahern
2015-03-31  1:06                             ` Yinghai Lu
2015-03-31  4:10                               ` David Ahern
2015-03-31 16:53                                 ` Yinghai Lu
2015-03-31 17:04                                   ` David Ahern
2015-03-31 20:28                                     ` Yinghai Lu
2015-03-31 22:29                                       ` David Ahern
2015-03-31 22:38                                         ` Yinghai Lu
2015-03-31 22:42                                           ` David Ahern
2015-03-31 15:06                               ` David Miller
2015-03-31 18:16                                 ` Yinghai Lu
2015-03-31 18:19                                   ` David Miller
2015-03-31 18:25                                     ` Yinghai Lu
2015-03-28  1:05         ` Sam Ravnborg
2015-03-28  2:07           ` Yinghai Lu
2015-03-28  8:18             ` Sam Ravnborg
2015-03-28 18:16         ` David Miller
2015-03-28 20:19           ` Yinghai Lu

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=20150403154526.GB10892@google.com \
    --to=bhelgaas@google.com \
    --cc=bjorn.helgaas@gmail.com \
    --cc=bjorn@helgaas.com \
    --cc=davem@davemloft.net \
    --cc=david.ahern@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=yinghai@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;
as well as URLs for NNTP newsgroup(s).