From patchwork Fri Mar 6 08:44:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 243276 List-Id: U-Boot discussion From: bmeng.cn at gmail.com (Bin Meng) Date: Fri, 6 Mar 2020 00:44:17 -0800 Subject: [PATCH 2/2] riscv: Avoid calling sbi_clear_ipi() In-Reply-To: <1583484257-8493-1-git-send-email-bmeng.cn@gmail.com> References: <1583484257-8493-1-git-send-email-bmeng.cn@gmail.com> Message-ID: <1583484257-8493-2-git-send-email-bmeng.cn@gmail.com> 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 Reviewed-by: Lukas Auer --- arch/riscv/lib/sbi_ipi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 +#include #include 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; }