From 596929b971dc4366a490d5909a265c038502d284 Mon Sep 17 00:00:00 2001 From: Varun Wadekar Date: Wed, 30 Jan 2019 08:26:20 -0800 Subject: locks: linker variables to calculate per-cpu bakery lock size This patch introduces explicit linker variables to mark the start and end of the per-cpu bakery lock section to help bakery_lock_normal.c calculate the size of the section. This patch removes the previously used '__PERCPU_BAKERY_LOCK_SIZE__' linker variable to make the code uniform across GNU linker and ARM linker. Change-Id: Ie0c51702cbc0fe8a2076005344a1fcebb48e7cca Signed-off-by: Varun Wadekar --- bl31/bl31.ld.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bl31') diff --git a/bl31/bl31.ld.S b/bl31/bl31.ld.S index 1af19620..c7d587cb 100644 --- a/bl31/bl31.ld.S +++ b/bl31/bl31.ld.S @@ -224,9 +224,11 @@ SECTIONS */ . = ALIGN(CACHE_WRITEBACK_GRANULE); __BAKERY_LOCK_START__ = .; + __PERCPU_BAKERY_LOCK_START__ = .; *(bakery_lock) . = ALIGN(CACHE_WRITEBACK_GRANULE); - __PERCPU_BAKERY_LOCK_SIZE__ = ABSOLUTE(. - __BAKERY_LOCK_START__); + __PERCPU_BAKERY_LOCK_END__ = .; + __PERCPU_BAKERY_LOCK_SIZE__ = ABSOLUTE(__PERCPU_BAKERY_LOCK_END__ - __PERCPU_BAKERY_LOCK_START__); . = . + (__PERCPU_BAKERY_LOCK_SIZE__ * (PLATFORM_CORE_COUNT - 1)); __BAKERY_LOCK_END__ = .; -- cgit v1.2.3