public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst•de>
To: Nicolas Saenz Julienne <nsaenzjulienne@suse•de>
Cc: Peter Zijlstra <peterz@infradead•org>,
	Benjamin Herrenschmidt <benh@kernel•crashing.org>,
	Dave Hansen <dave.hansen@linux•intel.com>,
	linux-pci@vger•kernel.org, linux-kernel@vger•kernel.org,
	linux-ide@vger•kernel.org, Paul Mackerras <paulus@samba•org>,
	Hanjun Guo <guohanjun@huawei•com>,
	Frank Rowand <frowand.list@gmail•com>,
	Christoph Hellwig <hch@lst•de>,
	Marek Szyprowski <m.szyprowski@samsung•com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm•com>,
	"H. Peter Anvin" <hpa@zytor•com>,
	Paul Burton <paulburton@kernel•org>,
	Michael Ellerman <mpe@ellerman•id.au>,
	Joerg Roedel <joro@8bytes•org>,
	x86@kernel•org, phil@raspberrypi•org, linux-acpi@vger•kernel.org,
	Ingo Molnar <mingo@redhat•com>, James Hogan <jhogan@kernel•org>,
	Len Brown <lenb@kernel•org>,
	devicetree@vger•kernel.org, Rob Herring <robh+dt@kernel•org>,
	Borislav Petkov <bp@alien8•de>, Andy Lutomirski <luto@kernel•org>,
	Bjorn Helgaas <bhelgaas@google•com>,
	Thomas Gleixner <tglx@linutronix•de>,
	linux-arm-kernel@lists•infradead.org,
	Jens Axboe <axboe@kernel•dk>,
	linuxppc-dev@lists•ozlabs.org,
	"Rafael J. Wysocki" <rjw@rjwysocki•net>,
	linux-mips@vger•kernel.org, Ralf Baechle <ralf@linux-mips•org>,
	iommu@lists•linux-foundation.org,
	Sudeep Holla <sudeep.holla@arm•com>,
	Robin Murphy <robin.murphy@arm•com>
Subject: Re: [PATCH] dma-mapping: treat dev->bus_dma_mask as a DMA limit
Date: Thu, 14 Nov 2019 08:34:59 +0100	[thread overview]
Message-ID: <20191114073459.GB26546@lst.de> (raw)
In-Reply-To: <20191113161340.27228-1-nsaenzjulienne@suse.de>

On Wed, Nov 13, 2019 at 05:13:39PM +0100, Nicolas Saenz Julienne wrote:
> Using a mask to represent bus DMA constraints has a set of limitations.
> The biggest one being it can only hold a power of two (minus one). The
> DMA mapping code is already aware of this and treats dev->bus_dma_mask
> as a limit. This quirk is already used by some architectures although
> still rare.
> 
> With the introduction of the Raspberry Pi 4 we've found a new contender
> for the use of bus DMA limits, as its PCIe bus can only address the
> lower 3GB of memory (of a total of 4GB). This is impossible to represent
> with a mask. To make things worse the device-tree code rounds non power
> of two bus DMA limits to the next power of two, which is unacceptable in
> this case.
> 
> In the light of this, rename dev->bus_dma_mask to dev->bus_dma_limit all
> over the tree and treat it as such. Note that dev->bus_dma_limit is
> meant to contain the higher accesible DMA address.

This looks sensible modulo the minor comments in this thread.

> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse•de>
> 
> ---
> 
> Note this is rebased on top of Christoph's latest DMA series:
> https://www.spinics.net/lists/arm-kernel/msg768600.html

FYI, I'll plan to merge those tonight unless anyone screams.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2019-11-14  7:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13 16:13 [PATCH] dma-mapping: treat dev->bus_dma_mask as a DMA limit Nicolas Saenz Julienne
2019-11-13 20:34 ` Robin Murphy
2019-11-13 20:41   ` Florian Fainelli
2019-11-13 21:24     ` Robin Murphy
2019-11-14  9:47   ` Nicolas Saenz Julienne
2019-11-14  7:34 ` Christoph Hellwig [this message]
2019-11-19 12:57 ` Nicolas Saenz Julienne
2019-11-19 17:00   ` Christoph Hellwig
2019-11-19 17:17     ` Robin Murphy
2019-11-21  7:31       ` Christoph Hellwig
2019-11-21  9:18         ` Nicolas Saenz Julienne

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=20191114073459.GB26546@lst.de \
    --to=hch@lst$(echo .)de \
    --cc=axboe@kernel$(echo .)dk \
    --cc=benh@kernel$(echo .)crashing.org \
    --cc=bhelgaas@google$(echo .)com \
    --cc=bp@alien8$(echo .)de \
    --cc=dave.hansen@linux$(echo .)intel.com \
    --cc=devicetree@vger$(echo .)kernel.org \
    --cc=frowand.list@gmail$(echo .)com \
    --cc=guohanjun@huawei$(echo .)com \
    --cc=hpa@zytor$(echo .)com \
    --cc=iommu@lists$(echo .)linux-foundation.org \
    --cc=jhogan@kernel$(echo .)org \
    --cc=joro@8bytes$(echo .)org \
    --cc=lenb@kernel$(echo .)org \
    --cc=linux-acpi@vger$(echo .)kernel.org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-ide@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-mips@vger$(echo .)kernel.org \
    --cc=linux-pci@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=lorenzo.pieralisi@arm$(echo .)com \
    --cc=luto@kernel$(echo .)org \
    --cc=m.szyprowski@samsung$(echo .)com \
    --cc=mingo@redhat$(echo .)com \
    --cc=mpe@ellerman$(echo .)id.au \
    --cc=nsaenzjulienne@suse$(echo .)de \
    --cc=paulburton@kernel$(echo .)org \
    --cc=paulus@samba$(echo .)org \
    --cc=peterz@infradead$(echo .)org \
    --cc=phil@raspberrypi$(echo .)org \
    --cc=ralf@linux-mips$(echo .)org \
    --cc=rjw@rjwysocki$(echo .)net \
    --cc=robh+dt@kernel$(echo .)org \
    --cc=robin.murphy@arm$(echo .)com \
    --cc=sudeep.holla@arm$(echo .)com \
    --cc=tglx@linutronix$(echo .)de \
    --cc=x86@kernel$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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