[RFC PATCH 1/2] lib: reset: thead: Remove unnecessary fence operations
guoren at kernel.org
guoren at kernel.org
Tue May 23 02:46:48 PDT 2023
From: Guo Ren <guoren at linux.alibaba.com>
There are no load/store operations to fence at the reset point.
Signed-off-by: Guo Ren <guoren at linux.alibaba.com>
Signed-off-by: Guo Ren <guoren at kernel.org>
---
lib/utils/reset/fdt_reset_thead.c | 1 -
lib/utils/reset/fdt_reset_thead_asm.S | 2 --
2 files changed, 3 deletions(-)
diff --git a/lib/utils/reset/fdt_reset_thead.c b/lib/utils/reset/fdt_reset_thead.c
index e1d6885debae..ff7d2981b42f 100644
--- a/lib/utils/reset/fdt_reset_thead.c
+++ b/lib/utils/reset/fdt_reset_thead.c
@@ -27,7 +27,6 @@ static void clone_csrs(int cnt)
/* Mask csr BIT[31 - 20] */
*(u32 *)&__fdt_reset_thead_csrr &= BIT(20) - 1;
- smp_mb();
/* Write csr BIT[31 - 20] to __fdt_reset_thead_csrr */
*(u32 *)&__fdt_reset_thead_csrr |= custom_csr[i].index << 20;
diff --git a/lib/utils/reset/fdt_reset_thead_asm.S b/lib/utils/reset/fdt_reset_thead_asm.S
index 8237951fd82d..650f8585cdd2 100644
--- a/lib/utils/reset/fdt_reset_thead_asm.S
+++ b/lib/utils/reset/fdt_reset_thead_asm.S
@@ -27,7 +27,6 @@ __thead_pre_start_warm:
*/
li t1, 0x70013
csrw 0x7c2, t1
- fence rw,rw
lla t1, custom_csr
@@ -43,5 +42,4 @@ __reset_thead_csr_stub:
*/
li t1, 0x70013
csrw 0x7c2, t1
- fence rw,rw
j _start_warm
--
2.36.1
More information about the opensbi
mailing list