arm64: force CONFIG_SMP=y and remove redundant #ifdefs
authorWill Deacon <will.deacon@arm.com>
Fri, 29 May 2015 17:28:44 +0000 (18:28 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 27 Jul 2015 10:08:40 +0000 (11:08 +0100)
Nobody seems to be producing !SMP systems anymore, so this is just
becoming a source of kernel bugs, particularly if people want to use
coherent DMA with non-shared pages.

This patch forces CONFIG_SMP=y for arm64, removing a modest amount of
code in the process.

Signed-off-by: Will Deacon <will.deacon@arm.com>
22 files changed:
arch/arm64/Kconfig
arch/arm64/include/asm/assembler.h
arch/arm64/include/asm/barrier.h
arch/arm64/include/asm/hardirq.h
arch/arm64/include/asm/irq_work.h
arch/arm64/include/asm/percpu.h
arch/arm64/include/asm/pgtable.h
arch/arm64/include/asm/ptrace.h
arch/arm64/include/asm/smp.h
arch/arm64/include/asm/topology.h
arch/arm64/kernel/Makefile
arch/arm64/kernel/cpu_ops.c
arch/arm64/kernel/head.S
arch/arm64/kernel/irq.c
arch/arm64/kernel/psci.c
arch/arm64/kernel/setup.c
arch/arm64/kernel/sleep.S
arch/arm64/kernel/time.c
arch/arm64/kernel/traps.c
arch/arm64/mm/context.c
arch/arm64/mm/flush.c
arch/arm64/mm/proc.S

index 40f717f..de8dee6 100644 (file)
@@ -28,7 +28,7 @@ config ARM64
        select EDAC_SUPPORT
        select GENERIC_ALLOCATOR
        select GENERIC_CLOCKEVENTS
-       select GENERIC_CLOCKEVENTS_BROADCAST if SMP
+       select GENERIC_CLOCKEVENTS_BROADCAST
        select GENERIC_CPU_AUTOPROBE
        select GENERIC_EARLY_IOREMAP
        select GENERIC_IRQ_PROBE
@@ -137,6 +137,9 @@ config NEED_DMA_MAP_STATE
 config NEED_SG_DMA_LENGTH
        def_bool y
 
+config SMP
+       def_bool y
+
 config SWIOTLB
        def_bool y
 
@@ -491,22 +494,8 @@ config CPU_BIG_ENDIAN
        help
          Say Y if you plan on running a kernel in big-endian mode.
 
-config SMP
-       bool "Symmetric Multi-Processing"
-       help
-         This enables support for systems with more than one CPU.  If
-         you say N here, the kernel will run on single and
-         multiprocessor machines, but will use only one CPU of a
-         multiprocessor machine. If you say Y here, the kernel will run
-         on many, but not all, single processor machines. On a single
-         processor machine, the kernel will run faster if you say N
-         here.
-
-         If you don't know what to do here, say N.
-
 config SCHED_MC
        bool "Multi-core scheduler support"
-       depends on SMP
        help
          Multi-core scheduler support improves the CPU scheduler's decision
          making when dealing with multi-core CPU chips at a cost of slightly
@@ -514,7 +503,6 @@ config SCHED_MC
 
 config SCHED_SMT
        bool "SMT scheduler support"
-       depends on SMP
        help
          Improves the CPU scheduler's decision making when dealing with
          MultiThreading at a cost of slightly increased overhead in some
@@ -523,23 +511,17 @@ config SCHED_SMT
 config NR_CPUS
        int "Maximum number of CPUs (2-4096)"
        range 2 4096
-       depends on SMP
        # These have to remain sorted largest to smallest
        default "64"
 
 config HOTPLUG_CPU
        bool "Support for hot-pluggable CPUs"
-       depends on SMP
        help
          Say Y here to experiment with turning CPUs off and on.  CPUs
          can be controlled through /sys/devices/system/cpu.
 
 source kernel/Kconfig.preempt
 
-config UP_LATE_INIT
-       def_bool y
-       depends on !SMP
-
 config HZ
        int
        default 100
index e10516b..b51f2cc 100644 (file)
@@ -91,9 +91,7 @@
  * SMP data memory barrier
  */
        .macro  smp_dmb, opt
-#ifdef CONFIG_SMP
        dmb     \opt
-#endif
        .endm
 
 #define USER(l, x...)                          \
index 0fa47c4..624f967 100644 (file)
 #define dma_rmb()      dmb(oshld)
 #define dma_wmb()      dmb(oshst)
 
-#ifndef CONFIG_SMP
-#define smp_mb()       barrier()
-#define smp_rmb()      barrier()
-#define smp_wmb()      barrier()
-
-#define smp_store_release(p, v)                                                \
-do {                                                                   \
-       compiletime_assert_atomic_type(*p);                             \
-       barrier();                                                      \
-       ACCESS_ONCE(*p) = (v);                                          \
-} while (0)
-
-#define smp_load_acquire(p)                                            \
-({                                                                     \
-       typeof(*p) ___p1 = ACCESS_ONCE(*p);                             \
-       compiletime_assert_atomic_type(*p);                             \
-       barrier();                                                      \
-       ___p1;                                                          \
-})
-
-#else
-
 #define smp_mb()       dmb(ish)
 #define smp_rmb()      dmb(ishld)
 #define smp_wmb()      dmb(ishst)
@@ -109,8 +87,6 @@ do {                                                                 \
        ___p1;                                                          \
 })
 
-#endif
-
 #define read_barrier_depends()         do { } while(0)
 #define smp_read_barrier_depends()     do { } while(0)
 
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge