From 4289b09a33deaf914a2edd580784d8b5fbf5f0ef Mon Sep 17 00:00:00 2001 From: Koen Zandberg Date: Thu, 27 Aug 2020 00:43:42 +0200 Subject: [PATCH] fe310: Skip most context save on null thread --- cpu/fe310/irq_arch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cpu/fe310/irq_arch.c b/cpu/fe310/irq_arch.c index f6ca276fa5..0245588bb0 100644 --- a/cpu/fe310/irq_arch.c +++ b/cpu/fe310/irq_arch.c @@ -218,8 +218,7 @@ static void __attribute((aligned(4))) __attribute__((interrupt)) trap_entry(void "csrr s2, mepc \n" /* Save return PC in stack frame */ "sw s2, "XTSTR(pc_OFFSET)"(sp) \n" - /* Skips the stack pointer save if no active thread */ - "beqz s1, null_thread \n" + /* Save stack pointer of current thread */ "sw sp, "XTSTR(SP_OFFSET_IN_THREAD)"(s1) \n"