From: Bjorn Helgaas <bhelgaas@google.com>
To: Magnus Damm <magnus.damm@gmail.com>
Cc: linux-pci@vger.kernel.org, linux-sh@vger.kernel.org,
linux-kernel@vger.kernel.org,
valentine.barshak@cogentembedded.com, horms@verge.net.au,
ben.dooks@codethink.co.uk
Subject: Re: [PATCH 00/04] PCI: rcar: Driver model and physical address space update
Date: Wed, 12 Feb 2014 13:59:11 -0700 [thread overview]
Message-ID: <20140212205911.GB5554@google.com> (raw)
In-Reply-To: <20140205065243.29445.76593.sendpatchset@w520>
On Wed, Feb 05, 2014 at 03:52:43PM +0900, Magnus Damm wrote:
> PCI: rcar: Driver model and physical address space update
>
> [PATCH 01/04] PCI: rcar: Register each instance independently
> [PATCH 02/04] PCI: rcar: Break out window size handling
> [PATCH 03/04] PCI: rcar: Add DMABOUNCE support
> [PATCH 04/04] PCI: rcar: Enable BOUNCE in case of HIGHMEM
>
> These patches update the pci-rcar-gen2.c driver in various ways
> including cleanups for driver model interface (1/4), readability
> update (2/4) and also bounce buffer support (3/4, 4/4). Basically
> the first two are just cleanups and the rest are fixes.
>
> As it is today without these patches the system memory start address
> is hard coded at 0x4000000 and the window is fixed at 1GiB. So we
> have board specific code hidden in the driver which is good to avoid.
>
> With these hard coded board specific constants there are some error cases
> that are not handled, in particular the issue that only maximum 1GiB of
> physical address space can be used for bus mastering with a single window.
> The common case of using ARM CONFIG_VMSPLIT_3G results in no visible issues
> as long as CONFIG_BOUNCE is used, but other CONFIG_VMSPLIT settings will
> break due to the hard coded 1GiB window not being enough. It has been
> verified that reducing the window size to 256MB makes the driver behave
> the same with VMSPLIT_3G as 1GiB window size and other VMSPLIT settings.
>
> To handle the maximum 1GiB physical address space limitation two types
> of bounce buffers are added. The ARM specific DMABOUNCE code is in 3/4
> hooked up to a chunk of local memory that is also handed of as coherent
> memory to the pci devices hanging off the PCI bridge. The driver makes
> sure to set the window so the local memory is always included. When the
> PCI devices are operating and in case memory is used outside the window
> then the DMABOUNCE buffers kicks in. This makes the driver support all
> kinds of VMSPLIT settings and window sizes. The BOUNCE code in 4/4 is
> selected to make sure bounce buffers are used for HIGHMEM.
>
> With these patches this driver can be used with or without CMA and
> with or without DMA zone. Basically the system wide memory setup is
> left to the user. If a DMA zone is used then the PCI window will
> be setup to cover that. Same thing with CMA.
>
> Tested with USB storage using LPAE and various VMSPLIT settings together
> with renesas git tag renesas-devel-v3.14-rc1-20140204 from kernel.org
>
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
>
> Written against renesas.git tag renesas-devel-v3.14-rc1-20140204
>
> drivers/pci/host/Kconfig | 3
> drivers/pci/host/pci-rcar-gen2.c | 367 +++++++++++++++++++++++++++++++-------
> 2 files changed, 306 insertions(+), 64 deletions(-)
Simon, if you want to ack these, I'll be happy to merge them for v3.15.
I'm not really qualified to review them myself.
Bjorn
next prev parent reply other threads:[~2014-02-12 20:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-05 6:52 [PATCH 00/04] PCI: rcar: Driver model and physical address space update Magnus Damm
2014-02-05 6:52 ` [PATCH 01/04] PCI: rcar: Register each instance independently Magnus Damm
2014-02-05 8:02 ` Geert Uytterhoeven
2014-02-05 8:39 ` Magnus Damm
2014-02-05 8:29 ` Ben Dooks
2014-02-05 8:43 ` Magnus Damm
2014-02-05 6:53 ` [PATCH 02/04] PCI: rcar: Break out window size handling Magnus Damm
2014-02-05 6:53 ` [PATCH 03/04] PCI: rcar: Add DMABOUNCE support Magnus Damm
2014-02-05 6:53 ` [PATCH 04/04] PCI: rcar: Enable BOUNCE in case of HIGHMEM Magnus Damm
2014-02-05 8:33 ` [PATCH 00/04] PCI: rcar: Driver model and physical address space update Ben Dooks
2014-02-05 9:00 ` Magnus Damm
2014-02-05 9:25 ` Ben Dooks
2014-02-05 9:40 ` Magnus Damm
2014-02-05 10:12 ` Ben Dooks
2014-02-12 20:59 ` Bjorn Helgaas [this message]
2014-02-13 4:37 ` Simon Horman
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=20140212205911.GB5554@google.com \
--to=bhelgaas@google.com \
--cc=ben.dooks@codethink.co.uk \
--cc=horms@verge.net.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=valentine.barshak@cogentembedded.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).