* Re: [PATCH 1/6] dma-direct: add depdenencies to CONFIG_DMA_GLOBAL_POOL [not found] ` <20231009094330.GA24836@lst.de> @ 2023-10-09 9:51 ` Geert Uytterhoeven 2023-10-09 10:04 ` Robin Murphy 0 siblings, 1 reply; 5+ messages in thread From: Geert Uytterhoeven @ 2023-10-09 9:51 UTC (permalink / raw) To: Christoph Hellwig Cc: iommu, Robin Murphy, Marek Szyprowski, Wei Fang, Shenwei Wang, Clark Wang, NXP Linux Team, linux-m68k, netdev, Jim Quinlan, linux-riscv, Linux-Renesas, Lad, Prabhakar, arm-soc Hi Christoph, CC soc On Mon, Oct 9, 2023 at 11:43 AM Christoph Hellwig <hch@lst.de> wrote: > On Mon, Oct 09, 2023 at 11:34:55AM +0200, Geert Uytterhoeven wrote: > > The fix you are referring too is probably commit c1ec4b450ab729e3 > > ("soc: renesas: Make ARCH_R9A07G043 (riscv version) depend > > on NONPORTABLE") in next-20231006 and later. It is not yet upstream. > > > > Still, it merely makes ARCH_R9A07G043 (which selects DMA_GLOBAL_POOL) > > depend on ARCH_R9A07G043. > > RISCV_DMA_NONCOHERENT still selects DMA_DIRECT_REMAP, so both can end > > up being enabled. > > Ok, so we need to actually fix this properly. Lad, can you respin > the fix to not select DMA_DIRECT_REMAP, for ARCH_R9A07G043? ARCH_R9A07G043 does not select DMA_DIRECT_REMAP directly, RISCV_DMA_NONCOHERENT does. And there are other users of RISCV_DMA_NONCOHERENT (RISCV_ISA_ZICBOM and ERRATA_THEAD_CMO). Should the selection of DMA_DIRECT_REMAP moved to their users? Note that the fix is already in soc/for-next, so we need coordination with the soc people. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/6] dma-direct: add depdenencies to CONFIG_DMA_GLOBAL_POOL 2023-10-09 9:51 ` [PATCH 1/6] dma-direct: add depdenencies to CONFIG_DMA_GLOBAL_POOL Geert Uytterhoeven @ 2023-10-09 10:04 ` Robin Murphy 2023-10-09 11:10 ` Geert Uytterhoeven 0 siblings, 1 reply; 5+ messages in thread From: Robin Murphy @ 2023-10-09 10:04 UTC (permalink / raw) To: Geert Uytterhoeven, Christoph Hellwig Cc: iommu, Marek Szyprowski, Wei Fang, Shenwei Wang, Clark Wang, NXP Linux Team, linux-m68k, netdev, Jim Quinlan, linux-riscv, Linux-Renesas, Lad, Prabhakar, arm-soc On 2023-10-09 10:51, Geert Uytterhoeven wrote: > Hi Christoph, > > CC soc > > On Mon, Oct 9, 2023 at 11:43 AM Christoph Hellwig <hch@lst.de> wrote: >> On Mon, Oct 09, 2023 at 11:34:55AM +0200, Geert Uytterhoeven wrote: >>> The fix you are referring too is probably commit c1ec4b450ab729e3 >>> ("soc: renesas: Make ARCH_R9A07G043 (riscv version) depend >>> on NONPORTABLE") in next-20231006 and later. It is not yet upstream. >>> >>> Still, it merely makes ARCH_R9A07G043 (which selects DMA_GLOBAL_POOL) >>> depend on ARCH_R9A07G043. >>> RISCV_DMA_NONCOHERENT still selects DMA_DIRECT_REMAP, so both can end >>> up being enabled. >> >> Ok, so we need to actually fix this properly. Lad, can you respin >> the fix to not select DMA_DIRECT_REMAP, for ARCH_R9A07G043? > > ARCH_R9A07G043 does not select DMA_DIRECT_REMAP directly, > RISCV_DMA_NONCOHERENT does. And there are other users of > RISCV_DMA_NONCOHERENT (RISCV_ISA_ZICBOM and ERRATA_THEAD_CMO). > Should the selection of DMA_DIRECT_REMAP moved to their users? No, the selection of DMA_GLOBAL_POOL should be removed from RISV_DMA_NONCOHERENT and selected directly by ARCH_R9A07G043 (along with any of the other implied symbols it needs). Or if as suggested this physical-attribute-remap wackiness is due to show up on more platforms as well, maybe have a common config for that which selects DMA_GLOBAL_POOL plus the relevant cache maintenance extensions as an equivalent to RISCV_DMA_NONCOHERENT, and can itself explicitly depend on NONPORTABLE for clarity. Thanks, Robin. > Note that the fix is already in soc/for-next, so we need coordination > with the soc people. > > Gr{oetje,eeting}s, > > Geert > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/6] dma-direct: add depdenencies to CONFIG_DMA_GLOBAL_POOL 2023-10-09 10:04 ` Robin Murphy @ 2023-10-09 11:10 ` Geert Uytterhoeven 2023-10-09 12:48 ` Christoph Hellwig 0 siblings, 1 reply; 5+ messages in thread From: Geert Uytterhoeven @ 2023-10-09 11:10 UTC (permalink / raw) To: Robin Murphy Cc: Christoph Hellwig, iommu, Marek Szyprowski, Wei Fang, Shenwei Wang, Clark Wang, NXP Linux Team, linux-m68k, netdev, Jim Quinlan, linux-riscv, Linux-Renesas, Lad, Prabhakar, arm-soc Hi Robin, On Mon, Oct 9, 2023 at 12:04 PM Robin Murphy <robin.murphy@arm.com> wrote: > On 2023-10-09 10:51, Geert Uytterhoeven wrote: > > On Mon, Oct 9, 2023 at 11:43 AM Christoph Hellwig <hch@lst.de> wrote: > >> On Mon, Oct 09, 2023 at 11:34:55AM +0200, Geert Uytterhoeven wrote: > >>> The fix you are referring too is probably commit c1ec4b450ab729e3 > >>> ("soc: renesas: Make ARCH_R9A07G043 (riscv version) depend > >>> on NONPORTABLE") in next-20231006 and later. It is not yet upstream. > >>> > >>> Still, it merely makes ARCH_R9A07G043 (which selects DMA_GLOBAL_POOL) > >>> depend on ARCH_R9A07G043. > >>> RISCV_DMA_NONCOHERENT still selects DMA_DIRECT_REMAP, so both can end > >>> up being enabled. > >> > >> Ok, so we need to actually fix this properly. Lad, can you respin > >> the fix to not select DMA_DIRECT_REMAP, for ARCH_R9A07G043? > > > > ARCH_R9A07G043 does not select DMA_DIRECT_REMAP directly, > > RISCV_DMA_NONCOHERENT does. And there are other users of > > RISCV_DMA_NONCOHERENT (RISCV_ISA_ZICBOM and ERRATA_THEAD_CMO). > > Should the selection of DMA_DIRECT_REMAP moved to their users? > > No, the selection of DMA_GLOBAL_POOL should be removed from > RISV_DMA_NONCOHERENT and selected directly by ARCH_R9A07G043 (along with > any of the other implied symbols it needs). Or if as suggested this > physical-attribute-remap wackiness is due to show up on more platforms > as well, maybe have a common config for that which selects > DMA_GLOBAL_POOL plus the relevant cache maintenance extensions as an > equivalent to RISCV_DMA_NONCOHERENT, and can itself explicitly depend on > NONPORTABLE for clarity. RISCV_DMA_NONCOHERENT does not select DMA_GLOBAL_POOL, ARCH_R9A07G043 selects DMA_GLOBAL_POOL. RISCV_DMA_NONCOHERENT does select DMA_DIRECT_REMAP if MMU. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/6] dma-direct: add depdenencies to CONFIG_DMA_GLOBAL_POOL 2023-10-09 11:10 ` Geert Uytterhoeven @ 2023-10-09 12:48 ` Christoph Hellwig 2023-10-09 16:45 ` Robin Murphy 0 siblings, 1 reply; 5+ messages in thread From: Christoph Hellwig @ 2023-10-09 12:48 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Robin Murphy, Christoph Hellwig, iommu, Marek Szyprowski, Wei Fang, Shenwei Wang, Clark Wang, NXP Linux Team, linux-m68k, netdev, Jim Quinlan, linux-riscv, Linux-Renesas, Lad, Prabhakar, arm-soc On Mon, Oct 09, 2023 at 01:10:26PM +0200, Geert Uytterhoeven wrote: > RISCV_DMA_NONCOHERENT does not select DMA_GLOBAL_POOL, > ARCH_R9A07G043 selects DMA_GLOBAL_POOL. > RISCV_DMA_NONCOHERENT does select DMA_DIRECT_REMAP if MMU. Yeah, and we'll basically need to split RISCV_DMA_NONCOHERENT into an option for each type of non-coherent support. This is why we should never have added support for any of the non-standard versions, as it's turning into a giant mess. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/6] dma-direct: add depdenencies to CONFIG_DMA_GLOBAL_POOL 2023-10-09 12:48 ` Christoph Hellwig @ 2023-10-09 16:45 ` Robin Murphy 0 siblings, 0 replies; 5+ messages in thread From: Robin Murphy @ 2023-10-09 16:45 UTC (permalink / raw) To: Christoph Hellwig, Geert Uytterhoeven Cc: iommu, Marek Szyprowski, Wei Fang, Shenwei Wang, Clark Wang, NXP Linux Team, linux-m68k, netdev, Jim Quinlan, linux-riscv, Linux-Renesas, Lad, Prabhakar, arm-soc On 09/10/2023 1:48 pm, Christoph Hellwig wrote: > On Mon, Oct 09, 2023 at 01:10:26PM +0200, Geert Uytterhoeven wrote: >> RISCV_DMA_NONCOHERENT does not select DMA_GLOBAL_POOL, >> ARCH_R9A07G043 selects DMA_GLOBAL_POOL. >> RISCV_DMA_NONCOHERENT does select DMA_DIRECT_REMAP if MMU. Bleh, guess I should have known better than to trust my Monday morning memory without double-checking the code :) > Yeah, and we'll basically need to split RISCV_DMA_NONCOHERENT into > an option for each type of non-coherent support. This is why we > should never have added support for any of the non-standard versions, > as it's turning into a giant mess. Indeed the main point I was trying to get at is for ARCH_R9A07G043 (or rather possibly ERRATA_ANDES_CMO) to not select RISCV_DMA_NONCOHERENT in its current form, since that ending up selecting DMA_DIRECT_REMAP on a platform which can't support it is the thing that's most obviously wrong. Thanks, Robin. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-10-09 16:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20231009074121.219686-1-hch@lst.de>
[not found] ` <20231009074121.219686-2-hch@lst.de>
[not found] ` <CAMuHMdWiYDQ5J7R7hPaVAYgXqJvpjdksoF6X-zHrJ_80Ly4XfQ@mail.gmail.com>
[not found] ` <20231009091625.GB22463@lst.de>
[not found] ` <CAMuHMdUZNewD-QC8J7MWSBP197Vc169meOjjK6=b7M11kVjUzg@mail.gmail.com>
[not found] ` <20231009094330.GA24836@lst.de>
2023-10-09 9:51 ` [PATCH 1/6] dma-direct: add depdenencies to CONFIG_DMA_GLOBAL_POOL Geert Uytterhoeven
2023-10-09 10:04 ` Robin Murphy
2023-10-09 11:10 ` Geert Uytterhoeven
2023-10-09 12:48 ` Christoph Hellwig
2023-10-09 16:45 ` Robin Murphy
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox