diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2015-01-22 14:31:02 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-01-23 19:56:32 +0000 |
commit | ad0306862031b4422958c1b7fc0b5399825f6d37 (patch) | |
tree | 19f4e94d272f5589308cf31f6f77d09fc7449730 | |
parent | 3df8bd8772cff174ab5490b9c2f2f6673b36e05e (diff) | |
download | chrome-ec-ad0306862031b4422958c1b7fc0b5399825f6d37.tar.gz |
lm4: workaround to force __enter_hibernate in SRAM
The new toolchain is putting again the __enter_hibernate function in
flash (.text) rather than in SRAM (.iram.text) after inlining both the
hibernate() and __enter_hibernate() function.
Workaround this issue by forcing "noinline" on __enter_hibernate().
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=all
BUG=chrome-os-partner:35774
TEST=make BOARD=samus dis
and check the disassembly, the __enter_hibernate is called in SRAM
through a veneer.
Change-Id: I015928ebe18ba8fd93252eece3e8a0fcf4b2a037
Reviewed-on: https://chromium-review.googlesource.com/242691
Trybot-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | chip/lm4/system.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chip/lm4/system.c b/chip/lm4/system.c index 6a55b2941e..78db1b38a3 100644 --- a/chip/lm4/system.c +++ b/chip/lm4/system.c @@ -176,7 +176,8 @@ static void check_reset_cause(void) * functions, and can't be declared static (or else the compiler optimizes it * into the main hibernate function. */ -void __attribute__((section(".iram.text"))) __enter_hibernate(int hibctl) +void __attribute__((noinline)) __attribute__((section(".iram.text"))) +__enter_hibernate(int hibctl) { LM4_HIBERNATE_HIBCTL = hibctl; while (1) |