[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bdeda2206b751a1c6a8d2e0732186792282633c6.camel@suse.de>
Date: Fri, 30 Aug 2019 19:24:25 +0200
From: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
To: Catalin Marinas <catalin.marinas@....com>,
Christoph Hellwig <hch@....de>
Cc: linux-mm@...ck.org, linux-riscv@...ts.infradead.org,
will@...nel.org, m.szyprowski@...sung.com,
linux-arch@...r.kernel.org, f.fainelli@...il.com,
frowand.list@...il.com, devicetree@...r.kernel.org,
Arnd Bergmann <arnd@...db.de>, marc.zyngier@....com,
robh+dt@...nel.org, linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, phill@...pberryi.org,
mbrugger@...e.com, eric@...olt.net, linux-kernel@...r.kernel.org,
iommu@...ts.linux-foundation.org, wahrenst@....net,
akpm@...ux-foundation.org, Robin Murphy <robin.murphy@....com>
Subject: Re: [PATCH v2 01/11] asm-generic: add dma_zone_size
On Fri, 2019-08-30 at 15:45 +0100, Catalin Marinas wrote:
> On Mon, Aug 26, 2019 at 03:46:52PM +0200, Nicolas Saenz Julienne wrote:
> > On Mon, 2019-08-26 at 09:09 +0200, Christoph Hellwig wrote:
> > > On Tue, Aug 20, 2019 at 04:58:09PM +0200, Nicolas Saenz Julienne wrote:
> > > > Some architectures have platform specific DMA addressing limitations.
> > > > This will allow for hardware description code to provide the constraints
> > > > in a generic manner, so as for arch code to properly setup it's memory
> > > > zones and DMA mask.
> > >
> > > I know this just spreads the arm code, but I still kinda hate it.
> >
> > Rob's main concern was finding a way to pass the constraint from HW
> > definition
> > to arch without widening fdt's architecture specific function surface. I'd
> > say
> > it's fair to argue that having a generic mechanism makes sense as it'll now
> > traverse multiple archs and subsystems.
> >
> > I get adding globals like this is not very appealing, yet I went with it as
> > it
> > was the easier to integrate with arm's code. Any alternative suggestions?
>
> In some discussion with Robin, since it's just RPi4 that we are aware of
> having such requirement on arm64, he suggested that we have a permanent
> ZONE_DMA on arm64 with a default size of 1GB. It should cover all arm64
> SoCs we know of without breaking the single Image binary. The arch/arm
> can use its current mach-* support.
>
> I may like this more than the proposed early_init_dt_get_dma_zone_size()
> here which checks for specific SoCs (my preferred way was to build the
> mask from all buses described in DT but I hadn't realised the
> complications).
Hi Catalin, thanks for giving it a thought.
I'll be happy to implement it that way. I agree it's a good compromise.
@Christoph, do you still want the patch where I create 'zone_dma_bits'? With a
hardcoded ZONE_DMA it's not absolutely necessary. Though I remember you said it
was a first step towards being able to initialize dma-direct's min_mask in
meminit.
Regards,
Nicolas
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists