diff options
author | Bill Richardson <wfrichar@chromium.org> | 2014-04-28 16:21:56 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-05-01 05:47:27 +0000 |
commit | 3000fa71a6a1987ab8b069d50dee402f95006989 (patch) | |
tree | f91c19597c45d5ebb7b964bbd89e937bc1329b06 | |
parent | 870d15f4d1ce529eb9ac8e54cf5c4bf0fa26d224 (diff) | |
download | chrome-ec-3000fa71a6a1987ab8b069d50dee402f95006989.tar.gz |
Increase some task stack sizes to handle more FP regs.
With change b610695b61db3b3784e2a516c91f429139616100, we fixed a problem
with the number of FP regs that were being saved on the stack. That change
decreased the required stack size for non-FP tasks by 64 bytes, but
increased the size needed for FP tasks (such as the lightbar).
The lightbar task was previously using within 64 bytes of its alloted stack,
so handling the task switching correctly meant that it now overflowed.
The hooks task had the same problem, but was hidden by the lightbar task.
This CL bumps the LARGER_TASK_STACK_SIZE up a bit, and switches the lightbar
task to use it instead of the default size.
BUG=chrome-os-partner:27971, chrome-os-partner:28407
BRANCH=ToT
TEST=Try it on both Link and Samus.
Before this change, the Samus lightbar was overflowing its stack every time
the AP booted (causing the lightbar to do things). With this change, it
doesn't. Here are typical stack sizes after this CL:
Task Ready Name Events Time (s) StkUsed
0 R << idle >> 00000000 28.394913 328/512
1 HOOKS 00000000 0.534085 640/768
2 R LIGHTBAR 10000000 5.359356 520/768
3 CHARGER 00000000 0.094674 384/512
4 CHIPSET 00000000 0.003353 320/512
5 KEYPROTO 00000000 0.002814 312/512
6 HOSTCMD 00000000 0.002942 244/512
7 R CONSOLE 00000000 0.193776 340/768
8 POWERBTN 00000000 0.000392 248/512
9 KEYSCAN 00000000 0.409337 332/512
Change-Id: Ica93608c8adb225410a62ec3a0a27944c479270a
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/197733
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r-- | board/link/ec.tasklist | 2 | ||||
-rw-r--r-- | board/samus/ec.tasklist | 2 | ||||
-rw-r--r-- | chip/lm4/config_chip.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/board/link/ec.tasklist b/board/link/ec.tasklist index 53b30cb9a3..3b862f9323 100644 --- a/board/link/ec.tasklist +++ b/board/link/ec.tasklist @@ -18,7 +18,7 @@ */ #define CONFIG_TASK_LIST \ TASK_ALWAYS(HOOKS, hook_task, NULL, LARGER_TASK_STACK_SIZE) \ - TASK_NOTEST(LIGHTBAR, lightbar_task, NULL, TASK_STACK_SIZE) \ + TASK_NOTEST(LIGHTBAR, lightbar_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_ALWAYS(CHARGER, charger_task, NULL, TASK_STACK_SIZE) \ TASK_NOTEST(CHIPSET, chipset_task, NULL, TASK_STACK_SIZE) \ TASK_NOTEST(KEYPROTO, keyboard_protocol_task, NULL, TASK_STACK_SIZE) \ diff --git a/board/samus/ec.tasklist b/board/samus/ec.tasklist index 53b30cb9a3..3b862f9323 100644 --- a/board/samus/ec.tasklist +++ b/board/samus/ec.tasklist @@ -18,7 +18,7 @@ */ #define CONFIG_TASK_LIST \ TASK_ALWAYS(HOOKS, hook_task, NULL, LARGER_TASK_STACK_SIZE) \ - TASK_NOTEST(LIGHTBAR, lightbar_task, NULL, TASK_STACK_SIZE) \ + TASK_NOTEST(LIGHTBAR, lightbar_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_ALWAYS(CHARGER, charger_task, NULL, TASK_STACK_SIZE) \ TASK_NOTEST(CHIPSET, chipset_task, NULL, TASK_STACK_SIZE) \ TASK_NOTEST(KEYPROTO, keyboard_protocol_task, NULL, TASK_STACK_SIZE) \ diff --git a/chip/lm4/config_chip.h b/chip/lm4/config_chip.h index 419d4b9a6d..617e1aabfe 100644 --- a/chip/lm4/config_chip.h +++ b/chip/lm4/config_chip.h @@ -45,7 +45,7 @@ /* non-standard task stack sizes */ #define IDLE_TASK_STACK_SIZE 512 -#define LARGER_TASK_STACK_SIZE 640 +#define LARGER_TASK_STACK_SIZE 768 /* Default task stack size */ #define TASK_STACK_SIZE 512 |