x86/kconfig: Reorganize arch feature Kconfig select's
authorIngo Molnar <mingo@kernel.org>
Wed, 3 Jun 2015 08:00:13 +0000 (10:00 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 3 Jun 2015 08:08:52 +0000 (10:08 +0200)
Peter Zijstra noticed that in arch/x86/Kconfig there are a lot
of X86_{32,64} clauses in the X86 symbol, plus there are a number
of similar selects in the X86_32 and X86_64 config definitions
as well - which all overlap in an inconsistent mess.

So:

  - move all select's from X86_32 and X86_64 to the X64 config
    option

  - sort their names, so that duplications are easier to spot

  - align their if clauses, so that they are easier to identify
    at a glance - and so that weirdnesses stand out more

No change in functionality:

     105 insertions(+)
     105 deletions(-)

Originally-from: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20150602153027.GU3644@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/Kconfig

index a708bcc1615c3515f54106eec6466320d9706c0a..8a5cca39e74f5a811b38372ff342aec10f3e9b80 100644 (file)
@@ -9,141 +9,141 @@ config 64BIT
 config X86_32
        def_bool y
        depends on !64BIT
-       select CLKSRC_I8253
-       select HAVE_UID16
 
 config X86_64
        def_bool y
        depends on 64BIT
-       select X86_DEV_DMA_OPS
-       select ARCH_USE_CMPXCHG_LOCKREF
-       select HAVE_LIVEPATCH
 
 ### Arch settings
 config X86
        def_bool y
-       select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI
-       select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI
+       select ACPI_LEGACY_TABLES_LOOKUP        if ACPI
+       select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI
+       select ANON_INODES
+       select ARCH_CLOCKSOURCE_DATA
+       select ARCH_DISCARD_MEMBLOCK
+       select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
        select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
+       select ARCH_HAS_ELF_RANDOMIZE
        select ARCH_HAS_FAST_MULTIPLIER
        select ARCH_HAS_GCOV_PROFILE_ALL
+       select ARCH_HAS_SG_CHAIN
+       select ARCH_HAVE_NMI_SAFE_CMPXCHG
+       select ARCH_MIGHT_HAVE_ACPI_PDC         if ACPI
        select ARCH_MIGHT_HAVE_PC_PARPORT
        select ARCH_MIGHT_HAVE_PC_SERIO
-       select HAVE_AOUT if X86_32
-       select HAVE_UNSTABLE_SCHED_CLOCK
-       select ARCH_SUPPORTS_NUMA_BALANCING if X86_64
-       select ARCH_SUPPORTS_INT128 if X86_64
-       select HAVE_IDE
-       select HAVE_OPROFILE
-       select HAVE_PCSPKR_PLATFORM
-       select HAVE_PERF_EVENTS
-       select HAVE_IOREMAP_PROT
-       select HAVE_KPROBES
-       select HAVE_MEMBLOCK
-       select HAVE_MEMBLOCK_NODE_MAP
-       select ARCH_DISCARD_MEMBLOCK
-       select ARCH_WANT_OPTIONAL_GPIOLIB
+       select ARCH_SUPPORTS_ATOMIC_RMW
+       select ARCH_SUPPORTS_INT128             if X86_64
+       select ARCH_SUPPORTS_NUMA_BALANCING     if X86_64
+       select ARCH_USE_BUILTIN_BSWAP
+       select ARCH_USE_CMPXCHG_LOCKREF         if X86_64
+       select ARCH_USE_QUEUED_RWLOCKS
+       select ARCH_USE_QUEUED_SPINLOCKS
        select ARCH_WANT_FRAME_POINTERS
-       select HAVE_DMA_ATTRS
-       select HAVE_DMA_CONTIGUOUS
-       select HAVE_KRETPROBES
+       select ARCH_WANT_IPC_PARSE_VERSION      if X86_32
+       select ARCH_WANT_OPTIONAL_GPIOLIB
+       select BUILDTIME_EXTABLE_SORT
+       select CLKEVT_I8253
+       select CLKSRC_I8253                     if X86_32
+       select CLOCKSOURCE_VALIDATE_LAST_CYCLE
+       select CLOCKSOURCE_WATCHDOG
+       select CLONE_BACKWARDS                  if X86_32
+       select COMPAT_OLD_SIGACTION             if IA32_EMULATION
+       select DCACHE_WORD_ACCESS
+       select GENERIC_CLOCKEVENTS
+       select GENERIC_CLOCKEVENTS_BROADCAST    if X86_64 || (X86_32 && X86_LOCAL_APIC)
+       select GENERIC_CLOCKEVENTS_MIN_ADJUST
+       select GENERIC_CMOS_UPDATE
+       select GENERIC_CPU_AUTOPROBE
        select GENERIC_EARLY_IOREMAP
-       select HAVE_OPTPROBES
-       select HAVE_KPROBES_ON_FTRACE
-       select HAVE_FTRACE_MCOUNT_RECORD
-       select HAVE_FENTRY if X86_64
+       select GENERIC_FIND_FIRST_BIT
+       select GENERIC_IOMAP
+       select GENERIC_IRQ_PROBE
+       select GENERIC_IRQ_SHOW
+       select GENERIC_PENDING_IRQ              if SMP
+       select GENERIC_SMP_IDLE_THREAD
+       select GENERIC_STRNCPY_FROM_USER
+       select GENERIC_STRNLEN_USER
+       select GENERIC_TIME_VSYSCALL
+       select HAVE_ACPI_APEI                   if ACPI
+       select HAVE_ACPI_APEI_NMI               if ACPI
+       select HAVE_ALIGNED_STRUCT_PAGE         if SLUB
+       select HAVE_AOUT                        if X86_32
+       select HAVE_ARCH_AUDITSYSCALL
+       select HAVE_ARCH_HUGE_VMAP              if X86_64 || X86_PAE
+       select HAVE_ARCH_JUMP_LABEL
+       select HAVE_ARCH_KASAN                  if X86_64 && SPARSEMEM_VMEMMAP
+       select HAVE_ARCH_KGDB
+       select HAVE_ARCH_KMEMCHECK
+       select HAVE_ARCH_SECCOMP_FILTER
+       select HAVE_ARCH_SOFT_DIRTY             if X86_64
+       select HAVE_ARCH_TRACEHOOK
+       select HAVE_ARCH_TRANSPARENT_HUGEPAGE
+       select HAVE_BPF_JIT                     if X86_64
+       select HAVE_CC_STACKPROTECTOR
+       select HAVE_CMPXCHG_DOUBLE
+       select HAVE_CMPXCHG_LOCAL
+       select HAVE_CONTEXT_TRACKING            if X86_64
        select HAVE_C_RECORDMCOUNT
+       select HAVE_DEBUG_KMEMLEAK
+       select HAVE_DEBUG_STACKOVERFLOW
+       select HAVE_DMA_API_DEBUG
+       select HAVE_DMA_ATTRS
+       select HAVE_DMA_CONTIGUOUS
        select HAVE_DYNAMIC_FTRACE
        select HAVE_DYNAMIC_FTRACE_WITH_REGS
-       select HAVE_FUNCTION_TRACER
-       select HAVE_FUNCTION_GRAPH_TRACER
-       select HAVE_FUNCTION_GRAPH_FP_TEST
-       select HAVE_SYSCALL_TRACEPOINTS
-       select SYSCTL_EXCEPTION_TRACE
-       select HAVE_KVM
-       select HAVE_ARCH_KGDB
-       select HAVE_ARCH_TRACEHOOK
-       select HAVE_GENERIC_DMA_COHERENT if X86_32
        select HAVE_EFFICIENT_UNALIGNED_ACCESS
-       select USER_STACKTRACE_SUPPORT
-       select HAVE_REGS_AND_STACK_ACCESS_API
-       select HAVE_DMA_API_DEBUG
-       select HAVE_KERNEL_GZIP
+       select HAVE_FENTRY                      if X86_64
+       select HAVE_FTRACE_MCOUNT_RECORD
+       select HAVE_FUNCTION_GRAPH_FP_TEST
+       select HAVE_FUNCTION_GRAPH_TRACER
+       select HAVE_FUNCTION_TRACER
+       select HAVE_GENERIC_DMA_COHERENT        if X86_32
+       select HAVE_HW_BREAKPOINT
+       select HAVE_IDE
+       select HAVE_IOREMAP_PROT
+       select HAVE_IRQ_EXIT_ON_IRQ_STACK       if X86_64
+       select HAVE_IRQ_TIME_ACCOUNTING
        select HAVE_KERNEL_BZIP2
+       select HAVE_KERNEL_GZIP
+       select HAVE_KERNEL_LZ4
        select HAVE_KERNEL_LZMA
-       select HAVE_KERNEL_XZ
        select HAVE_KERNEL_LZO
-       select HAVE_KERNEL_LZ4
-       select HAVE_HW_BREAKPOINT
+       select HAVE_KERNEL_XZ
+       select HAVE_KPROBES
+       select HAVE_KPROBES_ON_FTRACE
+       select HAVE_KRETPROBES
+       select HAVE_KVM
+       select HAVE_LIVEPATCH                   if X86_64
+       select HAVE_MEMBLOCK
+       select HAVE_MEMBLOCK_NODE_MAP
        select HAVE_MIXED_BREAKPOINTS_REGS
-       select PERF_EVENTS
+       select HAVE_OPROFILE
+       select HAVE_OPTPROBES
+       select HAVE_PCSPKR_PLATFORM
+       select HAVE_PERF_EVENTS
        select HAVE_PERF_EVENTS_NMI
        select HAVE_PERF_REGS
        select HAVE_PERF_USER_STACK_DUMP
-       select HAVE_DEBUG_KMEMLEAK
-       select ANON_INODES
-       select HAVE_ALIGNED_STRUCT_PAGE if SLUB
-       select HAVE_CMPXCHG_LOCAL
-       select HAVE_CMPXCHG_DOUBLE
-       select HAVE_ARCH_KMEMCHECK
-       select HAVE_ARCH_KASAN if X86_64 && SPARSEMEM_VMEMMAP
+       select HAVE_REGS_AND_STACK_ACCESS_API
+       select HAVE_SYSCALL_TRACEPOINTS
+       select HAVE_UID16                       if X86_32
+       select HAVE_UNSTABLE_SCHED_CLOCK
        select HAVE_USER_RETURN_NOTIFIER
-       select ARCH_HAS_ELF_RANDOMIZE
-       select HAVE_ARCH_JUMP_LABEL
-       select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
-       select SPARSE_IRQ
-       select GENERIC_FIND_FIRST_BIT
-       select GENERIC_IRQ_PROBE
-       select GENERIC_PENDING_IRQ if SMP
-       select GENERIC_IRQ_SHOW
-       select GENERIC_CLOCKEVENTS_MIN_ADJUST
        select IRQ_FORCED_THREADING
-       select HAVE_BPF_JIT if X86_64
-       select HAVE_ARCH_TRANSPARENT_HUGEPAGE
-       select HAVE_ARCH_HUGE_VMAP if X86_64 || X86_PAE
-       select ARCH_HAS_SG_CHAIN
-       select CLKEVT_I8253
-       select ARCH_HAVE_NMI_SAFE_CMPXCHG
-       select GENERIC_IOMAP
-       select DCACHE_WORD_ACCESS
-       select GENERIC_SMP_IDLE_THREAD
-       select ARCH_WANT_IPC_PARSE_VERSION if X86_32
-       select HAVE_ARCH_SECCOMP_FILTER
-       select BUILDTIME_EXTABLE_SORT
-       select GENERIC_CMOS_UPDATE
-       select HAVE_ARCH_SOFT_DIRTY if X86_64
-       select CLOCKSOURCE_WATCHDOG
-       select GENERIC_CLOCKEVENTS
-       select ARCH_CLOCKSOURCE_DATA
-       select CLOCKSOURCE_VALIDATE_LAST_CYCLE
-       select GENERIC_CLOCKEVENTS_BROADCAST if X86_64 || (X86_32 && X86_LOCAL_APIC)
-       select GENERIC_TIME_VSYSCALL
-       select GENERIC_STRNCPY_FROM_USER
-       select GENERIC_STRNLEN_USER
-       select HAVE_CONTEXT_TRACKING if X86_64
-       select HAVE_IRQ_TIME_ACCOUNTING
-       select VIRT_TO_BUS
-       select MODULES_USE_ELF_REL if X86_32
-       select MODULES_USE_ELF_RELA if X86_64
-       select CLONE_BACKWARDS if X86_32
-       select ARCH_USE_BUILTIN_BSWAP
-       select ARCH_USE_QUEUED_SPINLOCKS
-       select ARCH_USE_QUEUED_RWLOCKS
-       select OLD_SIGSUSPEND3 if X86_32 || IA32_EMULATION
-       select OLD_SIGACTION if X86_32
-       select COMPAT_OLD_SIGACTION if IA32_EMULATION
+       select MODULES_USE_ELF_RELA             if X86_64
+       select MODULES_USE_ELF_REL              if X86_32
+       select OLD_SIGACTION                    if X86_32
+       select OLD_SIGSUSPEND3                  if X86_32 || IA32_EMULATION
+       select PERF_EVENTS
        select RTC_LIB
-       select HAVE_DEBUG_STACKOVERFLOW
-       select HAVE_IRQ_EXIT_ON_IRQ_STACK if X86_64
-       select HAVE_CC_STACKPROTECTOR
-       select GENERIC_CPU_AUTOPROBE
-       select HAVE_ARCH_AUDITSYSCALL
-       select ARCH_SUPPORTS_ATOMIC_RMW
-       select HAVE_ACPI_APEI if ACPI
-       select HAVE_ACPI_APEI_NMI if ACPI
-       select ACPI_LEGACY_TABLES_LOOKUP if ACPI
-       select X86_FEATURE_NAMES if PROC_FS
+       select SPARSE_IRQ
        select SRCU
+       select SYSCTL_EXCEPTION_TRACE
+       select USER_STACKTRACE_SUPPORT
+       select VIRT_TO_BUS
+       select X86_DEV_DMA_OPS                  if X86_64
+       select X86_FEATURE_NAMES                if PROC_FS
 
 config INSTRUCTION_DECODER
        def_bool y