Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
educg-net-22022-2210132
proj322-SMP-2602
Commits
2b125708
Commit
2b125708
authored
11 months ago
by
Ya Qia
Browse files
Options
Download
Patches
Plain Diff
fix: update set_ipi_bits missed accquire
parent
9421335d
master
dev
new_test
remove_readytorun
sched_condition
test
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arch/risc-v/src/common/riscv_ipi.h
+6
-3
arch/risc-v/src/common/riscv_ipi.h
with
6 additions
and
3 deletions
+6
-3
arch/risc-v/src/common/riscv_ipi.h
+
6
−
3
View file @
2b125708
...
...
@@ -65,7 +65,10 @@ static inline unsigned long get_ipi_bits(const volatile unsigned long *pending_i
{
unsigned
long
ipi_bits
;
asm
volatile
(
_AMOSWAP
".aqrl %0, %1, (%2)"
:
"=r"
(
ipi_bits
)
:
"rm"
(
*
pending_ipis_bits
),
"rm"
(
pending_ipis_bits
));
asm
volatile
(
_AMOSWAP
".aqrl %0, %1, (%2)"
:
"=r"
(
ipi_bits
)
:
"rm"
(
*
pending_ipis_bits
),
"rm"
(
pending_ipis_bits
));
return
ipi_bits
;
}
...
...
@@ -83,7 +86,7 @@ static inline void set_ipi_bits(volatile unsigned long *pending_ipis_bits, unsig
/* the "critical section" will only have 1 atomic instructions, no need for spin lock */
asm
volatile
(
_AMOOR
".rl %0, %1, (%2)"
_AMOOR
".
aq
rl %0, %1, (%2)"
:
"=r"
(
old_bits
)
:
"r"
(
ipi_bits
),
"rm"
(
pending_ipis_bits
));
}
...
...
@@ -118,7 +121,7 @@ static inline void clear_ipi_bits(volatile unsigned long *pending_ipis_bits, uns
ipi_bits
=
~
ipi_bits
;
unsigned
long
old_bits
;
asm
volatile
(
_AMOAND
".aqrl %0, %1, (%2)"
_AMOAND
".aqrl %0, %1, (%2)"
:
"=r"
(
old_bits
)
:
"r"
(
ipi_bits
),
"rm"
(
pending_ipis_bits
));
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets