Skip to content

Commit b817f7e

Browse files
committed
sh: Disable 4kB stacks when using PAGE_SIZE_64KB.
This combination triggers a divide by zero in kernel/fork.c when calculating the initial max_threads value: max_threads = mempages / (8 * THREAD_SIZE / PAGE_SIZE); Simply disable 4K stacks on 64kB PAGE_SIZE to work around this, as it's not a terribly useful combination to begin with. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
1 parent 2194478 commit b817f7e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎arch/sh/Kconfig.debug‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ config DEBUG_STACK_USAGE
8282

8383
config 4KSTACKS
8484
bool "Use 4Kb for kernel stacks instead of 8Kb"
85-
depends on DEBUG_KERNEL && (MMU || BROKEN)
85+
depends on DEBUG_KERNEL && (MMU || BROKEN) && !PAGE_SIZE_64KB
8686
help
8787
If you say Y here the kernel will use a 4Kb stacksize for the
8888
kernel stack attached to each process/thread. This facilitates

0 commit comments

Comments
 (0)