-
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/cxd56: use chip specific vectors to allow smpcall update regs #14363
Conversation
ramvectors should allso can solve the problem, but not work in my board. |
I think a similar issue would happen with rp2040 (dual Cortex-M0+), lc823450 (dual Cortex-M3) that use exception_direct. |
let's make sure problem already converged, then talk about how to update correctly. for example if always one smp call have to use exception_common, we should make it a optional as a support in arm_vectors.c. |
Cause we don't have enough environment to test the code, it leads to regression issues. As this PR said: |
@jasonbu |
let's fix other arm-m SMP chip. |
Signed-off-by: buxiasen <[email protected]>
When sig dispatch do up_schedule_sigaction, need to make a new frame to run arm_sigdeliver. But the exception_direct cannot handle xcp.regs as we are using c-function exception handler. Need to use exception_common to handle SMP call. Signed-off-by: buxiasen <[email protected]>
…ommon Signed-off-by: buxiasen <[email protected]>
…ommon Signed-off-by: buxiasen <[email protected]>
…_common Signed-off-by: buxiasen <[email protected]>
Summary
When sig dispatch do up_schedule_sigaction, need to make a new frame to run arm_sigdeliver. But the exception_direct cannot handle xcp.regs as we are using c-function exception handler.
Need to use exception_common to handle SMP call.
issue from #13606 (comment)
@masayuki2009 please review the update, and see it at your environments also work as expected.
use chip specific vector cxd56_vectors to make CXD56_IRQ_SMP_CALL not use c-call version exception handler.
Impact
can pass the self-test in Spresense CPU=3 case.
for self-test, the _vector still in .map, maybe we should add option to make unique between cxd56_vectors and _vectors.
Testing
CI-test.
./tools/configure.sh -l spresense/smp kconfig-tweak --set-val CONFIG_SMP_NCPUS 3 make -j ./tools/flash_writer.py -s -c /dev/ttyUSB0 -d -b 115200 -n nuttx.spk minicom -D /dev/ttyUSB0 -b 115200 -C log/ttysprense-$(date +"%Y-%m-%d-%H-%M-%S").log ostest