diff options
author | Soby Mathew <soby.mathew@arm.com> | 2018-10-18 09:35:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-18 09:35:14 +0100 |
commit | 97f12332ff0d24340a31304e01e2940502c7adca (patch) | |
tree | 01c686262d480155dd5a6c4377df25fa9189c6f6 /include/plat | |
parent | 1278f363d3b575b23d095a980d66ccdd801b61f8 (diff) | |
parent | 32aee8415dac5ef71d53cacc28e25a8d312cc47b (diff) | |
download | arm-trusted-firmware-97f12332ff0d24340a31304e01e2940502c7adca.tar.gz |
Merge pull request #1629 from robertovargas-arm/hw-assisted-coherency-lock
Optimize bakery locks when HW_ASSISTED_COHERENCY is enabled
Diffstat (limited to 'include/plat')
-rw-r--r-- | include/plat/arm/common/plat_arm.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/plat/arm/common/plat_arm.h b/include/plat/arm/common/plat_arm.h index d543894d7..848f4eea8 100644 --- a/include/plat/arm/common/plat_arm.h +++ b/include/plat/arm/common/plat_arm.h @@ -11,6 +11,7 @@ #include <cassert.h> #include <cpu_data.h> #include <stdint.h> +#include <spinlock.h> #include <tzc_common.h> #include <utils_def.h> @@ -80,6 +81,14 @@ void arm_setup_romlib(void); */ #define ARM_INSTANTIATE_LOCK static DEFINE_BAKERY_LOCK(arm_lock) #define ARM_LOCK_GET_INSTANCE (&arm_lock) + +#if !HW_ASSISTED_COHERENCY +#define ARM_SCMI_INSTANTIATE_LOCK DEFINE_BAKERY_LOCK(arm_scmi_lock) +#else +#define ARM_SCMI_INSTANTIATE_LOCK spinlock_t arm_scmi_lock +#endif +#define ARM_SCMI_LOCK_GET_INSTANCE (&arm_scmi_lock) + /* * These are wrapper macros to the Coherent Memory Bakery Lock API. */ |