diff --git a/arch/misoc/src/lm32/lm32_blocktask.c b/arch/misoc/src/lm32/lm32_blocktask.c index 97f3d5a4ff0..9bed1c02012 100644 --- a/arch/misoc/src/lm32/lm32_blocktask.c +++ b/arch/misoc/src/lm32/lm32_blocktask.c @@ -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); diff --git a/arch/misoc/src/lm32/lm32_exit.c b/arch/misoc/src/lm32/lm32_exit.c index 8bbcb4addb6..08ff71cfb5e 100644 --- a/arch/misoc/src/lm32/lm32_exit.c +++ b/arch/misoc/src/lm32/lm32_exit.c @@ -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); diff --git a/arch/misoc/src/lm32/lm32_releasepending.c b/arch/misoc/src/lm32/lm32_releasepending.c index f36f46ab58f..75f88a0bfe7 100644 --- a/arch/misoc/src/lm32/lm32_releasepending.c +++ b/arch/misoc/src/lm32/lm32_releasepending.c @@ -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); diff --git a/arch/misoc/src/lm32/lm32_reprioritizertr.c b/arch/misoc/src/lm32/lm32_reprioritizertr.c index 5203abe962c..97a2568b8af 100644 --- a/arch/misoc/src/lm32/lm32_reprioritizertr.c +++ b/arch/misoc/src/lm32/lm32_reprioritizertr.c @@ -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); diff --git a/arch/misoc/src/lm32/lm32_swint.c b/arch/misoc/src/lm32/lm32_swint.c index 3c0b4030487..b54336eb006 100644 --- a/arch/misoc/src/lm32/lm32_swint.c +++ b/arch/misoc/src/lm32/lm32_swint.c @@ -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; } diff --git a/arch/misoc/src/lm32/lm32_unblocktask.c b/arch/misoc/src/lm32/lm32_unblocktask.c index bdd6ade3bdd..4a6e69decb9 100644 --- a/arch/misoc/src/lm32/lm32_unblocktask.c +++ b/arch/misoc/src/lm32/lm32_unblocktask.c @@ -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); diff --git a/arch/misoc/src/minerva/minerva_blocktask.c b/arch/misoc/src/minerva/minerva_blocktask.c index 8390b00c2bf..6c6349af405 100644 --- a/arch/misoc/src/minerva/minerva_blocktask.c +++ b/arch/misoc/src/minerva/minerva_blocktask.c @@ -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); diff --git a/arch/misoc/src/minerva/minerva_exit.c b/arch/misoc/src/minerva/minerva_exit.c index 4e8b1f3ad75..90fd7c61c43 100644 --- a/arch/misoc/src/minerva/minerva_exit.c +++ b/arch/misoc/src/minerva/minerva_exit.c @@ -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); diff --git a/arch/misoc/src/minerva/minerva_releasepending.c b/arch/misoc/src/minerva/minerva_releasepending.c index 5623831c918..56c1441a80c 100644 --- a/arch/misoc/src/minerva/minerva_releasepending.c +++ b/arch/misoc/src/minerva/minerva_releasepending.c @@ -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); diff --git a/arch/misoc/src/minerva/minerva_reprioritizertr.c b/arch/misoc/src/minerva/minerva_reprioritizertr.c index fcd1b0d3ab1..00edf654194 100644 --- a/arch/misoc/src/minerva/minerva_reprioritizertr.c +++ b/arch/misoc/src/minerva/minerva_reprioritizertr.c @@ -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); diff --git a/arch/misoc/src/minerva/minerva_swint.c b/arch/misoc/src/minerva/minerva_swint.c index af82f30d603..4b4b2f07114 100644 --- a/arch/misoc/src/minerva/minerva_swint.c +++ b/arch/misoc/src/minerva/minerva_swint.c @@ -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; } diff --git a/arch/misoc/src/minerva/minerva_unblocktask.c b/arch/misoc/src/minerva/minerva_unblocktask.c index 44916489c68..69c4e0a340d 100644 --- a/arch/misoc/src/minerva/minerva_unblocktask.c +++ b/arch/misoc/src/minerva/minerva_unblocktask.c @@ -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);