arch: arm: cortex_m: restore comment lost in translation
The comment about ISB in swap.S was lost when translation to C. Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
This commit is contained in:
parent
4101948082
commit
7d7616214b
1 changed files with 9 additions and 5 deletions
|
@ -96,11 +96,15 @@ uintptr_t z_arm_pendsv_c(uintptr_t exc_ret)
|
||||||
|
|
||||||
/* restore mode */
|
/* restore mode */
|
||||||
IF_ENABLED(CONFIG_USERSPACE, ({
|
IF_ENABLED(CONFIG_USERSPACE, ({
|
||||||
CONTROL_Type ctrl = {.w = __get_CONTROL()};
|
CONTROL_Type ctrl = {.w = __get_CONTROL()};
|
||||||
/* exit privileged state when returing to thread mode. */
|
/* exit privileged state when returning to thread mode. */
|
||||||
ctrl.b.nPRIV = 0;
|
ctrl.b.nPRIV = 0;
|
||||||
__set_CONTROL(ctrl.w | current->arch.mode);
|
/* __set_CONTROL inserts an ISB which is may not be necessary here
|
||||||
}));
|
* (stack pointer may not be touched), but it's recommended to avoid
|
||||||
|
* executing pre-fetched instructions with the previous privilege.
|
||||||
|
*/
|
||||||
|
__set_CONTROL(ctrl.w | current->arch.mode);
|
||||||
|
}));
|
||||||
|
|
||||||
return exc_ret;
|
return exc_ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue