Skip to content

Commit

Permalink
sh: Disable 4kB stacks when using PAGE_SIZE_64KB.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mundt committed Sep 20, 2008
1 parent 2194478 commit b817f7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sh/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ config DEBUG_STACK_USAGE

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

0 comments on commit b817f7e

Please sign in to comment.