linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/7] arm64: Default to 32-bit wide ZONE_DMA
@ 2020-10-21 12:34 Nicolas Saenz Julienne
  2020-10-21 12:34 ` [PATCH v4 7/7] mm: Remove examples from enum zone_type comment Nicolas Saenz Julienne
  2020-10-23 19:05 ` [PATCH v4 0/7] arm64: Default to 32-bit wide ZONE_DMA Jeremy Linton
  0 siblings, 2 replies; 5+ messages in thread
From: Nicolas Saenz Julienne @ 2020-10-21 12:34 UTC (permalink / raw)
  To: robh+dt, catalin.marinas, hch, ardb, linux-kernel
  Cc: robin.murphy, linux-arm-kernel, linux-rpi-kernel, jeremy.linton,
	iommu, devicetree, will, lorenzo.pieralisi, guohanjun,
	Nicolas Saenz Julienne, linux-acpi, linux-mm, linux-riscv

Using two distinct DMA zones turned out to be problematic. Here's an
attempt go back to a saner default.

I tested this on both a RPi4 and QEMU.

---

Changes since v3:
 - Drop patch adding define in dma-mapping
 - Address small review changes
 - Update Ard's patch
 - Add new patch removing examples from mmzone.h

Changes since v2:
 - Introduce Ard's patch
 - Improve OF dma-ranges parsing function
 - Add unit test for OF function
 - Address small changes
 - Move crashkernel reservation later in boot process

Changes since v1:
 - Parse dma-ranges instead of using machine compatible string

Ard Biesheuvel (1):
  arm64: mm: Set ZONE_DMA size based on early IORT scan

Nicolas Saenz Julienne (6):
  arm64: mm: Move reserve_crashkernel() into mem_init()
  arm64: mm: Move zone_dma_bits initialization into zone_sizes_init()
  of/address: Introduce of_dma_get_max_cpu_address()
  of: unittest: Add test for of_dma_get_max_cpu_address()
  arm64: mm: Set ZONE_DMA size based on devicetree's dma-ranges
  mm: Remove examples from enum zone_type comment

 arch/arm64/mm/init.c      | 16 ++++++------
 drivers/acpi/arm64/iort.c | 52 +++++++++++++++++++++++++++++++++++++++
 drivers/of/address.c      | 42 +++++++++++++++++++++++++++++++
 drivers/of/unittest.c     | 18 ++++++++++++++
 include/linux/acpi_iort.h |  4 +++
 include/linux/mmzone.h    | 20 ---------------
 include/linux/of.h        |  7 ++++++
 7 files changed, 130 insertions(+), 29 deletions(-)

-- 
2.28.0



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v4 7/7] mm: Remove examples from enum zone_type comment
  2020-10-21 12:34 [PATCH v4 0/7] arm64: Default to 32-bit wide ZONE_DMA Nicolas Saenz Julienne
@ 2020-10-21 12:34 ` Nicolas Saenz Julienne
  2020-10-23  6:49   ` Christoph Hellwig
  2020-10-23 19:05 ` [PATCH v4 0/7] arm64: Default to 32-bit wide ZONE_DMA Jeremy Linton
  1 sibling, 1 reply; 5+ messages in thread
From: Nicolas Saenz Julienne @ 2020-10-21 12:34 UTC (permalink / raw)
  To: robh+dt, catalin.marinas, hch, ardb, linux-kernel, Andrew Morton,
	Paul Walmsley, Palmer Dabbelt, Albert Ou
  Cc: robin.murphy, linux-arm-kernel, linux-rpi-kernel, jeremy.linton,
	iommu, devicetree, will, lorenzo.pieralisi, guohanjun,
	Nicolas Saenz Julienne, linux-mm, linux-riscv

We can't really list every setup in common code. On top of that they are
unlikely to stay true for long as things change in the arch trees
independently of this comment.

Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
---
 include/linux/mmzone.h | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index fb3bf696c05e..9d0c454d23cd 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -354,26 +354,6 @@ enum zone_type {
 	 * DMA mask is assumed when ZONE_DMA32 is defined. Some 64-bit
 	 * platforms may need both zones as they support peripherals with
 	 * different DMA addressing limitations.
-	 *
-	 * Some examples:
-	 *
-	 *  - i386 and x86_64 have a fixed 16M ZONE_DMA and ZONE_DMA32 for the
-	 *    rest of the lower 4G.
-	 *
-	 *  - arm only uses ZONE_DMA, the size, up to 4G, may vary depending on
-	 *    the specific device.
-	 *
-	 *  - arm64 has a fixed 1G ZONE_DMA and ZONE_DMA32 for the rest of the
-	 *    lower 4G.
-	 *
-	 *  - powerpc only uses ZONE_DMA, the size, up to 2G, may vary
-	 *    depending on the specific device.
-	 *
-	 *  - s390 uses ZONE_DMA fixed to the lower 2G.
-	 *
-	 *  - ia64 and riscv only use ZONE_DMA32.
-	 *
-	 *  - parisc uses neither.
 	 */
 #ifdef CONFIG_ZONE_DMA
 	ZONE_DMA,
-- 
2.28.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v4 7/7] mm: Remove examples from enum zone_type comment
  2020-10-21 12:34 ` [PATCH v4 7/7] mm: Remove examples from enum zone_type comment Nicolas Saenz Julienne
@ 2020-10-23  6:49   ` Christoph Hellwig
  0 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2020-10-23  6:49 UTC (permalink / raw)
  To: Nicolas Saenz Julienne
  Cc: robh+dt, catalin.marinas, hch, ardb, linux-kernel, Andrew Morton,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, robin.murphy,
	linux-arm-kernel, linux-rpi-kernel, jeremy.linton, iommu,
	devicetree, will, lorenzo.pieralisi, guohanjun, linux-mm,
	linux-riscv

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v4 0/7] arm64: Default to 32-bit wide ZONE_DMA
  2020-10-21 12:34 [PATCH v4 0/7] arm64: Default to 32-bit wide ZONE_DMA Nicolas Saenz Julienne
  2020-10-21 12:34 ` [PATCH v4 7/7] mm: Remove examples from enum zone_type comment Nicolas Saenz Julienne
@ 2020-10-23 19:05 ` Jeremy Linton
  2020-10-27 11:50   ` Nicolas Saenz Julienne
  1 sibling, 1 reply; 5+ messages in thread
From: Jeremy Linton @ 2020-10-23 19:05 UTC (permalink / raw)
  To: Nicolas Saenz Julienne, robh+dt, catalin.marinas, hch, ardb,
	linux-kernel
  Cc: robin.murphy, linux-arm-kernel, linux-rpi-kernel, iommu,
	devicetree, will, lorenzo.pieralisi, guohanjun, linux-acpi,
	linux-mm, linux-riscv

Hi,

On 10/21/20 7:34 AM, Nicolas Saenz Julienne wrote:
> Using two distinct DMA zones turned out to be problematic. Here's an
> attempt go back to a saner default.
> 
> I tested this on both a RPi4 and QEMU.

I've tested this in ACPI mode on the rpi4 (4+8G with/without the 3G 
limiter) as well, with Ard's IORT patch. Nothing seems to have regressed.

Thanks,

Tested-by: Jeremy Linton <jeremy.linton@arm.com>




> 
> ---
> 
> Changes since v3:
>   - Drop patch adding define in dma-mapping
>   - Address small review changes
>   - Update Ard's patch
>   - Add new patch removing examples from mmzone.h
> 
> Changes since v2:
>   - Introduce Ard's patch
>   - Improve OF dma-ranges parsing function
>   - Add unit test for OF function
>   - Address small changes
>   - Move crashkernel reservation later in boot process
> 
> Changes since v1:
>   - Parse dma-ranges instead of using machine compatible string
> 
> Ard Biesheuvel (1):
>    arm64: mm: Set ZONE_DMA size based on early IORT scan
> 
> Nicolas Saenz Julienne (6):
>    arm64: mm: Move reserve_crashkernel() into mem_init()
>    arm64: mm: Move zone_dma_bits initialization into zone_sizes_init()
>    of/address: Introduce of_dma_get_max_cpu_address()
>    of: unittest: Add test for of_dma_get_max_cpu_address()
>    arm64: mm: Set ZONE_DMA size based on devicetree's dma-ranges
>    mm: Remove examples from enum zone_type comment
> 
>   arch/arm64/mm/init.c      | 16 ++++++------
>   drivers/acpi/arm64/iort.c | 52 +++++++++++++++++++++++++++++++++++++++
>   drivers/of/address.c      | 42 +++++++++++++++++++++++++++++++
>   drivers/of/unittest.c     | 18 ++++++++++++++
>   include/linux/acpi_iort.h |  4 +++
>   include/linux/mmzone.h    | 20 ---------------
>   include/linux/of.h        |  7 ++++++
>   7 files changed, 130 insertions(+), 29 deletions(-)
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v4 0/7] arm64: Default to 32-bit wide ZONE_DMA
  2020-10-23 19:05 ` [PATCH v4 0/7] arm64: Default to 32-bit wide ZONE_DMA Jeremy Linton
@ 2020-10-27 11:50   ` Nicolas Saenz Julienne
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Saenz Julienne @ 2020-10-27 11:50 UTC (permalink / raw)
  To: Jeremy Linton, robh+dt, catalin.marinas, hch, ardb, linux-kernel
  Cc: robin.murphy, linux-arm-kernel, linux-rpi-kernel, iommu,
	devicetree, will, lorenzo.pieralisi, guohanjun, linux-acpi,
	linux-mm, linux-riscv

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

On Fri, 2020-10-23 at 14:05 -0500, Jeremy Linton wrote:
> Hi,
> 
> On 10/21/20 7:34 AM, Nicolas Saenz Julienne wrote:
> > Using two distinct DMA zones turned out to be problematic. Here's an
> > attempt go back to a saner default.
> > 
> > I tested this on both a RPi4 and QEMU.
> 
> I've tested this in ACPI mode on the rpi4 (4+8G with/without the 3G 
> limiter) as well, with Ard's IORT patch. Nothing seems to have regressed.
> 
> Thanks,
> 
> Tested-by: Jeremy Linton <jeremy.linton@arm.com>

Thanks!


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-10-27 11:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-21 12:34 [PATCH v4 0/7] arm64: Default to 32-bit wide ZONE_DMA Nicolas Saenz Julienne
2020-10-21 12:34 ` [PATCH v4 7/7] mm: Remove examples from enum zone_type comment Nicolas Saenz Julienne
2020-10-23  6:49   ` Christoph Hellwig
2020-10-23 19:05 ` [PATCH v4 0/7] arm64: Default to 32-bit wide ZONE_DMA Jeremy Linton
2020-10-27 11:50   ` Nicolas Saenz Julienne

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).