Skip to content

Commit 28fa468

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: Richard Weinberger <[email protected]>
1 parent d0b5e15 commit 28fa468

File tree

10 files changed

+2
-366
lines changed

10 files changed

+2
-366
lines changed

arch/um/Kconfig.um

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -95,36 +95,6 @@ config MAGIC_SYSRQ
9595
The keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
9696
unless you really know what this hack does.
9797

98-
config SMP
99-
bool "Symmetric multi-processing support"
100-
default n
101-
depends on BROKEN
102-
help
103-
This option enables UML SMP support.
104-
It is NOT related to having a real SMP box. Not directly, at least.
105-
106-
UML implements virtual SMP by allowing as many processes to run
107-
simultaneously on the host as there are virtual processors configured.
108-
109-
Obviously, if the host is a uniprocessor, those processes will
110-
timeshare, but, inside UML, will appear to be running simultaneously.
111-
If the host is a multiprocessor, then UML processes may run
112-
simultaneously, depending on the host scheduler.
113-
114-
This, however, is supported only in TT mode. So, if you use the SKAS
115-
patch on your host, switching to TT mode and enabling SMP usually
116-
gives you worse performances.
117-
Also, since the support for SMP has been under-developed, there could
118-
be some bugs being exposed by enabling SMP.
119-
120-
If you don't know what to do, say N.
121-
122-
config NR_CPUS
123-
int "Maximum number of CPUs (2-32)"
124-
range 2 32
125-
depends on SMP
126-
default "32"
127-
12898
config HIGHMEM
12999
bool "Highmem support"
130100
depends on !64BIT && BROKEN

arch/um/include/asm/processor-generic.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,8 @@ struct cpuinfo_um {
9898

9999
extern struct cpuinfo_um boot_cpu_data;
100100

101-
#define my_cpu_data cpu_data[smp_processor_id()]
102-
103-
#ifdef CONFIG_SMP
104-
extern struct cpuinfo_um cpu_data[];
105-
#define current_cpu_data cpu_data[smp_processor_id()]
106-
#else
107101
#define cpu_data (&boot_cpu_data)
108102
#define current_cpu_data boot_cpu_data
109-
#endif
110-
111103

112104
#define KSTK_REG(tsk, reg) get_thread_reg(reg, &tsk->thread.switch_buf)
113105
extern unsigned long get_wchan(struct task_struct *p);

arch/um/include/asm/smp.h

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,6 @@
11
#ifndef __UM_SMP_H
22
#define __UM_SMP_H
33

4-
#ifdef CONFIG_SMP
5-
6-
#include <linux/bitops.h>
7-
#include <asm/current.h>
8-
#include <linux/cpumask.h>
9-
10-
#define raw_smp_processor_id() (current_thread->cpu)
11-
12-
#define cpu_logical_map(n) (n)
13-
#define cpu_number_map(n) (n)
14-
extern int hard_smp_processor_id(void);
15-
#define NO_PROC_ID -1
16-
17-
extern int ncpus;
18-
19-
20-
static inline void smp_cpus_done(unsigned int maxcpus)
21-
{
22-
}
23-
24-
extern struct task_struct *idle_threads[NR_CPUS];
25-
26-
#else
27-
284
#define hard_smp_processor_id() 0
295

306
#endif
31-
32-
#endif

arch/um/kernel/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ clean-files :=
1212

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

1818
obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o

arch/um/kernel/irq.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ void sigio_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs)
3535
struct irq_fd *irq_fd;
3636
int n;
3737

38-
if (smp_sigio_handler())
39-
return;
40-
4138
while (1) {
4239
n = os_waiting_for_events(active_fds);
4340
if (n <= 0) {

arch/um/kernel/process.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -259,17 +259,6 @@ int strlen_user_proc(char __user *str)
259259
return strlen_user(str);
260260
}
261261

262-
int smp_sigio_handler(void)
263-
{
264-
#ifdef CONFIG_SMP
265-
int cpu = current_thread_info()->cpu;
266-
IPI_handler(cpu);
267-
if (cpu != 0)
268-
return 1;
269-
#endif
270-
return 0;
271-
}
272-
273262
int cpu(void)
274263
{
275264
return current_thread_info()->cpu;

arch/um/kernel/skas/process.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ static int __init start_kernel_proc(void *unused)
2121

2222
cpu_tasks[0].pid = pid;
2323
cpu_tasks[0].task = current;
24-
#ifdef CONFIG_SMP
25-
init_cpu_online(get_cpu_mask(0));
26-
#endif
24+
2725
start_kernel();
2826
return 0;
2927
}

arch/um/kernel/smp.c

Lines changed: 0 additions & 238 deletions
This file was deleted.

0 commit comments

Comments
 (0)