diff options
author | Jerome Forissier <jerome.forissier@linaro.org> | 2018-10-15 16:43:03 +0200 |
---|---|---|
committer | Jérôme Forissier <jerome.forissier@linaro.org> | 2018-11-08 14:07:18 +0100 |
commit | ab0df69e196a97ebcc605f655a24f4c3bc8bb053 (patch) | |
tree | eef2820d379e553c889cb88036f20c797525e57b /mk/config.mk | |
parent | 447633dec8473deaef67e51572aa88c54d5bfd0d (diff) |
core: instrument mutexes with lockdep
Implements lockdep hooks for mutexes. CFG_LOCKDEP is disabled by default,
because it causes a noticeable slowdown (plain xtest runs 2-4x slower).
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU, HiKey960)
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'mk/config.mk')
-rw-r--r-- | mk/config.mk | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mk/config.mk b/mk/config.mk index e0c050a8..84af869c 100644 --- a/mk/config.mk +++ b/mk/config.mk @@ -219,9 +219,17 @@ CFG_TA_DYNLINK ?= y # Enable paging, requires SRAM, can't be enabled by default CFG_WITH_PAGER ?= n +# Runtime lock dependency checker: ensures that a proper locking hierarchy is +# used in the TEE core when acquiring and releasing mutexes. Any violation will +# cause a panic as soon as the invalid locking condition is detected. If +# CFG_UNWIND is enabled, the algorithm records the call stacks when locks are +# taken, and prints them when a potential deadlock is found. +# Expect a significant performance impact when enabling this. +CFG_LOCKDEP ?= n + # BestFit algorithm in bget reduces the fragmentation of the heap when running -# with the pager enabled. -CFG_CORE_BGET_BESTFIT ?= $(CFG_WITH_PAGER) +# with the pager enabled or lockdep +CFG_CORE_BGET_BESTFIT ?= $(call cfg-one-enabled, CFG_WITH_PAGER CFG_LOCKDEP) # Use the pager for user TAs CFG_PAGED_USER_TA ?= $(CFG_WITH_PAGER) |