Commit 47613407 authored by Hamish Martin's avatar Hamish Martin Committed by Michael Ellerman

powerpc: Move THREAD_SHIFT config to Kconfig

Shift the logic for defining THREAD_SHIFT logic to Kconfig in order to
allow override by users.
Signed-off-by: default avatarHamish Martin <hamish.martin@alliedtelesis.co.nz>
Reviewed-by: default avatarChris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 97da3854
...@@ -678,6 +678,16 @@ config PPC_256K_PAGES ...@@ -678,6 +678,16 @@ config PPC_256K_PAGES
endchoice endchoice
config THREAD_SHIFT
int "Thread shift" if EXPERT
range 13 15
default "15" if PPC_256K_PAGES
default "14" if PPC64
default "13"
help
Used to define the stack size. The default is almost always what you
want. Only change this if you know what you are doing.
config FORCE_MAX_ZONEORDER config FORCE_MAX_ZONEORDER
int "Maximum zone order" int "Maximum zone order"
range 8 9 if PPC64 && PPC_64K_PAGES range 8 9 if PPC64 && PPC_64K_PAGES
......
...@@ -10,15 +10,7 @@ ...@@ -10,15 +10,7 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
/* We have 8k stacks on ppc32 and 16k on ppc64 */ #define THREAD_SHIFT CONFIG_THREAD_SHIFT
#if defined(CONFIG_PPC64)
#define THREAD_SHIFT 14
#elif defined(CONFIG_PPC_256K_PAGES)
#define THREAD_SHIFT 15
#else
#define THREAD_SHIFT 13
#endif
#define THREAD_SIZE (1 << THREAD_SHIFT) #define THREAD_SIZE (1 << THREAD_SHIFT)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment