linux-um archives
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: linux-kernel@vger.kernel.org
Cc: user-mode-linux-devel@lists.sourceforge.net,
	toralf.foerster@gmx.de, Richard Weinberger <richard@nod.at>
Subject: [PATCH 2/2] um: Use asm-generic/switch_to.h
Date: Thu, 29 Mar 2012 19:18:50 +0200	[thread overview]
Message-ID: <1333041530-2998-2-git-send-email-richard@nod.at> (raw)
In-Reply-To: <1333041530-2998-1-git-send-email-richard@nod.at>

Signed-off-by: Richard Weinberger <richard@nod.at>
---
 arch/um/include/asm/Kbuild  |    1 +
 arch/um/kernel/process.c    |    6 +-----
 arch/x86/um/asm/switch_to.h |    7 -------
 3 files changed, 2 insertions(+), 12 deletions(-)
 delete mode 100644 arch/x86/um/asm/switch_to.h

diff --git a/arch/um/include/asm/Kbuild b/arch/um/include/asm/Kbuild
index bb5d6e6..fff2435 100644
--- a/arch/um/include/asm/Kbuild
+++ b/arch/um/include/asm/Kbuild
@@ -1,3 +1,4 @@
 generic-y += bug.h cputime.h device.h emergency-restart.h futex.h hardirq.h
 generic-y += hw_irq.h irq_regs.h kdebug.h percpu.h sections.h topology.h xor.h
 generic-y += ftrace.h pci.h io.h param.h delay.h mutex.h current.h exec.h
+generic-y += switch_to.h
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
index f386d04..2b73ded 100644
--- a/arch/um/kernel/process.c
+++ b/arch/um/kernel/process.c
@@ -88,11 +88,8 @@ static inline void set_current(struct task_struct *task)
 
 extern void arch_switch_to(struct task_struct *to);
 
-void *_switch_to(void *prev, void *next, void *last)
+void *__switch_to(struct task_struct *from, struct task_struct *to)
 {
-	struct task_struct *from = prev;
-	struct task_struct *to = next;
-
 	to->thread.prev_sched = from;
 	set_current(to);
 
@@ -111,7 +108,6 @@ void *_switch_to(void *prev, void *next, void *last)
 	} while (current->thread.saved_task);
 
 	return current->thread.prev_sched;
-
 }
 
 void interrupt_end(void)
diff --git a/arch/x86/um/asm/switch_to.h b/arch/x86/um/asm/switch_to.h
deleted file mode 100644
index cf97d20..0000000
--- a/arch/x86/um/asm/switch_to.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _ASM_UM_SWITCH_TO_H_
-#define _ASM_UM_SWITCH_TO_H_
-
-extern void *_switch_to(void *prev, void *next, void *last);
-#define switch_to(prev, next, last) prev = _switch_to(prev, next, last)
-
-#endif
-- 
1.7.7.3


  reply	other threads:[~2012-03-29 17:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-29 17:18 [PATCH 1/2] um: Disintegrate asm/system.h Richard Weinberger
2012-03-29 17:18 ` Richard Weinberger [this message]
2012-03-30  8:17 ` [uml-devel] " Toralf Förster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1333041530-2998-2-git-send-email-richard@nod.at \
    --to=richard@nod.at \
    --cc=linux-kernel@vger.kernel.org \
    --cc=toralf.foerster@gmx.de \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox