x86/asm/entry/64: Remove thread_struct::usersp
Nothing uses thread_struct::usersp anymore, so remove it. Originally-from: Denys Vlasenko <dvlasenk@redhat.com> Tested-by: Borislav Petkov <bp@alien8.de> Acked-by: Borislav Petkov <bp@alien8.de> Cc: Alexei Starovoitov <ast@plumgrid.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Kees Cook <keescook@chromium.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Will Drewry <wad@chromium.org> Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
@@ -493,7 +493,6 @@ struct thread_struct {
|
|||||||
#ifdef CONFIG_X86_32
|
#ifdef CONFIG_X86_32
|
||||||
unsigned long sysenter_cs;
|
unsigned long sysenter_cs;
|
||||||
#else
|
#else
|
||||||
unsigned long usersp; /* Copy from PDA */
|
|
||||||
unsigned short es;
|
unsigned short es;
|
||||||
unsigned short ds;
|
unsigned short ds;
|
||||||
unsigned short fsindex;
|
unsigned short fsindex;
|
||||||
|
|||||||
@@ -161,7 +161,6 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
|
|||||||
p->thread.sp0 = (unsigned long)task_stack_page(p) + THREAD_SIZE;
|
p->thread.sp0 = (unsigned long)task_stack_page(p) + THREAD_SIZE;
|
||||||
childregs = task_pt_regs(p);
|
childregs = task_pt_regs(p);
|
||||||
p->thread.sp = (unsigned long) childregs;
|
p->thread.sp = (unsigned long) childregs;
|
||||||
p->thread.usersp = me->thread.usersp;
|
|
||||||
set_tsk_thread_flag(p, TIF_FORK);
|
set_tsk_thread_flag(p, TIF_FORK);
|
||||||
p->thread.io_bitmap_ptr = NULL;
|
p->thread.io_bitmap_ptr = NULL;
|
||||||
|
|
||||||
@@ -235,7 +234,6 @@ start_thread_common(struct pt_regs *regs, unsigned long new_ip,
|
|||||||
loadsegment(es, _ds);
|
loadsegment(es, _ds);
|
||||||
loadsegment(ds, _ds);
|
loadsegment(ds, _ds);
|
||||||
load_gs_index(0);
|
load_gs_index(0);
|
||||||
current->thread.usersp = new_sp;
|
|
||||||
regs->ip = new_ip;
|
regs->ip = new_ip;
|
||||||
regs->sp = new_sp;
|
regs->sp = new_sp;
|
||||||
regs->cs = _cs;
|
regs->cs = _cs;
|
||||||
@@ -397,7 +395,6 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
|
|||||||
/*
|
/*
|
||||||
* Switch the PDA and FPU contexts.
|
* Switch the PDA and FPU contexts.
|
||||||
*/
|
*/
|
||||||
prev->usersp = this_cpu_read(old_rsp);
|
|
||||||
this_cpu_write(current_task, next_p);
|
this_cpu_write(current_task, next_p);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user