Repository navigation
sched: replace up_cpu_index with this_cpu - #13211
Conversation
bfc0321 to
b454009
Compare
anchao
left a comment
There was a problem hiding this comment.
Some changes need to be carefully reviewed. If the core id needs to be included in the hardware register calculation, up_cpu_index() should be used instead of this_cpu().
b454009 to
279eb03
Compare
7054168 to
0c061e7
Compare
Make this_cpu is arch independent and up_cpu_index do that. In AMP mode, up_cpu_index() may return the index of the physical core. Signed-off-by: fangxinyong <[email protected]>
0c061e7 to
ff85fe9
Compare
|
@fxysunshine please test in real board, passing CI is not a real test! |
Thanks for reminder. Updated the testing comment. We are testing in FC7300 board for armv7-m in AMP mode and customized up_cpu_index() to return the index of the physical core, and result is OK. |
|
CI failed
|
Summary
Make this_cpu is arch independent and up_cpu_index do that. In AMP mode, up_cpu_index() may return the index of the physical core, this_cpu() will always return 0.
In SMP mode, up_cpu_index()/this_cpu() are the same, both return the index of the physical core.
Impact
In AMP mode, carefully check risc-v/xtensa arch.
Testing
FC7300 board for armv7-m in AMP mode to customize up_cpu_index().