-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
arm: remove up_set_current_regs/up_current_regs #14865
base: master
Are you sure you want to change the base?
Conversation
[Experimental Bot, please feedback here] Yes, this PR appears to meet the basic NuttX requirements, although some sections could be more thoroughly filled out. Specifically:
Recommendation: Revise the PR description to address the missing information highlighted above. A more complete description will make it easier for reviewers to understand and approve the changes. |
b317c40
to
8e07294
Compare
arch/arm/src/armv7-a/arm_dataabort.c
Outdated
@@ -148,11 +148,14 @@ uint32_t *arm_dataabort(uint32_t *regs, uint32_t dfar, uint32_t dfsr) | |||
|
|||
uint32_t *arm_dataabort(uint32_t *regs, uint32_t dfar, uint32_t dfsr) | |||
{ | |||
struct tcb_s *tcb = this_task(); | |||
|
|||
/* Save the saved processor context in current_regs where it can be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the comment (current_regs is wrong). See if current_regs is mentioned elsewhere too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
reason: up_set_current_regs initially had two functions: 1: To mark the entry into an interrupt state. 2: To record the context before an interrupt/exception. If we switch to a new task, we need to store the upcoming context regs by calling up_set_current_regs(regs). Currently, we record the context in other ways, so the second function is obsolete. Therefore, we need to rename up_set_current_regs to better reflect its actual meaning, which is solely to mark an interrupt. Signed-off-by: hujun5 <[email protected]>
Summary
remove up_set_current_regs/up_current_regs
reason:
up_set_current_regs initially had two functions:
1: To mark the entry into an interrupt state.
2: To record the context before an interrupt/exception. If we switch to
a new task, we need to store the upcoming context regs by calling up_set_current_regs(regs).
Currently, we record the context in other ways, so the second function is obsolete. Therefore, we need to rename up_set_current_regs to better reflect its actual meaning, which is solely to mark an interrupt.
Impact
arm arch
Testing
ostest
qemu
qemu-armv7a:smp
mps2-an500:nsh