Skip to content

Commit 7aa4032

Browse files
nashifmmahadevan108
authored andcommitted
Revert "arch: arm: cortex_m: restore comment lost in translation"
This reverts commit 7d76162. Signed-off-by: Anas Nashif <[email protected]>
1 parent aaeaef0 commit 7aa4032

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

arch/arm/core/cortex_m/swap.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,11 @@ uintptr_t z_arm_pendsv_c(uintptr_t exc_ret)
9696

9797
/* restore mode */
9898
IF_ENABLED(CONFIG_USERSPACE, ({
99-
CONTROL_Type ctrl = {.w = __get_CONTROL()};
100-
/* exit privileged state when returning to thread mode. */
101-
ctrl.b.nPRIV = 0;
102-
/* __set_CONTROL inserts an ISB which is may not be necessary here
103-
* (stack pointer may not be touched), but it's recommended to avoid
104-
* executing pre-fetched instructions with the previous privilege.
105-
*/
106-
__set_CONTROL(ctrl.w | current->arch.mode);
107-
}));
99+
CONTROL_Type ctrl = {.w = __get_CONTROL()};
100+
/* exit privileged state when returing to thread mode. */
101+
ctrl.b.nPRIV = 0;
102+
__set_CONTROL(ctrl.w | current->arch.mode);
103+
}));
108104

109105
return exc_ret;
110106
}

0 commit comments

Comments
 (0)