Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fed7c3f0 authored by Denys Vlasenko's avatar Denys Vlasenko Committed by Ingo Molnar
Browse files

x86/entry: Remove unused 'kernel_stack' per-cpu variable



Signed-off-by: default avatarDenys Vlasenko <dvlasenk@redhat.com>
Acked-by: default avatarAndy Lutomirski <luto@kernel.org>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Borislav Petkov <bp@alien8.de>
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: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Drewry <wad@chromium.org>
Link: http://lkml.kernel.org/r/1429889495-27850-2-git-send-email-dvlasenk@redhat.com


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 63332a84
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -177,8 +177,6 @@ struct thread_info {
 */
#ifndef __ASSEMBLY__

DECLARE_PER_CPU(unsigned long, kernel_stack);

static inline struct thread_info *current_thread_info(void)
{
	return (struct thread_info *)(current_top_of_stack() - THREAD_SIZE);
+0 −4
Original line number Diff line number Diff line
@@ -1155,10 +1155,6 @@ static __init int setup_disablecpuid(char *arg)
}
__setup("clearcpuid=", setup_disablecpuid);

DEFINE_PER_CPU(unsigned long, kernel_stack) =
	(unsigned long)&init_thread_union + THREAD_SIZE;
EXPORT_PER_CPU_SYMBOL(kernel_stack);

#ifdef CONFIG_X86_64
struct desc_ptr idt_descr = { NR_VECTORS * 16 - 1, (unsigned long) idt_table };
struct desc_ptr debug_idt_descr = { NR_VECTORS * 16 - 1,
+1 −4
Original line number Diff line number Diff line
@@ -302,13 +302,10 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
	arch_end_context_switch(next_p);

	/*
	 * Reload esp0, kernel_stack, and current_top_of_stack.  This changes
	 * Reload esp0 and cpu_current_top_of_stack.  This changes
	 * current_thread_info().
	 */
	load_sp0(tss, next);
	this_cpu_write(kernel_stack,
		       (unsigned long)task_stack_page(next_p) +
		       THREAD_SIZE);
	this_cpu_write(cpu_current_top_of_stack,
		       (unsigned long)task_stack_page(next_p) +
		       THREAD_SIZE);
+0 −3
Original line number Diff line number Diff line
@@ -409,9 +409,6 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
	/* Reload esp0 and ss1.  This changes current_thread_info(). */
	load_sp0(tss, next);

	this_cpu_write(kernel_stack,
		(unsigned long)task_stack_page(next_p) + THREAD_SIZE);

	/*
	 * Now maybe reload the debug registers and handle I/O bitmaps
	 */
+0 −2
Original line number Diff line number Diff line
@@ -792,8 +792,6 @@ void common_cpu_up(unsigned int cpu, struct task_struct *idle)
	clear_tsk_thread_flag(idle, TIF_FORK);
	initial_gs = per_cpu_offset(cpu);
#endif
	per_cpu(kernel_stack, cpu) =
		(unsigned long)task_stack_page(idle) + THREAD_SIZE;
}

/*