Searched hist:"5956 c77ebb0a0e04df2922f1cb4cd2f3ec71ea07" (Results 1 – 2 of 2) sorted by relevance
| /optee_os/core/arch/arm/include/kernel/ |
| H A D | thread_private_arch.h | 5956c77ebb0a0e04df2922f1cb4cd2f3ec71ea07 Tue Aug 23 19:54:34 UTC 2022 Jerome Forissier <jerome.forissier@linaro.org> core: fix handling of CFG_STACK_THREAD_EXTRA and CFG_STACK_TMP_EXTRA
CFG_STACK_THREAD_EXTRA and CFG_STACK_TMP_EXTRA should be included in STACK_THREAD_SIZE and STACK_TMP_SIZE, respectively, because not doing so creates inconsistencies where some places use e.g., (STACK_THREAD_SIZE + CFG_STACK_THREAD_EXTRA) while others use STACK_THREAD_SIZE only. Note for example the discrepancy between the stack declaration:
DECLARE_STACK(stack_thread, CFG_NUM_THREADS, STACK_THREAD_SIZE + CFG_STACK_THREAD_EXTRA, static);
...and the thread_stack_start() function:
vaddr_t thread_stack_start(void) { /* ... */
return thr->stack_va_end - STACK_THREAD_SIZE; }
With this change, the _EXTRA values should also be properly taken into account when pager is enabled, which was not the case before.
Fixes: cca7b5ebeb9b ("core: configuration switches to tune stack sizes") Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jorge Ramirez-Ortiz <jorge@foundries.io> (STM32MP1, SE050, pager)
|
| /optee_os/core/kernel/ |
| H A D | thread.c | 5956c77ebb0a0e04df2922f1cb4cd2f3ec71ea07 Tue Aug 23 19:54:34 UTC 2022 Jerome Forissier <jerome.forissier@linaro.org> core: fix handling of CFG_STACK_THREAD_EXTRA and CFG_STACK_TMP_EXTRA
CFG_STACK_THREAD_EXTRA and CFG_STACK_TMP_EXTRA should be included in STACK_THREAD_SIZE and STACK_TMP_SIZE, respectively, because not doing so creates inconsistencies where some places use e.g., (STACK_THREAD_SIZE + CFG_STACK_THREAD_EXTRA) while others use STACK_THREAD_SIZE only. Note for example the discrepancy between the stack declaration:
DECLARE_STACK(stack_thread, CFG_NUM_THREADS, STACK_THREAD_SIZE + CFG_STACK_THREAD_EXTRA, static);
...and the thread_stack_start() function:
vaddr_t thread_stack_start(void) { /* ... */
return thr->stack_va_end - STACK_THREAD_SIZE; }
With this change, the _EXTRA values should also be properly taken into account when pager is enabled, which was not the case before.
Fixes: cca7b5ebeb9b ("core: configuration switches to tune stack sizes") Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jorge Ramirez-Ortiz <jorge@foundries.io> (STM32MP1, SE050, pager)
|