mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 13:43:00 +07:00
28fa468f53
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>
53 lines
990 B
C
53 lines
990 B
C
/*
|
|
* Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
|
|
* Licensed under the GPL
|
|
*/
|
|
|
|
#include <linux/init.h>
|
|
#include <linux/sched.h>
|
|
#include <as-layout.h>
|
|
#include <kern.h>
|
|
#include <os.h>
|
|
#include <skas.h>
|
|
|
|
extern void start_kernel(void);
|
|
|
|
static int __init start_kernel_proc(void *unused)
|
|
{
|
|
int pid;
|
|
|
|
block_signals();
|
|
pid = os_getpid();
|
|
|
|
cpu_tasks[0].pid = pid;
|
|
cpu_tasks[0].task = current;
|
|
|
|
start_kernel();
|
|
return 0;
|
|
}
|
|
|
|
extern int userspace_pid[];
|
|
|
|
extern char cpu0_irqstack[];
|
|
|
|
int __init start_uml(void)
|
|
{
|
|
stack_protections((unsigned long) &cpu0_irqstack);
|
|
set_sigstack(cpu0_irqstack, THREAD_SIZE);
|
|
|
|
init_new_thread_signals();
|
|
|
|
init_task.thread.request.u.thread.proc = start_kernel_proc;
|
|
init_task.thread.request.u.thread.arg = NULL;
|
|
return start_idle_thread(task_stack_page(&init_task),
|
|
&init_task.thread.switch_buf);
|
|
}
|
|
|
|
unsigned long current_stub_stack(void)
|
|
{
|
|
if (current->mm == NULL)
|
|
return 0;
|
|
|
|
return current->mm->context.id.stack;
|
|
}
|