Skip to content

Conversation

@zhangyu-duck
Copy link

Summary
Optimize tricore arch task switching process, now most other archs have already implemented task switching optimizations, such as:

Directly using tcb->xcp.regs instead of up_current_regs to determine whether to switch tasks.

Removing interfaces like up_set_current_regs/up_current_regs.

Inlining up_switch_context, etc.

For ARM implementation references:

03af486

4972a8e

Impact
The logic during doirq.c and svcall.c for determining whether a task needs to be switched has changed;
The interrupt flag interface has changed.

Testing
Run ostest multiple times and observe whether the task switch is normal.

The main test items in ostest:
task create/exit/restart.
semaphore wait/post test
message queue test
signal process test
wdog test
...

xianglyc and others added 6 commits January 14, 2026 20:28
…he CSA.

In the exception panic process, regs needs to use a memory address, which defaults to PCXI. Here, it is uniformly saved as the actual memory address.

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
with other functionalities removed.

Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
@github-actions github-actions bot added Area: Tooling Arch: tricore Issues related to the TriCore architecture from Infineon Size: M The size of the change in this PR is medium labels Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: tricore Issues related to the TriCore architecture from Infineon Area: Tooling Size: M The size of the change in this PR is medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants