2023-05-26 17:16:54

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH 3/6] riscv: mm: mark noncoherent_supported as __ro_after_init

The noncoherent_supported indicates whether the HW is coherent or not,
it won't change after booting, mark it as __ro_after_init.

Signed-off-by: Jisheng Zhang <[email protected]>
---
arch/riscv/mm/dma-noncoherent.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/mm/dma-noncoherent.c b/arch/riscv/mm/dma-noncoherent.c
index d919efab6eba..d51a75864e53 100644
--- a/arch/riscv/mm/dma-noncoherent.c
+++ b/arch/riscv/mm/dma-noncoherent.c
@@ -10,7 +10,7 @@
#include <linux/mm.h>
#include <asm/cacheflush.h>

-static bool noncoherent_supported;
+static bool noncoherent_supported __ro_after_init;

void arch_sync_dma_for_device(phys_addr_t paddr, size_t size,
enum dma_data_direction dir)
--
2.40.1



2023-05-29 11:13:35

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH 3/6] riscv: mm: mark noncoherent_supported as __ro_after_init

On Sat, May 27, 2023 at 12:59:55AM +0800, Jisheng Zhang wrote:
> The noncoherent_supported indicates whether the HW is coherent or not,
> it won't change after booting, mark it as __ro_after_init.
>
> Signed-off-by: Jisheng Zhang <[email protected]>

Reviewed-by: Conor Dooley <[email protected]>

Thanks,
Conor.


Attachments:
(No filename) (334.00 B)
signature.asc (235.00 B)
Download all attachments