All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-arm-kernel@lists.infradead.org,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Robin Murphy <robin.murphy@arm.com>,
	catalin.marinas@arm.com, will@kernel.org, phil@raspberrypi.org,
	stefan.wahren@i2se.com, f.fainelli@gmail.com, mbrugger@suse.com,
	Jisheng.Zhang@synaptics.com, iommu@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC 3/4] dma-direct: add dma_direct_min_mask
Date: Thu, 18 Jul 2019 13:18:42 +0200	[thread overview]
Message-ID: <13dd1a4f33fcf814545f0d93f18429e853de9eaf.camel@suse.de> (raw)
In-Reply-To: <20190718091526.GA25321@lst.de>

[-- Attachment #1: Type: text/plain, Size: 1045 bytes --]

On Thu, 2019-07-18 at 11:15 +0200, Christoph Hellwig wrote:
> On Wed, Jul 17, 2019 at 05:31:34PM +0200, Nicolas Saenz Julienne wrote:
> > Historically devices with ZONE_DMA32 have been assumed to be able to
> > address at least the lower 4GB of ram for DMA. This is still the defualt
> > behavior yet the Raspberry Pi 4 is limited to the first GB of memory.
> > This has been observed to trigger failures in dma_direct_supported() as
> > the 'min_mask' isn't properly set.
> > 
> > We create 'dma_direct_min_mask' in order for the arch init code to be
> > able to fine-tune dma direct's 'min_dma' mask.
> 
> Normally we use ZONE_DMA for that case.

Fair enough, I didn't think of that possibility.

So would the arm64 maintainers be happy with something like this:

- ZONE_DMA: Follows standard definition, 16MB in size. ARCH_ZONE_DMA_BITS is
	    left as is.
- ZONE_DMA32: Will honor the most constraining 'dma-ranges'. Which so far for
	      most devices is 4G, except for RPi4.
- ZONE_NORMAL: The rest of the memory.


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: stefan.wahren@i2se.com, f.fainelli@gmail.com,
	catalin.marinas@arm.com, phil@raspberrypi.org,
	Robin Murphy <robin.murphy@arm.com>,
	iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
	Jisheng.Zhang@synaptics.com, mbrugger@suse.com, will@kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC 3/4] dma-direct: add dma_direct_min_mask
Date: Thu, 18 Jul 2019 13:18:42 +0200	[thread overview]
Message-ID: <13dd1a4f33fcf814545f0d93f18429e853de9eaf.camel@suse.de> (raw)
In-Reply-To: <20190718091526.GA25321@lst.de>


[-- Attachment #1.1: Type: text/plain, Size: 1045 bytes --]

On Thu, 2019-07-18 at 11:15 +0200, Christoph Hellwig wrote:
> On Wed, Jul 17, 2019 at 05:31:34PM +0200, Nicolas Saenz Julienne wrote:
> > Historically devices with ZONE_DMA32 have been assumed to be able to
> > address at least the lower 4GB of ram for DMA. This is still the defualt
> > behavior yet the Raspberry Pi 4 is limited to the first GB of memory.
> > This has been observed to trigger failures in dma_direct_supported() as
> > the 'min_mask' isn't properly set.
> > 
> > We create 'dma_direct_min_mask' in order for the arch init code to be
> > able to fine-tune dma direct's 'min_dma' mask.
> 
> Normally we use ZONE_DMA for that case.

Fair enough, I didn't think of that possibility.

So would the arm64 maintainers be happy with something like this:

- ZONE_DMA: Follows standard definition, 16MB in size. ARCH_ZONE_DMA_BITS is
	    left as is.
- ZONE_DMA32: Will honor the most constraining 'dma-ranges'. Which so far for
	      most devices is 4G, except for RPi4.
- ZONE_NORMAL: The rest of the memory.


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: stefan.wahren@i2se.com, f.fainelli@gmail.com,
	catalin.marinas@arm.com, phil@raspberrypi.org,
	Robin Murphy <robin.murphy@arm.com>,
	iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
	Jisheng.Zhang@synaptics.com, mbrugger@suse.com, will@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [RFC 3/4] dma-direct: add dma_direct_min_mask
Date: Thu, 18 Jul 2019 13:18:42 +0200	[thread overview]
Message-ID: <13dd1a4f33fcf814545f0d93f18429e853de9eaf.camel@suse.de> (raw)
In-Reply-To: <20190718091526.GA25321@lst.de>


[-- Attachment #1.1: Type: text/plain, Size: 1045 bytes --]

On Thu, 2019-07-18 at 11:15 +0200, Christoph Hellwig wrote:
> On Wed, Jul 17, 2019 at 05:31:34PM +0200, Nicolas Saenz Julienne wrote:
> > Historically devices with ZONE_DMA32 have been assumed to be able to
> > address at least the lower 4GB of ram for DMA. This is still the defualt
> > behavior yet the Raspberry Pi 4 is limited to the first GB of memory.
> > This has been observed to trigger failures in dma_direct_supported() as
> > the 'min_mask' isn't properly set.
> > 
> > We create 'dma_direct_min_mask' in order for the arch init code to be
> > able to fine-tune dma direct's 'min_dma' mask.
> 
> Normally we use ZONE_DMA for that case.

Fair enough, I didn't think of that possibility.

So would the arm64 maintainers be happy with something like this:

- ZONE_DMA: Follows standard definition, 16MB in size. ARCH_ZONE_DMA_BITS is
	    left as is.
- ZONE_DMA32: Will honor the most constraining 'dma-ranges'. Which so far for
	      most devices is 4G, except for RPi4.
- ZONE_NORMAL: The rest of the memory.


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

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

  reply	other threads:[~2019-07-18 11:18 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-17 15:31 [RFC 0/4] Raspberry Pi 4 DMA addressing support Nicolas Saenz Julienne
2019-07-17 15:31 ` Nicolas Saenz Julienne
2019-07-17 15:31 ` Nicolas Saenz Julienne
2019-07-17 15:31 ` [RFC 1/4] arm64: mm: use arm64_dma_phys_limit instead of calling max_zone_dma_phys() Nicolas Saenz Julienne
2019-07-17 15:31   ` Nicolas Saenz Julienne
2019-07-17 15:31 ` [RFC 2/4] arm64: mm: parse dma-ranges in order to better estimate arm64_dma_phys_limit Nicolas Saenz Julienne
2019-07-17 15:31   ` Nicolas Saenz Julienne
2019-07-24 13:54   ` Catalin Marinas
2019-07-24 13:54     ` Catalin Marinas
2019-07-17 15:31 ` [RFC 3/4] dma-direct: add dma_direct_min_mask Nicolas Saenz Julienne
2019-07-17 15:31   ` Nicolas Saenz Julienne
2019-07-17 15:31   ` Nicolas Saenz Julienne
2019-07-18  9:15   ` Christoph Hellwig
2019-07-18  9:15     ` Christoph Hellwig
2019-07-18  9:15     ` Christoph Hellwig
2019-07-18 11:18     ` Nicolas Saenz Julienne [this message]
2019-07-18 11:18       ` Nicolas Saenz Julienne
2019-07-18 11:18       ` Nicolas Saenz Julienne
2019-07-19 13:08       ` Nicolas Saenz Julienne
2019-07-19 13:08         ` Nicolas Saenz Julienne
2019-07-19 13:08         ` Nicolas Saenz Julienne
2019-07-24 13:51         ` Catalin Marinas
2019-07-24 13:51           ` Catalin Marinas
2019-07-24 13:51           ` Catalin Marinas
2019-07-24 13:56           ` Christoph Hellwig
2019-07-24 13:56             ` Christoph Hellwig
2019-07-24 13:56             ` Christoph Hellwig
2019-07-24 14:27             ` Nicolas Saenz Julienne
2019-07-24 14:27               ` Nicolas Saenz Julienne
2019-07-24 14:27               ` Nicolas Saenz Julienne
2019-07-17 15:31 ` [RFC 4/4] arm64: mm: set direct_dma_min_mask according to dma-ranges Nicolas Saenz Julienne
2019-07-17 15:31   ` 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=13dd1a4f33fcf814545f0d93f18429e853de9eaf.camel@suse.de \
    --to=nsaenzjulienne@suse.de \
    --cc=Jisheng.Zhang@synaptics.com \
    --cc=catalin.marinas@arm.com \
    --cc=f.fainelli@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=m.szyprowski@samsung.com \
    --cc=mbrugger@suse.com \
    --cc=phil@raspberrypi.org \
    --cc=robin.murphy@arm.com \
    --cc=stefan.wahren@i2se.com \
    --cc=will@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 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.