From: Simon Glass <sjg@chromium.org>
Date: Mon, 31 Jul 2023 03:01:47 +0000 (-0600)
Subject: x86: Drop CFG_SYS_STACK_SIZE
X-Git-Tag: v2025.01-rc5-pxa1908~891^2~18
X-Git-Url: http://git.dujemihanovic.xyz/html/static/gitweb.css?a=commitdiff_plain;h=edd53bda53b9489aafe6b728b2b71044bb92f248;p=u-boot.git

x86: Drop CFG_SYS_STACK_SIZE

This is only used in one file and the value is the same for both boards
which define it. Use the fixed value of 32KB and drop the CFG. This will
allow removal of the config.h files.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
---

diff --git a/arch/x86/lib/physmem.c b/arch/x86/lib/physmem.c
index 1eb97ac5bb..382f768149 100644
--- a/arch/x86/lib/physmem.c
+++ b/arch/x86/lib/physmem.c
@@ -14,6 +14,7 @@
 #include <asm/cpu.h>
 #include <asm/global_data.h>
 #include <linux/compiler.h>
+#include <linux/sizes.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -144,7 +145,7 @@ static void x86_phys_memset_page(phys_addr_t map_addr, uintptr_t offset, int c,
 
 	/* Make sure the window is below U-Boot. */
 	assert(window + LARGE_PAGE_SIZE <
-	       gd->relocaddr - CONFIG_SYS_MALLOC_LEN - CFG_SYS_STACK_SIZE);
+	       gd->relocaddr - CONFIG_SYS_MALLOC_LEN - SZ_32K);
 	/* Map the page into the window and then memset the appropriate part. */
 	x86_phys_map_page(window, map_addr, 1);
 	memset((void *)(window + offset), c, size);
diff --git a/include/configs/edison.h b/include/configs/edison.h
index 455a889b64..558c74d7b4 100644
--- a/include/configs/edison.h
+++ b/include/configs/edison.h
@@ -8,8 +8,4 @@
 
 #include <asm/ibmpc.h>
 
-/* Miscellaneous configurable options */
-
-#define CFG_SYS_STACK_SIZE			(32 * 1024)
-
 #endif
diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h
index c1c5a09a35..608c5ba7b0 100644
--- a/include/configs/x86-common.h
+++ b/include/configs/x86-common.h
@@ -10,16 +10,6 @@
 #ifndef __CONFIG_X86_COMMON_H
 #define __CONFIG_X86_COMMON_H
 
-/*-----------------------------------------------------------------------
- * CPU Features
- */
-
-#define CFG_SYS_STACK_SIZE			(32 * 1024)
-
-/*-----------------------------------------------------------------------
- * Environment configuration
- */
-
 /*-----------------------------------------------------------------------
  * USB configuration
  */