Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b3dc967 authored by Will Deacon's avatar Will Deacon
Browse files

arm64: force CONFIG_SMP=y and remove redundant #ifdefs



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: default avatarWill Deacon <will.deacon@arm.com>
parent 52da443e
Loading
Loading
Loading
Loading
+4 −22
Original line number Diff line number Diff line
@@ -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
+0 −2
Original line number Diff line number Diff line
@@ -91,9 +91,7 @@
 * SMP data memory barrier
 */
	.macro	smp_dmb, opt
#ifdef CONFIG_SMP
	dmb	\opt
#endif
	.endm

#define USER(l, x...)				\
+0 −24
Original line number Diff line number Diff line
@@ -35,28 +35,6 @@
#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)

+0 −4
Original line number Diff line number Diff line
@@ -24,9 +24,7 @@

typedef struct {
	unsigned int __softirq_pending;
#ifdef CONFIG_SMP
	unsigned int ipi_irqs[NR_IPI];
#endif
} ____cacheline_aligned irq_cpustat_t;

#include <linux/irq_cpustat.h>	/* Standard mappings for irq_cpustat_t above */
@@ -34,10 +32,8 @@ typedef struct {
#define __inc_irq_stat(cpu, member)	__IRQ_STAT(cpu, member)++
#define __get_irq_stat(cpu, member)	__IRQ_STAT(cpu, member)

#ifdef CONFIG_SMP
u64 smp_irq_stat_cpu(unsigned int cpu);
#define arch_irq_stat_cpu	smp_irq_stat_cpu
#endif

#define __ARCH_IRQ_EXIT_IRQS_DISABLED	1

+0 −11
Original line number Diff line number Diff line
#ifndef __ASM_IRQ_WORK_H
#define __ASM_IRQ_WORK_H

#ifdef CONFIG_SMP

#include <asm/smp.h>

static inline bool arch_irq_work_has_interrupt(void)
@@ -10,13 +8,4 @@ static inline bool arch_irq_work_has_interrupt(void)
	return !!__smp_cross_call;
}

#else

static inline bool arch_irq_work_has_interrupt(void)
{
	return false;
}

#endif

#endif /* __ASM_IRQ_WORK_H */
Loading