From 7c9540ea1d46a776ec92b58f99074f51b430f9bb Mon Sep 17 00:00:00 2001 From: Xiang Wang Date: Thu, 11 Oct 2018 17:30:37 +0800 Subject: riscv: add support smp_pause / smp_resume MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://doc.coreboot.org/arch/riscv/ we know that we need to execute smp_pause at the start of each stage and smp_resume at the end of each stage. Change-Id: I6f8159637bfb15f54f0abeb335de2ba6e9cf82fb Signed-off-by: Xiang Wang Reviewed-on: https://review.coreboot.org/29023 Tested-by: build bot (Jenkins) Reviewed-by: Jonathan Neuschäfer Reviewed-by: Philipp Hug --- src/soc/sifive/fu540/clint.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/soc/sifive/fu540/clint.c') diff --git a/src/soc/sifive/fu540/clint.c b/src/soc/sifive/fu540/clint.c index 00aec1ab37..fb4b97fbb3 100644 --- a/src/soc/sifive/fu540/clint.c +++ b/src/soc/sifive/fu540/clint.c @@ -14,9 +14,9 @@ */ #include +#include #include #include -#include void mtime_init(void) { @@ -27,6 +27,5 @@ void mtime_init(void) void set_msip(int hartid, int val) { - long hart_id = read_csr(mhartid); - write32((void *)(FU540_CLINT + 4 * hart_id), !!val); + write32((void *)(FU540_CLINT + 4 * (uintptr_t)hartid), !!val); } -- cgit v1.2.3