From 8ff2222893d7a3d822131a5191e0b483bf56c610 Mon Sep 17 00:00:00 2001 From: Zong Li Date: Tue, 10 Apr 2018 11:37:14 +0800 Subject: Fix the wrong access of ipi pending address (#99) The MENTRY_IPI_PENDING_OFFSET offset is based on stack pointer --- machine/mentry.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/machine/mentry.S b/machine/mentry.S index 3dcf2b6..6746f98 100644 --- a/machine/mentry.S +++ b/machine/mentry.S @@ -76,8 +76,8 @@ trap_vector: addi a0, sp, MENTRY_IPI_PENDING_OFFSET amoswap.w a0, x0, (a0) #else - lw a0, MENTRY_IPI_PENDING_OFFSET(a0) - sw x0, MENTRY_IPI_PENDING_OFFSET(a0) + lw a0, MENTRY_IPI_PENDING_OFFSET(sp) + sw x0, MENTRY_IPI_PENDING_OFFSET(sp) #endif and a1, a0, IPI_SOFT beqz a1, 1f -- cgit v1.1