[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87cytyx5gf.fsf@tarshish>
Date: Thu, 18 Jan 2024 12:59:58 +0200
From: Baruch Siach <baruch@...s.co.il>
To: "Christoph Lameter (Ampere)" <cl@...ux.com>
Cc: 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>, 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: Re: [PATCH RFC 1/4] of: get dma area lower limit
Hi Christoph
On Wed, Jan 17 2024, Christoph Lameter (Ampere) wrote:
> On Wed, 27 Dec 2023, Baruch Siach wrote:
>> of_dma_get_max_cpu_address() returns the highest CPU address that
>> devices can use for DMA. The implicit assumption is that all CPU
>> addresses below that limit are suitable for DMA. However the
>> 'dma-ranges' property this code uses also encodes a lower limit for DMA
>> that is potentially non zero.
>
> All of memory can be used for DMA by default (==ZONE_NORMAL). ZONE_DMA defines
> a special range for devices that are unable to perform DMA to all of
> memory. Usually due to the lack of address bit support.
>
> So I guess that the platform in question here has as a general limit as to
> what address spaces I/O devices can do DMA to?
DMA to/from devices in bus with 'dma-ranges' property is limited to
address space described in 'dma-ranges'. The arm64 platform currently
uses 'dma-ranges' as a hint to set ZONE_DMA limits globally. This series
is meant to make ZONE_DMA limits adjustment code work better for
platforms where the lower DMA limit is above 4GB. This commit adds the
ability to extract the lower limit from 'dma-ranges'.
baruch
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@...s.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
Powered by blists - more mailing lists