Skip to content

Commit

Permalink
um: Remove broken SMP support
Browse files Browse the repository at this point in the history
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: Richard Weinberger <richard@nod.at>
  • Loading branch information
Richard Weinberger committed Apr 13, 2015
1 parent d0b5e15 commit 28fa468
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 366 deletions.
30 changes: 0 additions & 30 deletions arch/um/Kconfig.um
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions arch/um/include/asm/processor-generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
26 changes: 0 additions & 26 deletions arch/um/include/asm/smp.h
Original file line number Diff line number Diff line change
@@ -1,32 +1,6 @@
#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
2 changes: 1 addition & 1 deletion arch/um/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions arch/um/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
11 changes: 0 additions & 11 deletions arch/um/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,17 +259,6 @@ int strlen_user_proc(char __user *str)
return strlen_user(str);
}

int smp_sigio_handler(void)
{
#ifdef CONFIG_SMP
int cpu = current_thread_info()->cpu;
IPI_handler(cpu);
if (cpu != 0)
return 1;
#endif
return 0;
}

int cpu(void)
{
return current_thread_info()->cpu;
Expand Down
4 changes: 1 addition & 3 deletions arch/um/kernel/skas/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ static int __init start_kernel_proc(void *unused)

cpu_tasks[0].pid = pid;
cpu_tasks[0].task = current;
#ifdef CONFIG_SMP
init_cpu_online(get_cpu_mask(0));
#endif

start_kernel();
return 0;
}
Expand Down
238 changes: 0 additions & 238 deletions arch/um/kernel/smp.c

This file was deleted.

Loading

0 comments on commit 28fa468

Please sign in to comment.