Skip to content
Snippets Groups Projects
Commit fa042186 authored by Tetsuyuki Kobayashi's avatar Tetsuyuki Kobayashi Committed by Albert ARIBAUD
Browse files

arm: bugfix: save_boot_params_default accesses uninitalized stack when -O0


save_boot_params_default() in cpu.c accesses uninitialized stack area
when it compiled with -O0 (not optimized).

Signed-off-by: default avatarTetsuyuki Kobayashi <koba@kmckk.co.jp>
Acked-by: default avatarTom Rini <trini@ti.com>
parent 816e3921
No related branches found
No related tags found
No related merge requests found
......@@ -36,9 +36,15 @@
#include <asm/system.h>
#include <asm/cache.h>
#include <asm/armv7.h>
#include <linux/compiler.h>
void save_boot_params_default(u32 r0, u32 r1, u32 r2, u32 r3)
void __naked save_boot_params_default(u32 r0, u32 r1, u32 r2, u32 r3)
{
/*
* Stack pointer is not yet initialized
* Don't save anything to stack even if compiled with -O0
*/
asm("bx lr");
}
void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment