diff mbox series

[2/2] riscv: Avoid calling sbi_clear_ipi()

Message ID 1583484257-8493-2-git-send-email-bmeng.cn@gmail.com
State Accepted
Commit f295e00c61100960182b3bbcf5d823bd51487420
Headers show
Series [1/2] riscv: Fix sbi_remote_sfence_vma{,_asid} | expand

Commit Message

Bin Meng March 6, 2020, 8:44 a.m. UTC
There is no need for S-mode U-Boot to call sbi_clear_ipi() as it
can be cleared directly from S-mode. This saves some cycles.

Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
---

 arch/riscv/lib/sbi_ipi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Lukas Auer March 11, 2020, 9:54 p.m. UTC | #1
On Fri, 2020-03-06 at 00:44 -0800, Bin Meng wrote:
> There is no need for S-mode U-Boot to call sbi_clear_ipi() as it
> can be cleared directly from S-mode. This saves some cycles.
> 
> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
> ---
> 
>  arch/riscv/lib/sbi_ipi.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Reviewed-by: Lukas Auer <lukas at auer.io>
diff mbox series

Patch

diff --git a/arch/riscv/lib/sbi_ipi.c b/arch/riscv/lib/sbi_ipi.c
index 9a698ce..abafca9 100644
--- a/arch/riscv/lib/sbi_ipi.c
+++ b/arch/riscv/lib/sbi_ipi.c
@@ -5,6 +5,7 @@ 
  */
 
 #include <common.h>
+#include <asm/encoding.h>
 #include <asm/sbi.h>
 
 int riscv_send_ipi(int hart)
@@ -19,7 +20,7 @@  int riscv_send_ipi(int hart)
 
 int riscv_clear_ipi(int hart)
 {
-	sbi_clear_ipi();
+	csr_clear(CSR_SIP, SIP_SSIP);
 
 	return 0;
 }