From: Vadim Akimov <lvd2@ziggo.nl>
To: Anup Patel <apatel@ventanamicro.com>
Cc: Alexandre Ghiti <alex@ghiti.fr>,
Atish Patra <atish.patra@linux.dev>,
Anup Patel <anup@brainfault.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
linux-kernel@vger.kernel.org, Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
linux-riscv@lists.infradead.org, linux-sunxi@lists.linux.dev,
Andrew Jones <ajones@ventanamicro.com>
Subject: Re: [PATCH] RISC-V: Define pgprot_dmacoherent() for non-coherent devices
Date: Sat, 9 May 2026 13:56:12 +0200 [thread overview]
Message-ID: <af8g3DlQhHSME-0_@pivobook> (raw)
In-Reply-To: <20250820152316.1012757-1-apatel@ventanamicro.com>
Hi,
On Wed, Aug 20, 2025 at 08:53:16PM +0530, Anup Patel wrote:
> The pgprot_dmacoherent() is used when allocating memory for
> non-coherent devices and by default pgprot_dmacoherent() is
> same as pgprot_noncached() unless architecture overrides it.
> diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
> index 91697fbf1f90..00d8bdaf1e8d 100644
> --- a/arch/riscv/include/asm/pgtable.h
> +++ b/arch/riscv/include/asm/pgtable.h
> +#define pgprot_dmacoherent pgprot_writecombine
This single-line patch, as implemented in commit 00b58d2c25d10fecffbebaa0c369fc9d0a6de397 for 6.6.y,
breaks allwinner D1 SDcard handling:
[ 0.000000] Linux version 6.6.115 (surfin@nedoserver) (riscv64-unknown-linux-gnu-gcc () 11.3.0, GNU ld (GNU Binutils) 2.38) #1 Tue May 5 10:25:47 MSK 2026
[ 4.886823] sunxi-mmc 4020000.mmc: Got CD GPIO
[ 4.893625] sunxi-mmc 4021000.mmc: allocated mmc-pwrseq
[ 4.941711] sunxi-mmc 4021000.mmc: initialized, max. request size: 2048 KB, uses new timings mode
[ 4.958033] sunxi-mmc 4020000.mmc: initialized, max. request size: 2048 KB, uses new timings mode
[ 4.990692] sunxi-mmc 4021000.mmc: card claims to support voltages below defined range
[ 5.009712] mmc1: new high speed SDIO card at address 0001
then following never happens with that patch, i.e. no SD card is found.
#[ 5.109896] mmc0: new high speed SDHC card at address 0001
#[ 5.116546] mmcblk0: mmc0:0001 EB1QT 29.8 GiB
#[ 5.128887] mmcblk0: p1 p2
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
From: Vadim Akimov <lvd2@ziggo.nl>
To: Anup Patel <apatel@ventanamicro.com>
Cc: "Rafael J . Wysocki" <rafael@kernel.org>,
Sunil V L <sunilvl@ventanamicro.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Alexandre Ghiti <alex@ghiti.fr>,
Atish Patra <atish.patra@linux.dev>,
Andrew Jones <ajones@ventanamicro.com>,
Anup Patel <anup@brainfault.org>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-sunxi@lists.linux.dev
Subject: Re: [PATCH] RISC-V: Define pgprot_dmacoherent() for non-coherent devices
Date: Sat, 9 May 2026 13:56:12 +0200 [thread overview]
Message-ID: <af8g3DlQhHSME-0_@pivobook> (raw)
In-Reply-To: <20250820152316.1012757-1-apatel@ventanamicro.com>
Hi,
On Wed, Aug 20, 2025 at 08:53:16PM +0530, Anup Patel wrote:
> The pgprot_dmacoherent() is used when allocating memory for
> non-coherent devices and by default pgprot_dmacoherent() is
> same as pgprot_noncached() unless architecture overrides it.
> diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
> index 91697fbf1f90..00d8bdaf1e8d 100644
> --- a/arch/riscv/include/asm/pgtable.h
> +++ b/arch/riscv/include/asm/pgtable.h
> +#define pgprot_dmacoherent pgprot_writecombine
This single-line patch, as implemented in commit 00b58d2c25d10fecffbebaa0c369fc9d0a6de397 for 6.6.y,
breaks allwinner D1 SDcard handling:
[ 0.000000] Linux version 6.6.115 (surfin@nedoserver) (riscv64-unknown-linux-gnu-gcc () 11.3.0, GNU ld (GNU Binutils) 2.38) #1 Tue May 5 10:25:47 MSK 2026
[ 4.886823] sunxi-mmc 4020000.mmc: Got CD GPIO
[ 4.893625] sunxi-mmc 4021000.mmc: allocated mmc-pwrseq
[ 4.941711] sunxi-mmc 4021000.mmc: initialized, max. request size: 2048 KB, uses new timings mode
[ 4.958033] sunxi-mmc 4020000.mmc: initialized, max. request size: 2048 KB, uses new timings mode
[ 4.990692] sunxi-mmc 4021000.mmc: card claims to support voltages below defined range
[ 5.009712] mmc1: new high speed SDIO card at address 0001
then following never happens with that patch, i.e. no SD card is found.
#[ 5.109896] mmc0: new high speed SDHC card at address 0001
#[ 5.116546] mmcblk0: mmc0:0001 EB1QT 29.8 GiB
#[ 5.128887] mmcblk0: p1 p2
next prev parent reply other threads:[~2026-05-09 11:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 15:23 [PATCH] RISC-V: Define pgprot_dmacoherent() for non-coherent devices Anup Patel
2025-08-20 15:23 ` Anup Patel
2025-10-12 6:07 ` Guo Ren
2025-10-12 6:07 ` Guo Ren
2025-10-12 6:59 ` Guo Ren
2025-10-12 6:59 ` Guo Ren
2025-10-12 10:00 ` Han Gao (Revy)
2025-10-12 10:00 ` Han Gao (Revy)
2025-10-18 16:01 ` patchwork-bot+linux-riscv
2025-10-18 16:01 ` patchwork-bot+linux-riscv
2026-05-09 11:56 ` Vadim Akimov [this message]
2026-05-09 11:56 ` Vadim Akimov
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=af8g3DlQhHSME-0_@pivobook \
--to=lvd2@ziggo.nl \
--cc=ajones@ventanamicro.com \
--cc=alex@ghiti.fr \
--cc=anup@brainfault.org \
--cc=apatel@ventanamicro.com \
--cc=atish.patra@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=rafael@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.