Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
Zephyr RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Luis Gerhorst
Zephyr RTOS
Commits
52990e84
Commit
52990e84
authored
4 years ago
by
Luis Gerhorst
Browse files
Options
Downloads
Patches
Plain Diff
fix: backport "arm: core: aarch64: save switch_handle"
https://github.com/zephyrproject-rtos/zephyr/commit/6182330fc33d713fbea30ea428e283f795882b0e
parent
6d63f1d5
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
arch/arm/core/aarch64/switch.S
+11
-10
11 additions, 10 deletions
arch/arm/core/aarch64/switch.S
with
11 additions
and
10 deletions
arch/arm/core/aarch64/switch.S
+
11
−
10
View file @
52990e84
...
...
@@ -32,18 +32,25 @@ GDATA(_kernel)
GTEXT
(
z_arm64_context_switch
)
SECTION_FUNC
(
TEXT
,
z_arm64_context_switch
)
/
*
addr
of
callee
-
saved
regs
in
thread
in
x2
*/
ldr
x
2
,
=
_thread_offset_to_callee_saved
add
x2
,
x
2
,
x
1
ldr
x
3
,
=
_thread_offset_to_callee_saved
add
x2
,
x
1
,
x
3
/
*
Save
the
current
SP
*/
mov
x
1
,
sp
mov
x
4
,
sp
stp
x19
,
x20
,
[
x2
,
___callee_saved_t_x19_x20_OFFSET
]
stp
x21
,
x22
,
[
x2
,
___callee_saved_t_x21_x22_OFFSET
]
stp
x23
,
x24
,
[
x2
,
___callee_saved_t_x23_x24_OFFSET
]
stp
x25
,
x26
,
[
x2
,
___callee_saved_t_x25_x26_OFFSET
]
stp
x27
,
x28
,
[
x2
,
___callee_saved_t_x27_x28_OFFSET
]
stp
x29
,
x1
,
[
x2
,
___callee_saved_t_x29_sp_OFFSET
]
stp
x29
,
x4
,
[
x2
,
___callee_saved_t_x29_sp_OFFSET
]
#ifdef CONFIG_SMP
/
*
save
old
thread
into
switch
handle
which
is
required
by
*
wait_for_switch
*/
str
x1
,
[
x1
,
#
___thread_t_switch_handle_OFFSET
]
#endif
#ifdef CONFIG_THREAD_LOCAL_STORAGE
/
*
Grab
the
TLS
pointer
*/
...
...
@@ -139,12 +146,6 @@ context_switch:
/
*
Get
old
thread
from
x1
*/
sub
x1
,
x1
,
___thread_t_switch_handle_OFFSET
#ifdef CONFIG_SMP
/
*
save
old
thread
into
switch
handle
which
is
required
by
*
wait_for_switch
*/
str
x1
,
[
x1
,
#
___thread_t_switch_handle_OFFSET
]
#endif
/
*
Switch
thread
*/
bl
z_arm64_context_switch
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment