summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Vaussard <florian.vaussard@heig-vd.ch>2017-03-10 15:12:44 +0100
committerKumar Gala <kumar.gala@linaro.org>2017-03-15 09:27:56 -0500
commitdca0e24b0807049b3b70d7eb8c7d854acdd6b5c8 (patch)
tree35069f4983effde13e50d5d44d194be0c7760912
parent1441825025a2d9a76aab2e8d94dbe01c519c7056 (diff)
kernel: arm: Increase idle stack size to fix corruption by FP_SHARING
When enabling CONFIG_FP_SHARING on ARM, 64 extra bytes are necessary on the stack of each task in order to save FPU registers S16 to S31. In the case of the idle stack, the default value of 256 bytes is too small. As described in ZEP-1470, when the idle task is scheduled out, floating point registers are saved, which corrupts the stack frame (especially the saved PC value). When scheduling the idle task, the restored PC will jump to nowhere, leading to a Usage Fault. Increase the size of the idle stack by 64 bytes to fix this issue. JIRA: ZEP-1470 Change-Id: Ib800cd51e5189dda8bf59332db661c21399db3e3 Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch> Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
-rw-r--r--kernel/unified/Kconfig2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/unified/Kconfig b/kernel/unified/Kconfig
index 34ba62d09..ded5ba053 100644
--- a/kernel/unified/Kconfig
+++ b/kernel/unified/Kconfig
@@ -134,7 +134,7 @@ config IDLE_STACK_SIZE
int
prompt "Size of stack for idle thread"
default 256
- default 320 if ARC
+ default 320 if ARC || (ARM && CPU_HAS_FPU)
help
Depending on the work that the idle task must do, most likely due to
power management but possibly to other features like system event