Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added memory barrier before thread scheduling for ARMv8-A ThreadX SMP. #280

Merged
merged 1 commit into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
/* FIFO queueing, */
/* resulting in version 6.1.11 */
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), added */
/* #include tx_user.h, */
/* #include tx_user.h, added */
/* memory barrier, */
/* resulting in version 6.x */
/* */
/**************************************************************************/
Expand Down Expand Up @@ -294,6 +295,7 @@ __tx_thread_dont_save_ts:

/* Set bit indicating this thread is ready for execution. */

DMB ISH // Ensure that accesses to shared resource have completed
MOV x2, #1 // Build ready flag
STR w2, [x0, #260] // Set thread's ready flag
DMB ISH // Ensure that accesses to shared resource have completed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
/* added ARMv8.2-A support, */
/* resulting in version 6.1.10 */
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), added */
/* #include tx_user.h, */
/* #include tx_user.h, added */
/* memory barrier, */
/* resulting in version 6.x */
/* */
/**************************************************************************/
Expand Down Expand Up @@ -173,6 +174,7 @@ __tx_thread_dont_save_ts:

/* Set ready bit in thread control block. */

DMB ISH // Ensure that accesses to shared resource have completed
MOV x3, #1 // Build ready value
STR w3, [x6, #260] // Make the thread ready
DMB ISH //
Expand Down
4 changes: 3 additions & 1 deletion ports_smp/cortex_a35_smp/ac6/src/tx_thread_context_restore.S
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
/* FIFO queueing, */
/* resulting in version 6.1.11 */
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), added */
/* #include tx_user.h, */
/* #include tx_user.h, added */
/* memory barrier, */
/* resulting in version 6.x */
/* */
/**************************************************************************/
Expand Down Expand Up @@ -294,6 +295,7 @@ __tx_thread_dont_save_ts:

/* Set bit indicating this thread is ready for execution. */

DMB ISH // Ensure that accesses to shared resource have completed
MOV x2, #1 // Build ready flag
STR w2, [x0, #260] // Set thread's ready flag
DMB ISH // Ensure that accesses to shared resource have completed
Expand Down
4 changes: 3 additions & 1 deletion ports_smp/cortex_a35_smp/ac6/src/tx_thread_system_return.S
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
/* added ARMv8.2-A support, */
/* resulting in version 6.1.10 */
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), added */
/* #include tx_user.h, */
/* #include tx_user.h, added */
/* memory barrier, */
/* resulting in version 6.x */
/* */
/**************************************************************************/
Expand Down Expand Up @@ -173,6 +174,7 @@ __tx_thread_dont_save_ts:

/* Set ready bit in thread control block. */

DMB ISH // Ensure that accesses to shared resource have completed
MOV x3, #1 // Build ready value
STR w3, [x6, #260] // Make the thread ready
DMB ISH //
Expand Down
4 changes: 3 additions & 1 deletion ports_smp/cortex_a35_smp/gnu/src/tx_thread_context_restore.S
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
/* FIFO queueing, */
/* resulting in version 6.1.11 */
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), added */
/* #include tx_user.h, */
/* #include tx_user.h, added */
/* memory barrier, */
/* resulting in version 6.x */
/* */
/**************************************************************************/
Expand Down Expand Up @@ -294,6 +295,7 @@ __tx_thread_dont_save_ts:

/* Set bit indicating this thread is ready for execution. */

DMB ISH // Ensure that accesses to shared resource have completed
MOV x2, #1 // Build ready flag
STR w2, [x0, #260] // Set thread's ready flag
DMB ISH // Ensure that accesses to shared resource have completed
Expand Down
4 changes: 3 additions & 1 deletion ports_smp/cortex_a35_smp/gnu/src/tx_thread_system_return.S
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
/* added ARMv8.2-A support, */
/* resulting in version 6.1.10 */
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), added */
/* #include tx_user.h, */
/* #include tx_user.h, added */
/* memory barrier, */
/* resulting in version 6.x */
/* */
/**************************************************************************/
Expand Down Expand Up @@ -173,6 +174,7 @@ __tx_thread_dont_save_ts:

/* Set ready bit in thread control block. */

DMB ISH // Ensure that accesses to shared resource have completed
MOV x3, #1 // Build ready value
STR w3, [x6, #260] // Make the thread ready
DMB ISH //
Expand Down
4 changes: 3 additions & 1 deletion ports_smp/cortex_a53_smp/ac6/src/tx_thread_context_restore.S
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
/* FIFO queueing, */
/* resulting in version 6.1.11 */
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), added */
/* #include tx_user.h, */
/* #include tx_user.h, added */
/* memory barrier, */
/* resulting in version 6.x */
/* */
/**************************************************************************/
Expand Down Expand Up @@ -294,6 +295,7 @@ __tx_thread_dont_save_ts:

/* Set bit indicating this thread is ready for execution. */

DMB ISH // Ensure that accesses to shared resource have completed
MOV x2, #1 // Build ready flag
STR w2, [x0, #260] // Set thread's ready flag
DMB ISH // Ensure that accesses to shared resource have completed
Expand Down
4 changes: 3 additions & 1 deletion ports_smp/cortex_a53_smp/ac6/src/tx_thread_system_return.S
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
/* added ARMv8.2-A support, */
/* resulting in version 6.1.10 */
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), added */
/* #include tx_user.h, */
/* #include tx_user.h, added */
/* memory barrier, */
/* resulting in version 6.x */
/* */
/**************************************************************************/
Expand Down Expand Up @@ -173,6 +174,7 @@ __tx_thread_dont_save_ts:

/* Set ready bit in thread control block. */

DMB ISH // Ensure that accesses to shared resource have completed
MOV x3, #1 // Build ready value
STR w3, [x6, #260] // Make the thread ready
DMB ISH //
Expand Down
4 changes: 3 additions & 1 deletion ports_smp/cortex_a53_smp/gnu/src/tx_thread_context_restore.S
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
/* FIFO queueing, */
/* resulting in version 6.1.11 */
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), added */
/* #include tx_user.h, */
/* #include tx_user.h, added */
/* memory barrier, */
/* resulting in version 6.x */
/* */
/**************************************************************************/
Expand Down Expand Up @@ -294,6 +295,7 @@ __tx_thread_dont_save_ts:

/* Set bit indicating this thread is ready for execution. */

DMB ISH // Ensure that accesses to shared resource have completed
MOV x2, #1 // Build ready flag
STR w2, [x0, #260] // Set thread's ready flag
DMB ISH // Ensure that accesses to shared resource have completed
Expand Down
4 changes: 3 additions & 1 deletion ports_smp/cortex_a53_smp/gnu/src/tx_thread_system_return.S
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
/* added ARMv8.2-A support, */
/* resulting in version 6.1.10 */
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), added */
/* #include tx_user.h, */
/* #include tx_user.h, added */
/* memory barrier, */
/* resulting in version 6.x */
/* */
/**************************************************************************/
Expand Down Expand Up @@ -173,6 +174,7 @@ __tx_thread_dont_save_ts:

/* Set ready bit in thread control block. */

DMB ISH // Ensure that accesses to shared resource have completed
MOV x3, #1 // Build ready value
STR w3, [x6, #260] // Make the thread ready
DMB ISH //
Expand Down
4 changes: 3 additions & 1 deletion ports_smp/cortex_a55_smp/ac6/src/tx_thread_context_restore.S
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
/* FIFO queueing, */
/* resulting in version 6.1.11 */
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), added */
/* #include tx_user.h, */
/* #include tx_user.h, added */
/* memory barrier, */
/* resulting in version 6.x */
/* */
/**************************************************************************/
Expand Down Expand Up @@ -294,6 +295,7 @@ __tx_thread_dont_save_ts:

/* Set bit indicating this thread is ready for execution. */

DMB ISH // Ensure that accesses to shared resource have completed
MOV x2, #1 // Build ready flag
STR w2, [x0, #260] // Set thread's ready flag
DMB ISH // Ensure that accesses to shared resource have completed
Expand Down
4 changes: 3 additions & 1 deletion ports_smp/cortex_a55_smp/ac6/src/tx_thread_system_return.S
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
/* added ARMv8.2-A support, */
/* resulting in version 6.1.10 */
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), added */
/* #include tx_user.h, */
/* #include tx_user.h, added */
/* memory barrier, */
/* resulting in version 6.x */
/* */
/**************************************************************************/
Expand Down Expand Up @@ -173,6 +174,7 @@ __tx_thread_dont_save_ts:

/* Set ready bit in thread control block. */

DMB ISH // Ensure that accesses to shared resource have completed
MOV x3, #1 // Build ready value
STR w3, [x6, #260] // Make the thread ready
DMB ISH //
Expand Down
4 changes: 3 additions & 1 deletion ports_smp/cortex_a55_smp/gnu/src/tx_thread_context_restore.S
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
/* FIFO queueing, */
/* resulting in version 6.1.11 */
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), added */
/* #include tx_user.h, */
/* #include tx_user.h, added */
/* memory barrier, */
/* resulting in version 6.x */
/* */
/**************************************************************************/
Expand Down Expand Up @@ -294,6 +295,7 @@ __tx_thread_dont_save_ts:

/* Set bit indicating this thread is ready for execution. */

DMB ISH // Ensure that accesses to shared resource have completed
MOV x2, #1 // Build ready flag
STR w2, [x0, #260] // Set thread's ready flag
DMB ISH // Ensure that accesses to shared resource have completed
Expand Down
4 changes: 3 additions & 1 deletion ports_smp/cortex_a55_smp/gnu/src/tx_thread_system_return.S
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
/* added ARMv8.2-A support, */
/* resulting in version 6.1.10 */
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), added */
/* #include tx_user.h, */
/* #include tx_user.h, added */
/* memory barrier, */
/* resulting in version 6.x */
/* */
/**************************************************************************/
Expand Down Expand Up @@ -173,6 +174,7 @@ __tx_thread_dont_save_ts:

/* Set ready bit in thread control block. */

DMB ISH // Ensure that accesses to shared resource have completed
MOV x3, #1 // Build ready value
STR w3, [x6, #260] // Make the thread ready
DMB ISH //
Expand Down
4 changes: 3 additions & 1 deletion ports_smp/cortex_a57_smp/ac6/src/tx_thread_context_restore.S
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
/* FIFO queueing, */
/* resulting in version 6.1.11 */
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), added */
/* #include tx_user.h, */
/* #include tx_user.h, added */
/* memory barrier, */
/* resulting in version 6.x */
/* */
/**************************************************************************/
Expand Down Expand Up @@ -294,6 +295,7 @@ __tx_thread_dont_save_ts:

/* Set bit indicating this thread is ready for execution. */

DMB ISH // Ensure that accesses to shared resource have completed
MOV x2, #1 // Build ready flag
STR w2, [x0, #260] // Set thread's ready flag
DMB ISH // Ensure that accesses to shared resource have completed
Expand Down
4 changes: 3 additions & 1 deletion ports_smp/cortex_a57_smp/ac6/src/tx_thread_system_return.S
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
/* added ARMv8.2-A support, */
/* resulting in version 6.1.10 */
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), added */
/* #include tx_user.h, */
/* #include tx_user.h, added */
/* memory barrier, */
/* resulting in version 6.x */
/* */
/**************************************************************************/
Expand Down Expand Up @@ -173,6 +174,7 @@ __tx_thread_dont_save_ts:

/* Set ready bit in thread control block. */

DMB ISH // Ensure that accesses to shared resource have completed
MOV x3, #1 // Build ready value
STR w3, [x6, #260] // Make the thread ready
DMB ISH //
Expand Down
4 changes: 3 additions & 1 deletion ports_smp/cortex_a57_smp/gnu/src/tx_thread_context_restore.S
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
/* FIFO queueing, */
/* resulting in version 6.1.11 */
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), added */
/* #include tx_user.h, */
/* #include tx_user.h, added */
/* memory barrier, */
/* resulting in version 6.x */
/* */
/**************************************************************************/
Expand Down Expand Up @@ -294,6 +295,7 @@ __tx_thread_dont_save_ts:

/* Set bit indicating this thread is ready for execution. */

DMB ISH // Ensure that accesses to shared resource have completed
MOV x2, #1 // Build ready flag
STR w2, [x0, #260] // Set thread's ready flag
DMB ISH // Ensure that accesses to shared resource have completed
Expand Down
Loading