]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
thp, x86: introduce HAVE_ARCH_TRANSPARENT_HUGEPAGE
authorGerald Schaefer <gerald.schaefer@de.ibm.com>
Wed, 26 Sep 2012 01:33:25 +0000 (11:33 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 27 Sep 2012 07:26:01 +0000 (17:26 +1000)
Cleanup patch in preparation for transparent hugepage support on s390.
Adding new architectures to the TRANSPARENT_HUGEPAGE config option can
make the "depends" line rather ugly, like "depends on (X86 || (S390 &&
64BIT)) && MMU".

This patch adds a HAVE_ARCH_TRANSPARENT_HUGEPAGE instead.  x86 already has
MMU "def_bool y", so the MMU check is superfluous there and
HAVE_ARCH_TRANSPARENT_HUGEPAGE can be selected in arch/x86/Kconfig.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Hillf Danton <dhillf@gmail.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/Kconfig
arch/x86/Kconfig
mm/Kconfig

index 93237fee91496163e7d6d65cb88532f082776157..a9e8f743496f2dceb1ef74fbb1453d7c1871619d 100644 (file)
@@ -319,4 +319,7 @@ config MODULES_USE_ELF_REL
 config HAVE_VIRT_CPU_ACCOUNTING
        bool
 
+config HAVE_ARCH_TRANSPARENT_HUGEPAGE
+       bool
+
 source "kernel/gcov/Kconfig"
index ef595cc4411d003085b6ebeddff4c9a8d6741003..f49380f0b9272327c5d00b18a7177c4a494d3192 100644 (file)
@@ -85,6 +85,7 @@ config X86
        select IRQ_FORCED_THREADING
        select USE_GENERIC_SMP_HELPERS if SMP
        select HAVE_BPF_JIT if X86_64
+       select HAVE_ARCH_TRANSPARENT_HUGEPAGE
        select CLKEVT_I8253
        select ARCH_HAVE_NMI_SAFE_CMPXCHG
        select GENERIC_IOMAP
index d5c8019c662793886224b872cc494e1ae3d00842..3322342a1ffb0796708e2045571472235e502927 100644 (file)
@@ -318,7 +318,7 @@ config NOMMU_INITIAL_TRIM_EXCESS
 
 config TRANSPARENT_HUGEPAGE
        bool "Transparent Hugepage Support"
-       depends on X86 && MMU
+       depends on HAVE_ARCH_TRANSPARENT_HUGEPAGE
        select COMPACTION
        help
          Transparent Hugepages allows the kernel to use huge pages and