-
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
backtrace: use CURRENT_REGS when in interrupt context #8192
Merged
Conversation
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
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
@zyfeier Can you add some background here explaining why and the value of the change? |
@zyfeier - That make sense. Thank you. |
@zyfeier is this patch ready for review? |
xiaoxiang781216
requested review from
davids5,
pkarashchenko and
masayuki2009
January 29, 2023 09:47
xiaoxiang781216
approved these changes
Jan 29, 2023
davids5
approved these changes
Jan 29, 2023
anchao
added a commit
to anchao/nuttx
that referenced
this pull request
Oct 25, 2024
modify the prototype of up_putc(): remove the return value The architecture code does not care about the return value of up_putc(), so removing it saves two statements: Before: After: de4c: e52de004 push {lr} @ (str lr, [sp, #-4]!) | de4c: e52de004 push {lr} @ (str lr, [sp, #-4]!) de50: e24dd014 sub sp, sp, apache#20 | de50: e24dd014 sub sp, sp, apache#20 de54: e58d0004 str r0, [sp, #4] | de54: e58d0004 str r0, [sp, #4] de58: e30030f8 movw r3, apache#248 @ 0xf8 | de58: e30030f8 movw r3, apache#248 @ 0xf8 de5c: e3423000 movt r3, apache#8192 @ 0x2000 | de5c: e3423000 movt r3, apache#8192 @ 0x2000 de60: e58d300c str r3, [sp, apache#12] | de60: e58d300c str r3, [sp, apache#12] de64: e59d1004 ldr r1, [sp, #4] | de64: e59d1004 ldr r1, [sp, #4] de68: e59d000c ldr r0, [sp, apache#12] | de68: e59d000c ldr r0, [sp, apache#12] de6c: ebfffe66 bl d80c <pl011_putc> | de6c: ebfffe66 bl d80c <pl011_putc> de70: e59d3004 ldr r3, [sp, #4] | de70: e28dd014 add sp, sp, apache#20 de74: e1a0000 mov r0, r3 | de74: e49df004 pop {pc} @ (ldr pc, [sp], #4) de78: e28dd014 add sp, sp, apache#20 | de7c: e49df004 pop {pc} @ (ldr pc, [sp], #4) | Signed-off-by: chao an <anchao@lixiang.com>
anchao
added a commit
to anchao/nuttx
that referenced
this pull request
Oct 25, 2024
modify the prototype of up_putc(): remove the return value The architecture code does not care about the return value of up_putc(), so removing it saves two statements: Before: After: de4c: e52de004 push {lr} @ (str lr, [sp, #-4]!) | de4c: e52de004 push {lr} @ (str lr, [sp, #-4]!) de50: e24dd014 sub sp, sp, apache#20 | de50: e24dd014 sub sp, sp, apache#20 de54: e58d0004 str r0, [sp, #4] | de54: e58d0004 str r0, [sp, #4] de58: e30030f8 movw r3, apache#248 @ 0xf8 | de58: e30030f8 movw r3, apache#248 @ 0xf8 de5c: e3423000 movt r3, apache#8192 @ 0x2000 | de5c: e3423000 movt r3, apache#8192 @ 0x2000 de60: e58d300c str r3, [sp, apache#12] | de60: e58d300c str r3, [sp, apache#12] de64: e59d1004 ldr r1, [sp, #4] | de64: e59d1004 ldr r1, [sp, #4] de68: e59d000c ldr r0, [sp, apache#12] | de68: e59d000c ldr r0, [sp, apache#12] de6c: ebfffe66 bl d80c <pl011_putc> | de6c: ebfffe66 bl d80c <pl011_putc> de70: e59d3004 ldr r3, [sp, #4] | de70: e28dd014 add sp, sp, apache#20 de74: e1a0000 mov r0, r3 | de74: e49df004 pop {pc} @ (ldr pc, [sp], #4) de78: e28dd014 add sp, sp, apache#20 | de7c: e49df004 pop {pc} @ (ldr pc, [sp], #4) | Signed-off-by: chao an <anchao@lixiang.com>
anchao
added a commit
to anchao/nuttx
that referenced
this pull request
Oct 26, 2024
modify the prototype of up_putc(): remove the return value The architecture code does not care about the return value of up_putc(), so removing it saves two statements: Before: After: de4c: e52de004 push {lr} @ (str lr, [sp, #-4]!) | de4c: e52de004 push {lr} @ (str lr, [sp, #-4]!) de50: e24dd014 sub sp, sp, apache#20 | de50: e24dd014 sub sp, sp, apache#20 de54: e58d0004 str r0, [sp, #4] | de54: e58d0004 str r0, [sp, #4] de58: e30030f8 movw r3, apache#248 @ 0xf8 | de58: e30030f8 movw r3, apache#248 @ 0xf8 de5c: e3423000 movt r3, apache#8192 @ 0x2000 | de5c: e3423000 movt r3, apache#8192 @ 0x2000 de60: e58d300c str r3, [sp, apache#12] | de60: e58d300c str r3, [sp, apache#12] de64: e59d1004 ldr r1, [sp, #4] | de64: e59d1004 ldr r1, [sp, #4] de68: e59d000c ldr r0, [sp, apache#12] | de68: e59d000c ldr r0, [sp, apache#12] de6c: ebfffe66 bl d80c <pl011_putc> | de6c: ebfffe66 bl d80c <pl011_putc> de70: e59d3004 ldr r3, [sp, #4] | de70: e28dd014 add sp, sp, apache#20 de74: e1a0000 mov r0, r3 | de74: e49df004 pop {pc} @ (ldr pc, [sp], #4) de78: e28dd014 add sp, sp, apache#20 | de7c: e49df004 pop {pc} @ (ldr pc, [sp], #4) | Signed-off-by: chao an <anchao@lixiang.com>
xiaoxiang781216
pushed a commit
that referenced
this pull request
Oct 26, 2024
modify the prototype of up_putc(): remove the return value The architecture code does not care about the return value of up_putc(), so removing it saves two statements: Before: After: de4c: e52de004 push {lr} @ (str lr, [sp, #-4]!) | de4c: e52de004 push {lr} @ (str lr, [sp, #-4]!) de50: e24dd014 sub sp, sp, #20 | de50: e24dd014 sub sp, sp, #20 de54: e58d0004 str r0, [sp, #4] | de54: e58d0004 str r0, [sp, #4] de58: e30030f8 movw r3, #248 @ 0xf8 | de58: e30030f8 movw r3, #248 @ 0xf8 de5c: e3423000 movt r3, #8192 @ 0x2000 | de5c: e3423000 movt r3, #8192 @ 0x2000 de60: e58d300c str r3, [sp, #12] | de60: e58d300c str r3, [sp, #12] de64: e59d1004 ldr r1, [sp, #4] | de64: e59d1004 ldr r1, [sp, #4] de68: e59d000c ldr r0, [sp, #12] | de68: e59d000c ldr r0, [sp, #12] de6c: ebfffe66 bl d80c <pl011_putc> | de6c: ebfffe66 bl d80c <pl011_putc> de70: e59d3004 ldr r3, [sp, #4] | de70: e28dd014 add sp, sp, #20 de74: e1a0000 mov r0, r3 | de74: e49df004 pop {pc} @ (ldr pc, [sp], #4) de78: e28dd014 add sp, sp, #20 | de7c: e49df004 pop {pc} @ (ldr pc, [sp], #4) | Signed-off-by: chao an <anchao@lixiang.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Backtrace CURRENT_REGS when in interrupt context.
Because when panic occurs in the interrupt context, xcp.regs for the running task is not updated, so need use CURRENT_REGS
Impact
NA
Testing
BES2003