Commit 2b125708 authored by Ya Qia's avatar Ya Qia
Browse files

fix: update set_ipi_bits missed accquire

No related merge requests found
Showing with 6 additions and 3 deletions
+6 -3
......@@ -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 ".aqrl %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));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment