[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190724135425.GB44864@arrakis.emea.arm.com>
Date: Wed, 24 Jul 2019 14:54:25 +0100
From: Catalin Marinas <catalin.marinas@....com>
To: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
will@...nel.org, robin.murphy@....com, m.szyprowski@...sung.com,
hch@....de, phil@...pberrypi.org, stefan.wahren@...e.com,
f.fainelli@...il.com, mbrugger@...e.com,
Jisheng.Zhang@...aptics.com
Subject: Re: [RFC 2/4] arm64: mm: parse dma-ranges in order to better
estimate arm64_dma_phys_limit
On Wed, Jul 17, 2019 at 05:31:33PM +0200, Nicolas Saenz Julienne wrote:
> The dma physical limit has so far been calculated based on the memory
> size and the assumption that dma would be at least able to address the
> first 4 GB. This turned out no to be true with the Raspberry Pi 4
> which, on it's main interconnect, can only address the first GB of
> memory, even though it might have up to 4 GB.
>
> With the current miscalculated dma physical limit the contiguous memory
> reserve is located in an inaccessible area for most of the board's
> devices.
>
> To solve this we now scan the device tree for the 'dma-ranges' property
> on the root or interconnect nodes, which allows us to calculate the
> lowest common denominator dma physical limit. If no dma-ranges is
> available, we'll default to the old scheme.
>
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
> ---
> arch/arm64/mm/init.c | 61 +++++++++++++++++++++++++++++++++++++++++---
> 1 file changed, 57 insertions(+), 4 deletions(-)
I'd rather have this parsing in the core code, returning setting the
minimum DMA mask (or range, address etc.) that covers all devices/buses
described.
--
Catalin
Powered by blists - more mailing lists