Commit 291248fd authored by Karol Swietlicki's avatar Karol Swietlicki Committed by Linus Torvalds
Browse files

uml: remove unused variables in the context switcher



This patch removes a variable which was not used in two functions.  Yet
another code cleanup, nothing really significant.

Please note that I could not test this on x86_64. I don't have the
hardware for it.

[ jdike - Bits of tidying around the affected code.  Also, it's fine on
x86_64 ]

Signed-off-by: default avatarKarol Swietlicki <magotari@gmail.com>
Signed-off-by: default avatarJeff Dike <jdike@linux.intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ab8cda43
Loading
Loading
Loading
Loading
+8 −11
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ static inline void set_current(struct task_struct *task)
		{ external_pid(task), task });
}

extern void arch_switch_to(struct task_struct *from, struct task_struct *to);
extern void arch_switch_to(struct task_struct *to);

void *_switch_to(void *prev, void *next, void *last)
{
@@ -94,10 +94,9 @@ void *_switch_to(void *prev, void *next, void *last)
	do {
		current->thread.saved_task = NULL;

		switch_threads(&from->thread.switch_buf,
			       &to->thread.switch_buf);
		switch_threads(&from->thread.switch_buf, &to->thread.switch_buf);

		arch_switch_to(current->thread.prev_sched, current);
		arch_switch_to(current);

		if (current->thread.saved_task)
			show_regs(&(current->thread.regs));
@@ -161,8 +160,6 @@ void new_thread_handler(void)
void fork_handler(void)
{
	force_flush_all();
	if (current->thread.prev_sched == NULL)
		panic("blech");

	schedule_tail(current->thread.prev_sched);

@@ -171,7 +168,7 @@ void fork_handler(void)
	 * arch_switch_to isn't needed. We could want to apply this to
	 * improve performance. -bb
	 */
	arch_switch_to(current->thread.prev_sched, current);
	arch_switch_to(current);

	current->thread.prev_sched = NULL;

+3 −3
Original line number Diff line number Diff line
@@ -8,11 +8,11 @@
#include "asm/uaccess.h"
#include "skas.h"

extern int arch_switch_tls(struct task_struct *from, struct task_struct *to);
extern int arch_switch_tls(struct task_struct *to);

void arch_switch_to(struct task_struct *from, struct task_struct *to)
void arch_switch_to(struct task_struct *to)
{
	int err = arch_switch_tls(from, to);
	int err = arch_switch_tls(to);
	if (!err)
		return;

+1 −1
Original line number Diff line number Diff line
@@ -172,7 +172,7 @@ void clear_flushed_tls(struct task_struct *task)
 * SKAS patch.
 */

int arch_switch_tls(struct task_struct *from, struct task_struct *to)
int arch_switch_tls(struct task_struct *to)
{
	if (!host_supports_tls)
		return 0;
+1 −1
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ long sys_clone(unsigned long clone_flags, unsigned long newsp,
	return ret;
}

void arch_switch_to(struct task_struct *from, struct task_struct *to)
void arch_switch_to(struct task_struct *to)
{
	if ((to->thread.arch.fs == 0) || (to->mm == NULL))
		return;