Re: [PATCH v5 4/6] riscv: mm: dma-noncoherent: Pass direction and operation to ALT_CMO_OP()

From
Lad, Prabhakar <prabhakar.csengg@gmail.com>
Date
2022-12-13 17:58:08
Also in
linux-renesas-soc, linux-riscv, lkml
Reply to
Geert Uytterhoeven, 2022-12-13
Hi Geert,

On Tue, Dec 13, 2022 at 5:15 PM Geert Uytterhoeven [off-list ref] wrote:
Hi Prabhakar,

On Mon, Dec 12, 2022 at 12:55 PM Prabhakar [off-list ref] wrote:
quoted
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Pass direction and operation to ALT_CMO_OP() macro.

Vendors might want to perform different operations based on the direction
and callbacks (arch_sync_dma_for_device/arch_sync_dma_for_cpu/
arch_dma_prep_coherent) so to handle such cases pass the direction and
operation to ALT_CMO_OP() macro. This is in preparation for adding errata
for the Andes CPU core.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Thanks for your patch!
quoted
--- a/arch/riscv/include/asm/errata_list.h
+++ b/arch/riscv/include/asm/errata_list.h
@@ -124,7 +124,7 @@ asm volatile(ALTERNATIVE(                                           \
 #define THEAD_flush_A0 ".long 0x0275000b"
 #define THEAD_SYNC_S   ".long 0x0190000b"

-#define ALT_CMO_OP(_op, _start, _size, _cachesize)                     \
+#define ALT_CMO_OP(_op, _start, _size, _cachesize, _dir, _ops)         \
Since commit a49ab905a1fc8630 ("RISC-V: Implement arch specific PMEM
APIs") in riscv/for-next, there are two new users of this macro,
which need to be updated to (add two zeroes?).
Thanks for pointing that out, I'll rebase on for-next. I think -1
would be a better option than zeros.

Cheers,
Prabhakar
Thread (37 messages) 37 messages, 10 authors, last reply 2022-12-28
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help