Home
last modified time | relevance | path

Searched hist:d439cea9e8dc500008804f5667b30f332bf4fcbf (Results 1 – 1 of 1) sorted by relevance

/rk3399_ARM-atf/lib/locks/bakery/
H A Dbakery_lock_normal.cd439cea9e8dc500008804f5667b30f332bf4fcbf Fri Jun 29 20:34:51 UTC 2018 Varun Wadekar <vwadekar@nvidia.com> locks: bakery: add a DMB to the 'read_cache_op' macro

ARM has a weak memory ordering model. This means that without
explicit barriers, memory accesses can be observed differently
than program order. In this case, the cache invalidate instruction
can be observed after the subsequent read to address.

To solve this, a DMB instruction is required between the cache
invalidate and the read. This ensures that the cache invalidate
completes before all memory accesses in program order after the DMB.

This patch updates the 'read_cache_op' macro to issue a DMB after
the cache invalidate instruction to fix this anomaly.

Change-Id: Iac9a90d228c57ba8bcdca7e409ea6719546ab441
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>