From 9b5dc8c6ef2f53799db451c68e86308b238f5678 Mon Sep 17 00:00:00 2001 From: Paul Olaru Date: Wed, 20 Nov 2019 17:44:41 +0200 Subject: [PATCH] sof: Align interrupt stacks Xtensa ABI requires the stack to always be aligned to a multiple of 16 bytes. This commit aligns the stacks used for interrupt handling. Signed-off-by: Paul Olaru --- src/arch/xtensa/xtos/xtos-structs.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/arch/xtensa/xtos/xtos-structs.h b/src/arch/xtensa/xtos/xtos-structs.h index bcc4f97df..3a9997800 100644 --- a/src/arch/xtensa/xtos/xtos-structs.h +++ b/src/arch/xtensa/xtos/xtos-structs.h @@ -9,6 +9,7 @@ #define __XTOS_XTOS_STRUCTS_H__ #include "xtos-internal.h" +#include #include #include #include @@ -29,19 +30,19 @@ struct xtos_core_data { struct XtosInterruptStructure xtos_int_data; #endif #if CONFIG_INTERRUPT_LEVEL_1 - uint8_t xtos_stack_for_interrupt_1[SOF_STACK_SIZE]; + uint8_t xtos_stack_for_interrupt_1[SOF_STACK_SIZE] __aligned(16); #endif #if CONFIG_INTERRUPT_LEVEL_2 - uint8_t xtos_stack_for_interrupt_2[SOF_STACK_SIZE]; + uint8_t xtos_stack_for_interrupt_2[SOF_STACK_SIZE] __aligned(16); #endif #if CONFIG_INTERRUPT_LEVEL_3 - uint8_t xtos_stack_for_interrupt_3[SOF_STACK_SIZE]; + uint8_t xtos_stack_for_interrupt_3[SOF_STACK_SIZE] __aligned(16); #endif #if CONFIG_INTERRUPT_LEVEL_4 - uint8_t xtos_stack_for_interrupt_4[SOF_STACK_SIZE]; + uint8_t xtos_stack_for_interrupt_4[SOF_STACK_SIZE] __aligned(16); #endif #if CONFIG_INTERRUPT_LEVEL_5 - uint8_t xtos_stack_for_interrupt_5[SOF_STACK_SIZE]; + uint8_t xtos_stack_for_interrupt_5[SOF_STACK_SIZE] __aligned(16); #endif xtos_task_context xtos_interrupt_ctx; uintptr_t xtos_saved_sp;