public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] Support using physical addresses for RISC-V CMO
@ 2023-01-04  7:41 Icenowy Zheng
  2023-01-04  7:41 ` [RFC PATCH 1/3] riscv: errata: cmo: add CMO macro variant with both VA and PA Icenowy Zheng
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Icenowy Zheng @ 2023-01-04  7:41 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Heiko Stuebner, Guo Ren,
	Samuel Holland, Conor Dooley
  Cc: linux-riscv, linux-kernel, Icenowy Zheng

Despite the official Zicbom extension only supports virtual addresses,
some vendor-specific extensions, e.g. Xtheadcmo, supports using directly
the physical address.

This patchset tries to provide a CMO alternative macro variant that is
feed with both VA and PA (and the used one can be picked at runtime),
implement it with PA on T-Head cores, and utilize this variant for some
situations that PA is easily accessible.

Tested with an LiteX SoC with OpenC906, with LiteSDCard as root device.

This patchset is based on the fix of dcache.cva encoding, which is at [1].
Without that patch applied, this patchset won't apply cleanly.

[1] https://patchwork.kernel.org/project/linux-riscv/patch/20230103062610.69704-1-uwu@icenowy.me/

Icenowy Zheng (3):
  riscv: errata: cmo: add CMO macro variant with both VA and PA
  riscv: use VA+PA variant of CMO macros for DMA synchorization
  riscv: use VA+PA variant of CMO macros for DMA page preparation

 arch/riscv/include/asm/errata_list.h | 30 ++++++++++++++++++++++++++++
 arch/riscv/mm/dma-noncoherent.c      | 11 +++++-----
 2 files changed, 36 insertions(+), 5 deletions(-)

-- 
2.38.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-01-06  7:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-04  7:41 [RFC PATCH 0/3] Support using physical addresses for RISC-V CMO Icenowy Zheng
2023-01-04  7:41 ` [RFC PATCH 1/3] riscv: errata: cmo: add CMO macro variant with both VA and PA Icenowy Zheng
2023-01-04  8:48   ` Guo Ren
2023-01-04  7:41 ` [RFC PATCH 2/3] riscv: use VA+PA variant of CMO macros for DMA synchorization Icenowy Zheng
2023-01-04  8:50   ` Guo Ren
2023-01-04  8:59     ` Icenowy Zheng
2023-01-04  9:24       ` Guo Ren
2023-01-04  9:27         ` Icenowy Zheng
2023-01-04 12:16           ` Heiko Stübner
2023-01-06  7:38             ` Icenowy Zheng
2023-01-04  7:41 ` [RFC PATCH 3/3] riscv: use VA+PA variant of CMO macros for DMA page preparation Icenowy Zheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox