From 14e1efdc4493d45801afed1ad397d24ec8999efa Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Thu, 18 Dec 2014 19:24:48 -0800 Subject: [PATCH] Kconfig: Fix incorrect CONFIG_STACK_SIZE values for X86 and ARM64 Commit 54229a7 (arm: Fix checkstack() to use correct stack size) didn't quite hit the mark. Due to the crazy way our Kconfig includes work, It accidentally set CONFIG_STACK_SIZE to 0 even on architectures that need it. This patch fixes the issue by moving everything back to a single entry in src/Kconfig, making sure we end up with the intended numbers on all architectures. BRANCH=None BUG=chrome-os-partner:34750 TEST=Built for Pinky, Urara, Falco and Ryu. Confirmed that the generated .config contained CONFIG_STACK_SIZE=0x0 for the former two, and CONFIG_STACK_SIZE=0x1000 for the latter. Change-Id: Ib18561925aafe7c74e6c4f0b10b55000a785e144 Signed-off-by: Julius Werner Reviewed-on: https://chromium-review.googlesource.com/236753 Reviewed-by: David Hendricks (cherry picked from commit c64b127e163f98162f3f7195b6ed09bd5a4b77c4) Signed-off-by: Julius Werner Reviewed-on: https://chromium-review.googlesource.com/237028 --- src/Kconfig | 3 ++- src/arch/arm/Kconfig | 5 ----- src/arch/mips/Kconfig | 5 ----- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/Kconfig b/src/Kconfig index 834249ae49..0f87099808 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -302,9 +302,10 @@ config HEAP_SIZE hex "Heap size in bytes" default 0x4000 -# Not used for the actual stack by ARM, but still needed in some src/lib/ files. +# Size of per-cpu stacks in ramstage. Set to 0 for non-SMP architectures. config STACK_SIZE hex + default 0x0 if (ARCH_RAMSTAGE_ARM || ARCH_RAMSTAGE_MIPS) default 0x1000 config MAX_CPUS diff --git a/src/arch/arm/Kconfig b/src/arch/arm/Kconfig index ded5911591..25d959c2c2 100644 --- a/src/arch/arm/Kconfig +++ b/src/arch/arm/Kconfig @@ -30,9 +30,4 @@ config ARM_LPAE bool "Enable LPAE" default n -# Mark SMP stack size as 0 since we keep using SRAM stack throughout ramstage. -config STACK_SIZE - hex - default 0x0 - endmenu diff --git a/src/arch/mips/Kconfig b/src/arch/mips/Kconfig index b73244c37e..3d8e2c6bac 100644 --- a/src/arch/mips/Kconfig +++ b/src/arch/mips/Kconfig @@ -34,9 +34,4 @@ config ARCH_RAMSTAGE_MIPS bool default n -# Mark SMP stack size as 0 since we keep using SRAM stack throughout ramstage. -config STACK_SIZE - hex - default 0x0 - endmenu