path: root/bl31/bl31.mk
diff options
authorSoby Mathew <soby.mathew@arm.com>2015-01-08 18:02:19 +0000
committerDan Handley <dan.handley@arm.com>2015-01-22 10:57:44 +0000
commit8c5fe0b5b9f1666b4ddd8f5849de80249cdebe40 (patch)
treee2528b93b735f00ae31d81680dd8c3a14b4c0f0c /bl31/bl31.mk
parent5b1cd43bc1b69b8a6df251b9e54591f2405f5e0c (diff)
Move bakery algorithm implementation out of coherent memory
This patch moves the bakery locks out of coherent memory to normal memory. This implies that the lock information needs to be placed on a separate cache line for each cpu. Hence the bakery_lock_info_t structure is allocated in the per-cpu data so as to minimize memory wastage. A similar platform per-cpu data is introduced for the platform locks. As a result of the above changes, the bakery lock api is completely changed. Earlier, a reference to the lock structure was passed to the lock implementation. Now a unique-id (essentially an index into the per-cpu data array) and an offset into the per-cpu data for bakery_info_t needs to be passed to the lock implementation. Change-Id: I1e76216277448713c6c98b4c2de4fb54198b39e0
Diffstat (limited to 'bl31/bl31.mk')
1 files changed, 6 insertions, 1 deletions
diff --git a/bl31/bl31.mk b/bl31/bl31.mk
index f53a41ff7f..4c25a60a3a 100644
--- a/bl31/bl31.mk
+++ b/bl31/bl31.mk
@@ -40,7 +40,6 @@ BL31_SOURCES += bl31/bl31_main.c \
bl31/aarch64/runtime_exceptions.S \
bl31/aarch64/crash_reporting.S \
lib/cpus/aarch64/cpu_helpers.S \
- lib/locks/bakery/bakery_lock.c \
lib/locks/exclusive/spinlock.S \
services/std_svc/std_svc_setup.c \
services/std_svc/psci/psci_afflvl_off.c \
@@ -53,6 +52,12 @@ BL31_SOURCES += bl31/bl31_main.c \
services/std_svc/psci/psci_setup.c \
+ifeq (${USE_COHERENT_MEM}, 1)
+BL31_SOURCES += lib/locks/bakery/bakery_lock_coherent.c
+BL31_SOURCES += lib/locks/bakery/bakery_lock_normal.c
BL31_LINKERFILE := bl31/bl31.ld.S
# Flag used by the generic interrupt management framework to determine if