[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a3bSYZyKV_BywQFE5vi5RE4WoPwspXfTtO1ycV1zQDbmw@mail.gmail.com>
Date: Tue, 12 Jul 2022 14:10:56 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Li Chen <me@...ux.beauty>
Cc: Arnd Bergmann <arnd@...db.de>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Li Chen <lchen@...arella.com>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
DTML <devicetree@...r.kernel.org>, Linux-MM <linux-mm@...ck.org>
Subject: Re: [PATCH 4/4] sample/reserved_mem: Introduce a sample of struct
page and dio support to no-map rmem
On Tue, Jul 12, 2022 at 12:55 PM Li Chen <me@...ux.beauty> wrote:
> >
> > This is a common limitation that gets handled automatically by setting
> > the dma_mask of the device through the dma-ranges property in DT.
> > When the driver does dma_alloc_coherent() or similar to gets its buffer,
> > it will then allocate pages below this boundary.
>
> Thanks for the tip! I wasn't aware that dma-ranges can be used by devices other than PCIe controllers.
You should actually have dma-ranges listed in the parent of any DMA master
capable device, to list the exact DMA capabilities. Without this, devices
fall back to the default 32-bit address limit, which would be correct for your
video device but is often wrong in other devices.
Arnd
Powered by blists - more mailing lists