From: Jim Quinlan <jim2101024@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Robin Murphy <robin.murphy@arm.com>,
linux-kernel@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>,
Linux-MIPS <linux-mips@linux-mips.org>,
Florian Fainelli <f.fainelli@gmail.com>,
devicetree@vger.kernel.org, linux-pci <linux-pci@vger.kernel.org>,
Kevin Cernekee <cernekee@gmail.com>,
Will Deacon <will.deacon@arm.com>,
Ralf Baechle <ralf@linux-mips.org>,
Rob Herring <robh+dt@kernel.org>,
bcm-kernel-feedback-list <bcm-kernel-feedback-list@broadcom.com>,
Gregory Fong <gregory.0xf0@gmail.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Brian Norris <computersforpeace@gmail.com>,
linux-arm-kernel@lists.infradead.org,
Marek Szyprowski <m.szyprowski@samsung.com>,
iommu@lists.linux-foundation.org
Subject: Re: [PATCH 5/9] PCI: host: brcmstb: add dma-ranges for inbound traffic
Date: Fri, 20 Oct 2017 11:27:41 -0400 [thread overview]
Message-ID: <CANCKTBtxp9gSdndKAZ7xGA+VozQsn2PX_-9P8A22_5Matbb7-w@mail.gmail.com> (raw)
In-Reply-To: <20171020145752.GA4694@lst.de>
On Fri, Oct 20, 2017 at 10:57 AM, Christoph Hellwig <hch@lst.de> wrote:
> On Fri, Oct 20, 2017 at 10:41:56AM -0400, Jim Quinlan wrote:
>> I am not sure I understand your comment -- the size of the request
>> shouldn't be a factor. Let's look at your example of the DMA request
>> of 3fffff00 to 4000000f (physical memory). Lets say it is for 15
>> pages. If we block out the last page [0x3ffff000..0x3fffffff] from
>> what is available, there is no 15 page span that can happen across the
>> 0x40000000 boundary. For SG, there can be no merge that connects a
>> page from one region to another region. Can you give an example of
>> the scenario you are thinking of?
>
> What prevents a merge from say the regions of
> 0....3fffffff and 40000000....7fffffff?
Huh? [0x3ffff000...x3ffffff] is not available to be used. Drawing from
the original example, we now have to tell Linux that these are now our
effective memory regions:
memc0-a@[ 0....3fffefff] <=> pci@[ 0....3fffefff]
memc0-b@[100000000...13fffefff] <=> pci@[ 40000000....7fffefff]
memc1-a@[ 40000000....7fffefff] <=> pci@[ 80000000....bfffefff]
memc1-b@[300000000...33fffefff] <=> pci@[ c0000000....ffffefff]
memc2-a@[ 80000000....bfffefff] <=> pci@[100000000...13fffefff]
memc2-b@[c00000000...c3fffffff] <=> pci@[140000000...17fffffff]
This leaves a one-page gap between phsyical memory regions which would
normally be contiguous. One cannot have a dma alloc that spans any two
regions. This is a drastic step, but I don't see an alternative.
Perhaps I may be missing what you are saying...
next prev parent reply other threads:[~2017-10-20 15:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1507761269-7017-1-git-send-email-jim2101024@gmail.com>
[not found] ` <1507761269-7017-6-git-send-email-jim2101024@gmail.com>
[not found] ` <1507761269-7017-6-git-send-email-jim2101024-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-12 18:04 ` [PATCH 5/9] PCI: host: brcmstb: add dma-ranges for inbound traffic Robin Murphy
2017-10-12 21:43 ` Jim Quinlan
2017-10-17 8:14 ` Christoph Hellwig
2017-10-17 16:11 ` Jim Quinlan
[not found] ` <CANCKTBsCB+x2XgrND9AhRtxPkCXfps1nA+YymkZjKHOUZfjSHQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-18 6:53 ` Christoph Hellwig
[not found] ` <20171018065316.GA11183-jcswGhMUV9g@public.gmane.org>
2017-10-18 14:41 ` Jim Quinlan
[not found] ` <CANCKTBv+yiCNsrnx3m+W9wPqC4NdKPZ2p=zLtSa8fX6v1rPcYQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-19 9:16 ` Christoph Hellwig
2017-10-19 22:47 ` Jim Quinlan
[not found] ` <CANCKTBuaTD29My77QfOeUmtZfLAmmJXUYe6QvBW+uoH2Kb+tAQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-20 7:37 ` Christoph Hellwig
[not found] ` <20171020073730.GA12937-jcswGhMUV9g@public.gmane.org>
2017-10-20 14:41 ` Jim Quinlan
2017-10-20 14:57 ` Christoph Hellwig
2017-10-20 15:27 ` Jim Quinlan [this message]
2017-10-20 16:17 ` Christoph Hellwig
[not found] ` <CANCKTBtxp9gSdndKAZ7xGA+VozQsn2PX_-9P8A22_5Matbb7-w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-23 9:06 ` David Laight
[not found] ` <063D6719AE5E284EB5DD2968C1650D6DD009F05A-VkEWCZq2GCInGFn1LkZF6NBPR1lH4CV8@public.gmane.org>
2017-10-24 18:08 ` Jim Quinlan
2017-10-25 9:36 ` David Laight
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=CANCKTBtxp9gSdndKAZ7xGA+VozQsn2PX_-9P8A22_5Matbb7-w@mail.gmail.com \
--to=jim2101024@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bhelgaas@google.com \
--cc=catalin.marinas@arm.com \
--cc=cernekee@gmail.com \
--cc=computersforpeace@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=gregory.0xf0@gmail.com \
--cc=hch@lst.de \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-pci@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mark.rutland@arm.com \
--cc=ralf@linux-mips.org \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
--cc=will.deacon@arm.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 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).