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

Commit 28fa468f authored by Richard Weinberger's avatar Richard Weinberger
Browse files

um: Remove broken SMP support



At times where UML used the TT mode to operate it had
kind of SMP support. It never got finished nor was
stable.
Let's rip out that cruft and stop confusing developers
which do tree-wide SMP cleanups.

If someone wants SMP support UML it has do be done from scratch.

Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent d0b5e15f
Loading
Loading
Loading
Loading
+0 −30
Original line number Diff line number Diff line
@@ -95,36 +95,6 @@ config MAGIC_SYSRQ
	  The keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
	  unless you really know what this hack does.

config SMP
	bool "Symmetric multi-processing support"
	default n
	depends on BROKEN
	help
	  This option enables UML SMP support.
	  It is NOT related to having a real SMP box. Not directly, at least.

	  UML implements virtual SMP by allowing as many processes to run
	  simultaneously on the host as there are virtual processors configured.

	  Obviously, if the host is a uniprocessor, those processes will
	  timeshare, but, inside UML, will appear to be running simultaneously.
	  If the host is a multiprocessor, then UML processes may run
	  simultaneously, depending on the host scheduler.

	  This, however, is supported only in TT mode. So, if you use the SKAS
	  patch on your host, switching to TT mode and enabling SMP usually
	  gives	you worse performances.
	  Also, since the support for SMP has been under-developed, there could
	  be some bugs being exposed by enabling SMP.

	  If you don't know what to do, say N.

config NR_CPUS
	int "Maximum number of CPUs (2-32)"
	range 2 32
	depends on SMP
	default "32"

config HIGHMEM
	bool "Highmem support"
	depends on !64BIT && BROKEN
+0 −8
Original line number Diff line number Diff line
@@ -98,16 +98,8 @@ struct cpuinfo_um {

extern struct cpuinfo_um boot_cpu_data;

#define my_cpu_data		cpu_data[smp_processor_id()]

#ifdef CONFIG_SMP
extern struct cpuinfo_um cpu_data[];
#define current_cpu_data cpu_data[smp_processor_id()]
#else
#define cpu_data (&boot_cpu_data)
#define current_cpu_data boot_cpu_data
#endif


#define KSTK_REG(tsk, reg) get_thread_reg(reg, &tsk->thread.switch_buf)
extern unsigned long get_wchan(struct task_struct *p);
+0 −26
Original line number Diff line number Diff line
#ifndef __UM_SMP_H
#define __UM_SMP_H

#ifdef CONFIG_SMP

#include <linux/bitops.h>
#include <asm/current.h>
#include <linux/cpumask.h>

#define raw_smp_processor_id() (current_thread->cpu)

#define cpu_logical_map(n) (n)
#define cpu_number_map(n) (n)
extern int hard_smp_processor_id(void);
#define NO_PROC_ID -1

extern int ncpus;


static inline void smp_cpus_done(unsigned int maxcpus)
{
}

extern struct task_struct *idle_threads[NR_CPUS];

#else

#define hard_smp_processor_id()		0

#endif

#endif
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ clean-files :=

obj-y = config.o exec.o exitcode.o irq.o ksyms.o mem.o \
	physmem.o process.o ptrace.o reboot.o sigio.o \
	signal.o smp.o syscall.o sysrq.o time.o tlb.o trap.o \
	signal.o syscall.o sysrq.o time.o tlb.o trap.o \
	um_arch.o umid.o maccess.o skas/

obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o
+0 −3
Original line number Diff line number Diff line
@@ -35,9 +35,6 @@ void sigio_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs)
	struct irq_fd *irq_fd;
	int n;

	if (smp_sigio_handler())
		return;

	while (1) {
		n = os_waiting_for_events(active_fds);
		if (n <= 0) {
Loading