Move bakery algorithm implementation out of coherent memory
authorSoby Mathew <soby.mathew@arm.com>
Thu, 8 Jan 2015 18:02:19 +0000 (18:02 +0000)
committerDan Handley <dan.handley@arm.com>
Thu, 22 Jan 2015 10:57:44 +0000 (10:57 +0000)
commit8c5fe0b5b9f1666b4ddd8f5849de80249cdebe40
treee2528b93b735f00ae31d81680dd8c3a14b4c0f0c
parent5b1cd43bc1b69b8a6df251b9e54591f2405f5e0c
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
18 files changed:
Makefile
bl31/bl31.mk
include/bl31/cpu_data.h
include/bl31/services/psci.h
include/lib/bakery_lock.h
lib/locks/bakery/bakery_lock.c [deleted file]
lib/locks/bakery/bakery_lock_coherent.c [new file with mode: 0644]
lib/locks/bakery/bakery_lock_normal.c [new file with mode: 0644]
plat/fvp/drivers/pwrc/fvp_pwrc.c
plat/fvp/fvp_private.h
plat/fvp/include/platform_def.h
plat/juno/include/platform_def.h
plat/juno/juno_private.h
plat/juno/mhu.c
plat/juno/platform.mk
services/std_svc/psci/psci_common.c
services/std_svc/psci/psci_private.h
services/std_svc/psci/psci_setup.c