Commit | Line | Data |
---|---|---|
0d1fb0a4 | 1 | // SPDX-License-Identifier: GPL-2.0 |
1d3468a6 | 2 | /* |
ba180fd4 | 3 | * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) |
1da177e4 LT |
4 | */ |
5 | ||
73395a00 AV |
6 | #include <linux/stddef.h> |
7 | #include <linux/module.h> | |
8 | #include <linux/fs.h> | |
9 | #include <linux/ptrace.h> | |
589ee628 | 10 | #include <linux/sched/mm.h> |
29930025 | 11 | #include <linux/sched/task.h> |
68db0cf1 | 12 | #include <linux/sched/task_stack.h> |
73395a00 AV |
13 | #include <linux/slab.h> |
14 | #include <asm/current.h> | |
15 | #include <asm/processor.h> | |
7c0f6ba6 | 16 | #include <linux/uaccess.h> |
37185b33 AV |
17 | #include <as-layout.h> |
18 | #include <mem_user.h> | |
dbba7f70 | 19 | #include <registers.h> |
37185b33 AV |
20 | #include <skas.h> |
21 | #include <os.h> | |
1da177e4 LT |
22 | |
23 | void flush_thread(void) | |
24 | { | |
aa6758d4 | 25 | arch_flush_thread(¤t->thread.arch); |
77bf4400 | 26 | |
9436d5c3 AV |
27 | get_safe_registers(current_pt_regs()->regs.gp, |
28 | current_pt_regs()->regs.fp); | |
77bf4400 | 29 | |
6c738ffa | 30 | __switch_mm(¤t->mm->context.id); |
1da177e4 LT |
31 | } |
32 | ||
33 | void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp) | |
34 | { | |
77bf4400 JD |
35 | PT_REGS_IP(regs) = eip; |
36 | PT_REGS_SP(regs) = esp; | |
c200e4bb | 37 | clear_thread_flag(TIF_SINGLESTEP); |
1da177e4 | 38 | } |
42459792 | 39 | EXPORT_SYMBOL(start_thread); |