From: Drew Fustini <dfustini@baylibre.com>
To: Jisheng Zhang <jszhang@kernel.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
Magnus Damm <magnus.damm@gmail.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org,
Robin Murphy <robin.murphy@arm.com>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] soc: renesas: make ARCH_R9A07G043 (riscv version) depend on NONPORTABLE
Date: Wed, 4 Oct 2023 10:42:53 -0700 [thread overview]
Message-ID: <ZR2kHfUXmQ9jwQC9@x1> (raw)
In-Reply-To: <20231004150856.2540-1-jszhang@kernel.org>
On Wed, Oct 04, 2023 at 11:08:56PM +0800, Jisheng Zhang wrote:
> Drew found "CONFIG_DMA_GLOBAL_POOL=y causes ADMA buffer alloc to fail"
> the log looks like:
> [ 3.741083] mmc0: Unable to allocate ADMA buffers - falling back to standard DMA
>
> The logic is: generic riscv defconfig selects ARCH_RENESAS then
> ARCH_R9A07G043 which selects DMA_GLOBAL_POOL, which assumes all
> non-dma-coherent riscv platforms have a dma global pool, this assumption
> seems not correct. And I believe DMA_GLOBAL_POOL should not be
> selected by ARCH_SOCFAMILIY, instead, only ARCH under some specific
> conditions can select it globaly, for example NOMMU ARM and so on,
> because it's designed for special cases such as "nommu cases where
> non-cacheable memory lives in a fixed place in the physical address
> map" as pointed out by Robin.
>
> Fix the issue by making ARCH_R9A07G043 (riscv version) depend on
> NONPORTABLE, thus generic defconfig won't select ARCH_R9A07G043 by
> default. And even for random config case, there will be less debug
> effort once we see NONPORTABLE is enabled.
>
> Reported-by: Drew Fustini <dfustini@baylibre.com>
> Closes: https://lore.kernel.org/linux-riscv/ZRuamJuShOnvP1pr@x1/
> Fixes: 484861e09f3e ("soc: renesas: Kconfig: Select the required configs for RZ/Five SoC")
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
> drivers/soc/renesas/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/soc/renesas/Kconfig b/drivers/soc/renesas/Kconfig
> index 5a75ab64d1ed..12040ce116a5 100644
> --- a/drivers/soc/renesas/Kconfig
> +++ b/drivers/soc/renesas/Kconfig
> @@ -333,6 +333,7 @@ if RISCV
>
> config ARCH_R9A07G043
> bool "RISC-V Platform support for RZ/Five"
> + depends on NONPORTABLE
> select ARCH_RZG2L
> select AX45MP_L2_CACHE if RISCV_DMA_NONCOHERENT
> select DMA_GLOBAL_POOL
> --
> 2.40.1
>
Tested-by: Drew Fustini <dfustini@baylibre.com>
With this patch, I can use the defconfig and sdhci-of-dwcmshc driver is
able to use ADMA mode without needing to add shared-dma-pool to dts:
# zcat /proc/config.gz |grep DMA_GLOBAL_POOL
# dtc -I fs /sys/firmware/devicetree/base/ 2>/dev/null |grep pool
# dmesg |grep ADMA
[ 3.910269] mmc0: SDHCI controller on ffe7080000.mmc [ffe7080000.mmc] using ADMA 64-bit
Thanks,
Drew
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2023-10-04 17:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-04 15:08 [PATCH] soc: renesas: make ARCH_R9A07G043 (riscv version) depend on NONPORTABLE Jisheng Zhang
2023-10-04 15:27 ` Robin Murphy
2023-10-04 17:42 ` Drew Fustini [this message]
2023-10-05 9:19 ` Lad, Prabhakar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZR2kHfUXmQ9jwQC9@x1 \
--to=dfustini@baylibre.com \
--cc=aou@eecs.berkeley.edu \
--cc=geert+renesas@glider.be \
--cc=hch@lst.de \
--cc=jszhang@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=magnus.damm@gmail.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=robin.murphy@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox