Skip to content
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

xtensa: some fixes in interrupt handler #5248

Merged
merged 5 commits into from Jan 19, 2022
Merged

Conversation

zhuyanlinzyl
Copy link
Contributor

Summary

Five patches include:

xtensa: fix svccall enter error
xtensa: add svcall handler
xtensa: move a3 save in handler instead of _xtensa_context_save
arch:xtensa_panic: use right interrupt pointer in xtensa_panic
arch:xtensa:vectors:fix bugs in a0 save

Impac

No, bug fix.

Testing

Testing on xtensa EVB borad

@acassis
Copy link
Contributor

acassis commented Jan 17, 2022

Hi @zhuyanlinzyl did you test BUILD_PROTECTED ?

@zhuyanlinzyl
Copy link
Contributor Author

zhuyanlinzyl commented Jan 18, 2022

hi, @acassis.
No, I only test BUILD_FLAT.
And also arch Xtensa do not support BULD_PROTECTED now.
All kernel and user code run in user mode.

@xiaoxiang781216
Copy link
Contributor

@acassis this PR contain the minor but critical fix we found in our product. But the key block issue is here: #5261. Let's merge this one, and focus on that?

1. error in A3 push stack
2. when interrupt stack enable, push a12 is xtensa_irq_dispatch
parameter 1, instead of sp. As sp is interrupt stack address set by
`setintstack`, not the interruptee stack address

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
svcall.c for xtensa

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
As in _xtensa_syscall_handler, a3 was save and reused before
_xtensa_context_save, a3 save in _xtensa_context_save will generate
error.

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
When enable interrupt stack, use a12 instead of sp

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
Use right EXCSAVE_X

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
call0 _xtensa_context_save /* Save full register state */

/* Dispatch the sycall as with other interrupts. */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/* Dispatch the sycall as with other interrupts. */
/* Dispatch the syscall as with other interrupts. */

@Ouss4 Ouss4 merged commit 793ec6c into apache:master Jan 19, 2022
@jerpelea jerpelea added this to To-Add in Release Notes - 10.3.0 Mar 15, 2022
@jerpelea jerpelea moved this from To-Add to Minor in Release Notes - 10.3.0 Mar 17, 2022
@jerpelea jerpelea moved this from Minor to added in Release Notes - 10.3.0 Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants