aboutsummaryrefslogtreecommitdiff
path: root/core/arch/arm/kernel/asm-defines.c
diff options
context:
space:
mode:
authorJens Wiklander <jens.wiklander@linaro.org>2018-08-14 10:29:17 +0200
committerJérôme Forissier <jerome.forissier@linaro.org>2018-08-23 10:43:27 +0200
commite72c941f970bae786fdcd16660176c802d4175a4 (patch)
treee38ac675969c66f750a8d9f5b800e377ca052a31 /core/arch/arm/kernel/asm-defines.c
parentdd24684e6599ba3bdc32fbab70085aa391d24909 (diff)
core: arm: sm: optimize padding in struct sm_ctx
Removes redundant padding in struct sm_ctx and sub-structs with regards to CFG_SM_NO_CYCLE_COUNTING. Saves 4 bytes per core if CFG_SM_NO_CYCLE_COUNTING is defined. Removes assumptions in monitor assembly code about where the padding in struct sm_ctx is located. Adds compile time asserts are added to check that struct sm_ctx is properly aligned. Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU virt) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'core/arch/arm/kernel/asm-defines.c')
-rw-r--r--core/arch/arm/kernel/asm-defines.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/arch/arm/kernel/asm-defines.c b/core/arch/arm/kernel/asm-defines.c
index 7bba454d..19095c0e 100644
--- a/core/arch/arm/kernel/asm-defines.c
+++ b/core/arch/arm/kernel/asm-defines.c
@@ -17,6 +17,7 @@ DEFINES
DEFINE(SM_NSEC_CTX_R8, offsetof(struct sm_nsec_ctx, r8));
DEFINE(SM_SEC_CTX_R0, offsetof(struct sm_sec_ctx, r0));
DEFINE(SM_SEC_CTX_MON_LR, offsetof(struct sm_sec_ctx, mon_lr));
+ DEFINE(SM_CTX_SEC_SIZE, sizeof(struct sm_sec_ctx));
DEFINE(SM_CTX_SIZE, sizeof(struct sm_ctx));
DEFINE(SM_CTX_NSEC, offsetof(struct sm_ctx, nsec));
DEFINE(SM_CTX_SEC, offsetof(struct sm_ctx, sec));