Commit 67626fad authored by Heiko Carstens's avatar Heiko Carstens
Browse files

s390: enforce CONFIG_SMP



There never have been distributions that shiped with CONFIG_SMP=n for
s390. In addition the kernel currently doesn't even compile with
CONFIG_SMP=n for s390. Most likely it wouldn't even work, even if we
fix the compile error, since nobody tests it, since there is no use
case that I can think of.
Therefore simply enforce CONFIG_SMP and get rid of some more or
less unused code.

Reviewed-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
parent 753469a2
Loading
Loading
Loading
Loading
+2 −23
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ config GENERIC_BUG_RELATIVE_POINTERS
	def_bool y

config GENERIC_LOCKBREAK
	def_bool y if SMP && PREEMPT
	def_bool y if PREEMPT

config PGSTE
	def_bool y if KVM
@@ -113,7 +113,6 @@ config S390
	select DYNAMIC_FTRACE if FUNCTION_TRACER
	select GENERIC_CLOCKEVENTS
	select GENERIC_CPU_AUTOPROBE
	select GENERIC_CPU_DEVICES if !SMP
	select GENERIC_CPU_VULNERABILITIES
	select GENERIC_FIND_FIRST_BIT
	select GENERIC_SMP_IDLE_THREAD
@@ -399,27 +398,10 @@ config SYSVIPC_COMPAT

config SMP
	def_bool y
	prompt "Symmetric multi-processing support"
	---help---
	  This enables support for systems with more than one CPU. If you have
	  a system with only one CPU, like most personal computers, say N. If
	  you have a system with more than one CPU, say Y.

	  If you say N here, the kernel will run on uni- 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,
	  uniprocessor machines. On a uniprocessor machine, the kernel
	  will run faster if you say N here.

	  See also the SMP-HOWTO available at
	  <http://www.tldp.org/docs.html#howto>.

	  Even if you don't know what to do here, say Y.

config NR_CPUS
	int "Maximum number of CPUs (2-512)"
	range 2 512
	depends on SMP
	default "64"
	help
	  This allows you to specify the maximum number of CPUs which this
@@ -432,7 +414,6 @@ config NR_CPUS
config HOTPLUG_CPU
	def_bool y
	prompt "Support for hot-pluggable CPUs"
	depends on SMP
	help
	  Say Y here to be able to turn CPUs off and on. CPUs
	  can be controlled through /sys/devices/system/cpu/cpu#.
@@ -448,7 +429,7 @@ config NODES_SPAN_OTHER_NODES

config NUMA
	bool "NUMA support"
	depends on SMP && SCHED_TOPOLOGY
	depends on SCHED_TOPOLOGY
	default n
	help
	  Enable NUMA support
@@ -523,7 +504,6 @@ config SCHED_DRAWER
config SCHED_TOPOLOGY
	def_bool y
	prompt "Topology scheduler support"
	depends on SMP
	select SCHED_SMT
	select SCHED_MC
	select SCHED_BOOK
@@ -829,7 +809,6 @@ menu "Dump support"

config CRASH_DUMP
	bool "kernel crash dumps"
	depends on SMP
	select KEXEC
	help
	  Generate crash dump after being started by kexec.
+2 −7
Original line number Diff line number Diff line
@@ -112,13 +112,8 @@ union ctlreg2 {
	};
};

#ifdef CONFIG_SMP
#define ctl_set_bit(cr, bit) smp_ctl_set_bit(cr, bit)
#define ctl_clear_bit(cr, bit) smp_ctl_clear_bit(cr, bit)
#else
# define ctl_set_bit(cr, bit) __ctl_set_bit(cr, bit)
# define ctl_clear_bit(cr, bit) __ctl_clear_bit(cr, bit)
#endif

#endif /* __ASSEMBLY__ */
#endif /* __ASM_CTL_REG_H */
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@
 * per cpu area, use weak definitions to force the compiler to
 * generate external references.
 */
#if defined(CONFIG_SMP) && defined(MODULE)
#if defined(MODULE)
#define ARCH_NEEDS_WEAK_PER_CPU
#endif

+0 −30
Original line number Diff line number Diff line
@@ -9,9 +9,6 @@
#define __ASM_SMP_H

#include <asm/sigp.h>

#ifdef CONFIG_SMP

#include <asm/lowcore.h>

#define raw_smp_processor_id()	(S390_lowcore.cpu_nr)
@@ -40,33 +37,6 @@ extern int smp_cpu_get_polarization(int cpu);
extern void smp_fill_possible_mask(void);
extern void smp_detect_cpus(void);

#else /* CONFIG_SMP */

#define smp_cpu_mtid	0

static inline void smp_call_ipl_cpu(void (*func)(void *), void *data)
{
	func(data);
}

static inline void smp_call_online_cpu(void (*func)(void *), void *data)
{
	func(data);
}

static inline void smp_emergency_stop(void)
{
}

static inline int smp_find_processor_id(u16 address) { return 0; }
static inline int smp_store_status(int cpu) { return 0; }
static inline int smp_vcpu_scheduled(int cpu) { return 1; }
static inline void smp_yield_cpu(int cpu) { }
static inline void smp_fill_possible_mask(void) { }
static inline void smp_detect_cpus(void) { }

#endif /* CONFIG_SMP */

static inline void smp_stop_cpu(void)
{
	u16 pcpu = stap();
+0 −4
Original line number Diff line number Diff line
@@ -20,11 +20,7 @@

extern int spin_retry;

#ifndef CONFIG_SMP
static inline bool arch_vcpu_is_preempted(int cpu) { return false; }
#else
bool arch_vcpu_is_preempted(int cpu);
#endif

#define vcpu_is_preempted arch_vcpu_is_preempted

Loading