arch/misoc: Remove unneeded group_addrenv call which handled by [lm32|minerva]_doirq

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-04-17 22:46:22 +08:00 committed by Petro Karashchenko
parent 9fad9ed66b
commit ef62e1c970
12 changed files with 0 additions and 148 deletions

View File

@ -136,15 +136,6 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
struct tcb_s *nexttcb = this_task();
#ifdef CONFIG_ARCH_ADDRENV
/* Make sure that the address environment for the previously
* running task is closed down gracefully (data caches dump,
* MMU flushed) and set up the address environment for the new
* thread at the head of the ready-to-run list.
*/
group_addrenv(nexttcb);
#endif
/* Reset scheduler parameters */
nxsched_resume_scheduler(nexttcb);

View File

@ -127,16 +127,6 @@ void up_exit(int status)
nxsched_resume_scheduler(tcb);
#ifdef CONFIG_ARCH_ADDRENV
/* Make sure that the address environment for the previously running
* task is closed down gracefully (data caches dump, MMU flushed) and
* set up the address environment for the new thread at the head of
* the ready-to-run list.
*/
group_addrenv(tcb);
#endif
/* Then switch contexts */
up_fullcontextrestore(tcb->xcp.regs);

View File

@ -105,15 +105,6 @@ void up_release_pending(void)
struct tcb_s *nexttcb = this_task();
#ifdef CONFIG_ARCH_ADDRENV
/* Make sure that the address environment for the previously
* running task is closed down gracefully (data caches dump,
* MMU flushed) and set up the address environment for the new
* thread at the head of the ready-to-run list.
*/
group_addrenv(nexttcb);
#endif
/* Update scheduler parameters */
nxsched_resume_scheduler(nexttcb);

View File

@ -159,15 +159,6 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
struct tcb_s *nexttcb = this_task();
#ifdef CONFIG_ARCH_ADDRENV
/* Make sure that the address environment for the previously
* running task is closed down gracefully (data caches dump,
* MMU flushed) and set up the address environment for the new
* thread at the head of the ready-to-run list.
*/
group_addrenv(nexttcb);
#endif
/* Update scheduler parameters */
nxsched_resume_scheduler(nexttcb);

View File

@ -296,33 +296,5 @@ int lm32_swint(int irq, void *context, void *arg)
}
#endif
#if defined(CONFIG_ARCH_FPU) || defined(CONFIG_ARCH_ADDRENV)
/* Check for a context switch. If a context switch occurred, then
* g_current_regs will have a different value than it did on entry. If an
* interrupt level context switch has occurred, then restore the floating
* point state and the establish the correct address environment before
* returning from the interrupt.
*/
if (regs != g_current_regs)
{
#ifdef CONFIG_ARCH_FPU
/* Restore floating point registers */
up_restorefpu((uint32_t *)g_current_regs);
#endif
#ifdef CONFIG_ARCH_ADDRENV
/* Make sure that the address environment for the previously
* running task is closed down gracefully (data caches dump,
* MMU flushed) and set up the address environment for the new
* thread at the head of the ready-to-run list.
*/
group_addrenv(NULL);
#endif
}
#endif
return OK;
}

View File

@ -122,15 +122,6 @@ void up_unblock_task(struct tcb_s *tcb)
struct tcb_s *nexttcb = this_task();
#ifdef CONFIG_ARCH_ADDRENV
/* Make sure that the address environment for the previously
* running task is closed down gracefully (data caches dump,
* MMU flushed) and set up the address environment for the new
* thread at the head of the ready-to-run list.
*/
group_addrenv(nexttcb);
#endif
/* Update scheduler parameters */
nxsched_resume_scheduler(nexttcb);

View File

@ -136,15 +136,6 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
struct tcb_s *nexttcb = this_task();
#ifdef CONFIG_ARCH_ADDRENV
/* Make sure that the address environment for the previously
* running task is closed down gracefully (data caches dump, MMU
* flushed) and set up the address environment for the new thread
* at the head of the ready-to-run list.
*/
group_addrenv(nexttcb);
#endif
/* Reset scheduler parameters */
nxsched_resume_scheduler(nexttcb);

View File

@ -127,16 +127,6 @@ void up_exit(int status)
nxsched_resume_scheduler(tcb);
#ifdef CONFIG_ARCH_ADDRENV
/* Make sure that the address environment for the previously running task
* is closed down gracefully (data caches dump, MMU flushed) and set up the
* address environment for the new thread at the head of the ready-to-run
* list.
*/
group_addrenv(tcb);
#endif
/* Then switch contexts */
up_fullcontextrestore(tcb->xcp.regs);

View File

@ -105,15 +105,6 @@ void up_release_pending(void)
struct tcb_s *nexttcb = this_task();
#ifdef CONFIG_ARCH_ADDRENV
/* Make sure that the address environment for the previously
* running task is closed down gracefully (data caches dump, MMU
* flushed) and set up the address environment for the new thread
* at the head of the ready-to-run list.
*/
group_addrenv(nexttcb);
#endif
/* Update scheduler parameters */
nxsched_resume_scheduler(nexttcb);

View File

@ -158,15 +158,6 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
struct tcb_s *nexttcb = this_task();
#ifdef CONFIG_ARCH_ADDRENV
/* Make sure that the address environment for the previously
* running task is closed down gracefully (data caches dump,
* MMU flushed) and set up the address environment for the
* new thread at the head of the ready-to-run list.
*/
group_addrenv(nexttcb);
#endif
/* Update scheduler parameters */
nxsched_resume_scheduler(nexttcb);

View File

@ -273,33 +273,5 @@ int minerva_swint(int irq, void *context, void *arg)
}
#endif
#if defined(CONFIG_ARCH_FPU) || defined(CONFIG_ARCH_ADDRENV)
/* Check for a context switch. If a context switch occurred, then
* g_current_regs will have a different value than it did on entry. If an
* interrupt level context switch has occurred, then restore the floating
* point state and the establish the correct address environment before
* returning from the interrupt.
*/
if (regs != g_current_regs)
{
#ifdef CONFIG_ARCH_FPU
/* Restore floating point registers */
up_restorefpu((uint32_t *) g_current_regs);
#endif
#ifdef CONFIG_ARCH_ADDRENV
/* Make sure that the address environment for the previously running
* task is closed down gracefully (data caches dump, MMU flushed) and
* set up the address environment for the new thread at the head of
* the ready-to-run list.
*/
group_addrenv(NULL);
#endif
}
#endif
return OK;
}

View File

@ -122,15 +122,6 @@ void up_unblock_task(struct tcb_s *tcb)
struct tcb_s *nexttcb = this_task();
#ifdef CONFIG_ARCH_ADDRENV
/* Make sure that the address environment for the previously
* running task is closed down gracefully (data caches dump, MMU
* flushed) and set up the address environment for the new thread
* at the head of the ready-to-run list.
*/
group_addrenv(nexttcb);
#endif
/* Update scheduler parameters */
nxsched_resume_scheduler(nexttcb);