summaryrefslogtreecommitdiff
path: root/bl31
diff options
context:
space:
mode:
authorRoberto Vargas <roberto.vargas@arm.com>2017-11-13 13:41:58 +0000
committerRoberto Vargas <roberto.vargas@arm.com>2018-10-16 13:38:41 +0100
commit32aee8415dac5ef71d53cacc28e25a8d312cc47b (patch)
treef2ff8a50364c5bee5dd0d78a22ea66bd8ad5d3ad /bl31
parent0a09313ec780d2f66efcda3eb2a5d1632719bd81 (diff)
scmi: Optimize bakery locks when HW_ASSISTED_COHERENCY is enabled
When HW_ASSISTED_COHERENCY is enabled we can use spinlocks instead of using the more complex and slower bakery algorithm. Change-Id: I9d791a70050d599241169b9160a67e57d5506564 Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
Diffstat (limited to 'bl31')
-rw-r--r--bl31/bl31.ld.S9
1 files changed, 8 insertions, 1 deletions
diff --git a/bl31/bl31.ld.S b/bl31/bl31.ld.S
index 66cb3f30..81e7ba3a 100644
--- a/bl31/bl31.ld.S
+++ b/bl31/bl31.ld.S
@@ -188,8 +188,15 @@ SECTIONS
__PERCPU_BAKERY_LOCK_SIZE__ = ABSOLUTE(. - __BAKERY_LOCK_START__);
. = . + (__PERCPU_BAKERY_LOCK_SIZE__ * (PLATFORM_CORE_COUNT - 1));
__BAKERY_LOCK_END__ = .;
+
+ /*
+ * If BL31 doesn't use any bakery lock then __PERCPU_BAKERY_LOCK_SIZE__
+ * will be zero. For this reason, the only two valid values for
+ * __PERCPU_BAKERY_LOCK_SIZE__ are 0 or the platform defined value
+ * PLAT_PERCPU_BAKERY_LOCK_SIZE.
+ */
#ifdef PLAT_PERCPU_BAKERY_LOCK_SIZE
- ASSERT(__PERCPU_BAKERY_LOCK_SIZE__ == PLAT_PERCPU_BAKERY_LOCK_SIZE,
+ ASSERT((__PERCPU_BAKERY_LOCK_SIZE__ == 0) || (__PERCPU_BAKERY_LOCK_SIZE__ == PLAT_PERCPU_BAKERY_LOCK_SIZE),
"PLAT_PERCPU_BAKERY_LOCK_SIZE does not match bakery lock requirements");
#endif
#endif