Searched hist:c0018913b4e1139ffa575488a58530614ff490d1 (Results 1 – 2 of 2) sorted by relevance
| /rk3399_ARM-atf/lib/locks/bakery/ |
| H A D | bakery_lock_coherent.c | c0018913b4e1139ffa575488a58530614ff490d1 Sun Jan 26 03:20:45 UTC 2020 Raghu Krishnamurthy <raghu.ncstate@icloud.com> T589: Fix insufficient ordering guarantees in bakery lock
bakery_lock_get() uses DMB LD after lock acquisition and bakery_lock_release() uses DMB ST before releasing the lock. This is insufficient in both cases. With just DMB LD, stores in the critical section can be reordered before the DMB LD which could mean writes in the critical section completing before the lock has been acquired successfully. Similarly, with just DMB ST, a load in the critical section could be reordered after the the DMB ST. DMB is the least expensive barrier that can provide the required ordering.
Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@icloud.com> Change-Id: Ieb74cbf5b76b09e1789331b71f37f7c660221b0e
|
| H A D | bakery_lock_normal.c | c0018913b4e1139ffa575488a58530614ff490d1 Sun Jan 26 03:20:45 UTC 2020 Raghu Krishnamurthy <raghu.ncstate@icloud.com> T589: Fix insufficient ordering guarantees in bakery lock
bakery_lock_get() uses DMB LD after lock acquisition and bakery_lock_release() uses DMB ST before releasing the lock. This is insufficient in both cases. With just DMB LD, stores in the critical section can be reordered before the DMB LD which could mean writes in the critical section completing before the lock has been acquired successfully. Similarly, with just DMB ST, a load in the critical section could be reordered after the the DMB ST. DMB is the least expensive barrier that can provide the required ordering.
Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@icloud.com> Change-Id: Ieb74cbf5b76b09e1789331b71f37f7c660221b0e
|