summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2020-03-06 00:44:17 -0800
committerAndes <uboot@andestech.com>2020-03-17 11:29:40 +0800
commitf295e00c61100960182b3bbcf5d823bd51487420 (patch)
treed943561892face9246b66ce1e223ad6fa981c97c
parentfe13692e23b3786d4de060a98c65c922385d6c70 (diff)
riscv: Avoid calling sbi_clear_ipi()
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@gmail.com> Reviewed-by: Lukas Auer <lukas@auer.io>
-rw-r--r--arch/riscv/lib/sbi_ipi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/riscv/lib/sbi_ipi.c b/arch/riscv/lib/sbi_ipi.c
index 9a698ce74e..abafca9e5c 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;
}