From 8c5fe0b5b9f1666b4ddd8f5849de80249cdebe40 Mon Sep 17 00:00:00 2001 From: Soby Mathew Date: Thu, 8 Jan 2015 18:02:19 +0000 Subject: 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 --- services/std_svc/psci/psci_setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'services/std_svc/psci/psci_setup.c') diff --git a/services/std_svc/psci/psci_setup.c b/services/std_svc/psci/psci_setup.c index e0bc8331..a750256e 100644 --- a/services/std_svc/psci/psci_setup.c +++ b/services/std_svc/psci/psci_setup.c @@ -181,7 +181,7 @@ static void psci_init_aff_map_node(unsigned long mpidr, uint32_t linear_id; psci_aff_map[idx].mpidr = mpidr; psci_aff_map[idx].level = level; - bakery_lock_init(&psci_aff_map[idx].lock); + psci_lock_init(psci_aff_map, idx); /* * If an affinity instance is present then mark it as OFF to begin with. -- cgit