-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: riscv: Ensure XSTATUS is restored before XIE
In previous implementation, we found some accidental interrupts during entering user mode and resuming of thread. We fixed it by clearing XSTATUS.XIE first, which is global interrupt enable bit, to ensure there are no interrupts during those operations. Now we found the better solution: restore XSTATUS before restoring XIE. This can ensure the global interrupt bit in XSTATUS is cleared before we restore the individual interrupt bits in XIE. Signed-off-by: Alvin Chang <[email protected]> Reviewed-by: Yu Chien Peter Lin <[email protected]>
- Loading branch information
1 parent
00b4546
commit 9f71579
Showing
1 changed file
with
24 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters