Interrupt restore behavior on task activate

2020-06-21 Thread Brennan Ashton
I'm bringing up support for a new RISC-V core but I'm running into some issues around the sys tick. My tick timer interrupt is disabled at activating a task, clearly this is not correct. This is code used across all architectures so I'm sure I just do not understand something void nxtask_activat

Re: Interrupt restore behavior on task activate

2020-06-21 Thread Gregory Nutt
I'm bringing up support for a new RISC-V core but I'm running into some issues around the sys tick. My tick timer interrupt is disabled at activating a task, clearly this is not correct. This is code used across all architectures so I'm sure I just do not understand something void nxtask_act

Re: Interrupt restore behavior on task activate

2020-06-21 Thread Brennan Ashton
On Sun, Jun 21, 2020, 11:46 AM Gregory Nutt wrote: > > > I'm bringing up support for a new RISC-V core but I'm running into some > > issues around the sys tick. > > > > My tick timer interrupt is disabled at activating a task, clearly this is > > not correct. This is code used across all archite

Re: Interrupt restore behavior on task activate

2020-06-21 Thread Gregory Nutt
On 6/21/2020 12:54 PM, Brennan Ashton wrote: On Sun, Jun 21, 2020, 11:46 AM Gregory Nutt wrote: I'm bringing up support for a new RISC-V core but I'm running into some issues around the sys tick. My tick timer interrupt is disabled at activating a task, clearly this is not correct. This is c

Re: Interrupt restore behavior on task activate

2020-06-21 Thread Brennan Ashton
> The interrupts interrupts should be restore when the new context is > instantiated in up_unblock_task(). There is no call to irq_restore(). > I don't use RISC-V, but I can show you for ARMv7-M: > > arch/arm/src/armv7-m/arm_unblocktask.c > > 103 /* Then switch contexts */ > 104 > 105

Re: Interrupt restore behavior on task activate

2020-06-21 Thread Ishikawa, Masayuki (SHES)
Subject: Interrupt restore behavior on task activate I'm bringing up support for a new RISC-V core but I'm running into some issues around the sys tick. My tick timer interrupt is disabled at activating a task, clearly this is not correct. This is code used across all architectures so I

Re: Interrupt restore behavior on task activate

2020-06-22 Thread Brennan Ashton
On Sun, Jun 21, 2020 at 11:51 PM Ishikawa, Masayuki (SHES) wrote: > > Hi, Brennan, > > Did you check up_get_newintctx() ? > > The function is called from up_initial_state() to create a new task > and needs to return (MSTATUS_MPPM | MSTATUS_MPIE). Yeah I had that already setup and I could not figu