]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
sh: Disable 4kB stacks when using PAGE_SIZE_64KB.
authorPaul Mundt <lethal@linux-sh.org>
Sat, 20 Sep 2008 11:16:35 +0000 (20:16 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Sat, 20 Sep 2008 11:16:35 +0000 (20:16 +0900)
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>
arch/sh/Kconfig.debug

index 4d2d102e00d5657cef9a8a9b3b53d5f04cf7bdb5..e6d2c8b11abdaea5490fe00e83d750d7d141017b 100644 (file)
@@ -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