[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdYGPpUUCqmJLT4t+6CNOOmRAh_vYPSPK1SWy+tNycnSqQ@mail.gmail.com>
Date: Thu, 28 Sep 2023 01:10:27 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Jim Quinlan <james.quinlan@...adcom.com>,
Christoph Hellwig <hch@....de>
Cc: bcm-kernel-feedback-list@...adcom.com, jim2101024@...il.com,
Russell King <linux@...linux.org.uk>,
Arnd Bergmann <arnd@...db.de>,
Geert Uytterhoeven <geert+renesas@...der.be>,
"Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
Jonathan Corbet <corbet@....net>,
Thomas Gleixner <tglx@...utronix.de>,
Sebastian Reichel <sebastian.reichel@...labora.com>,
"Mike Rapoport (IBM)" <rppt@...nel.org>,
Eric DeVolder <eric.devolder@...cle.com>,
Nathan Chancellor <nathan@...nel.org>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Christophe Leroy <christophe.leroy@...roup.eu>,
"moderated list:ARM PORT" <linux-arm-kernel@...ts.infradead.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 1/1] ARM: Select DMA_DIRECT_REMAP to fix restricted DMA
Hi Jim,
thanks for your patch!
On Tue, Sep 26, 2023 at 7:52 PM Jim Quinlan <james.quinlan@...adcom.com> wrote:
> Without this commit, the use of dma_alloc_coherent() while
> using CONFIG_DMA_RESTRICTED_POOL=y breaks devices from working.
> For example, the common Wifi 7260 chip (iwlwifi) works fine
> on arm64 with restricted memory but not on arm, unless this
> commit is applied.
>
> Signed-off-by: Jim Quinlan <james.quinlan@...adcom.com>
(...)
> + select DMA_DIRECT_REMAP
Christoph invented that symbol so he can certainly
explain what is missing to use this on ARM.
This looks weird to me, because:
> git grep atomic_pool_init
arch/arm/mm/dma-mapping.c:static int __init atomic_pool_init(void)
kernel/dma/pool.c:static int __init dma_atomic_pool_init(void)
Now you have two atomic DMA pools in the kernel,
and a lot more than that is duplicated. I'm amazed that it
compiles at all.
Clearly if you want to do this, surely the ARM-specific
arch/arm/mm/dma-mapping.c and arch/arm/mm/dma-mapping-nommu.c
needs to be removed at the same time?
However I don't think it's that simple, because Christoph would surely
had done this a long time ago if it was that simple.
Yours,
Linus Walleij
Powered by blists - more mailing lists