[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <cover.1703683642.git.baruch@tkos.co.il>
Date: Wed, 27 Dec 2023 17:04:24 +0200
From: Baruch Siach <baruch@...s.co.il>
To: Christoph Hellwig <hch@....de>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>
Cc: Baruch Siach <baruch@...s.co.il>,
Robin Murphy <robin.murphy@....com>,
iommu@...ts.linux.dev,
devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
Petr Tesařík <petr@...arici.cz>,
Ramon Fried <ramon@...reality.ai>
Subject: [PATCH RFC 0/4] arm64: support DMA zone starting above 4GB
DMA zones code assumes that DMA lower limit is zero. When there is no RAM
below 4GB, arm64 platform code sets DMA/DMA32 zone limits to cover the entire
RAM[0].
The platform I have has RAM starting at 32GB. Devices with 30-bit DMA mask are
mapped to 1GB at the bottom of RAM, between 32GB - 33GB. A DMA zone over the
entire RAM breaks DMA allocation for these devices.
In response to a previous RFC hack[1] Catalin Marinas suggested to add a
separate offset value as base address for the DMA zone. This RFC series
attempts to implement that suggestion.
With this series applied, the DMA zone covers the right RAM range for my
platform.
[0] See commit 791ab8b2e3db ("arm64: Ignore any DMA offsets in the
max_zone_phys() calculation")
[1] https://lore.kernel.org/all/9af8a19c3398e7dc09cfc1fbafed98d795d9f83e.1699464622.git.baruch@tkos.co.il/
Baruch Siach (4):
of: get dma area lower limit
of: unittest: add test for of_dma_get_cpu_limits() 'min' param
dma-direct: add offset to zone_dma_bits
arm64: mm: take DMA zone offset into account
arch/arm64/mm/init.c | 18 +++++++++++++-----
drivers/of/address.c | 38 +++++++++++++++++++++++++++-----------
drivers/of/unittest.c | 17 ++++++++++-------
include/linux/dma-direct.h | 1 +
include/linux/of.h | 11 ++++++++---
kernel/dma/direct.c | 10 ++++++----
kernel/dma/pool.c | 2 +-
kernel/dma/swiotlb.c | 5 +++--
8 files changed, 69 insertions(+), 33 deletions(-)
--
2.43.0
Powered by blists - more mailing lists