* [uml-devel] [PATCH 2/4] UML - Remove unused variables in the context switcher
@ 2007-11-14 19:20 ` Jeff Dike
0 siblings, 0 replies; 6+ messages in thread
From: Jeff Dike @ 2007-11-14 19:20 UTC (permalink / raw)
To: Andrew Morton; +Cc: LKML, uml-devel, Karol Swietlicki
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: Karol Swietlicki <magotari@gmail.com>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
---
arch/um/kernel/process.c | 19 ++++++++-----------
arch/um/sys-i386/ptrace.c | 6 +++---
arch/um/sys-i386/tls.c | 2 +-
arch/um/sys-x86_64/syscalls.c | 2 +-
4 files changed, 13 insertions(+), 16 deletions(-)
Index: linux-2.6.22/arch/um/kernel/process.c
===================================================================
--- linux-2.6.22.orig/arch/um/kernel/process.c 2007-11-14 13:29:51.000000000 -0500
+++ linux-2.6.22/arch/um/kernel/process.c 2007-11-14 13:38:36.000000000 -0500
@@ -82,12 +82,12 @@ static inline void set_current(struct ta
{ 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)
{
struct task_struct *from = prev;
- struct task_struct *to= next;
+ struct task_struct *to = next;
to->thread.prev_sched = from;
set_current(to);
@@ -95,16 +95,15 @@ void *_switch_to(void *prev, void *next,
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));
- next= current->thread.saved_task;
- prev= current;
- } while(current->thread.saved_task);
+ next = current->thread.saved_task;
+ prev = current;
+ } while (current->thread.saved_task);
return current->thread.prev_sched;
@@ -162,8 +161,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);
@@ -172,7 +169,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;
Index: linux-2.6.22/arch/um/sys-i386/ptrace.c
===================================================================
--- linux-2.6.22.orig/arch/um/sys-i386/ptrace.c 2007-11-14 13:29:51.000000000 -0500
+++ linux-2.6.22/arch/um/sys-i386/ptrace.c 2007-11-14 13:37:30.000000000 -0500
@@ -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;
Index: linux-2.6.22/arch/um/sys-i386/tls.c
===================================================================
--- linux-2.6.22.orig/arch/um/sys-i386/tls.c 2007-11-14 13:29:51.000000000 -0500
+++ linux-2.6.22/arch/um/sys-i386/tls.c 2007-11-14 13:37:30.000000000 -0500
@@ -172,7 +172,7 @@ void clear_flushed_tls(struct task_struc
* 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;
Index: linux-2.6.22/arch/um/sys-x86_64/syscalls.c
===================================================================
--- linux-2.6.22.orig/arch/um/sys-x86_64/syscalls.c 2007-11-14 13:29:51.000000000 -0500
+++ linux-2.6.22/arch/um/sys-x86_64/syscalls.c 2007-11-14 13:37:30.000000000 -0500
@@ -105,7 +105,7 @@ long sys_clone(unsigned long clone_flags
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;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/4] UML - Remove unused variables in the context switcher
@ 2007-11-14 19:20 ` Jeff Dike
0 siblings, 0 replies; 6+ messages in thread
From: Jeff Dike @ 2007-11-14 19:20 UTC (permalink / raw)
To: Andrew Morton; +Cc: LKML, uml-devel, Karol Swietlicki
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: Karol Swietlicki <magotari@gmail.com>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
---
arch/um/kernel/process.c | 19 ++++++++-----------
arch/um/sys-i386/ptrace.c | 6 +++---
arch/um/sys-i386/tls.c | 2 +-
arch/um/sys-x86_64/syscalls.c | 2 +-
4 files changed, 13 insertions(+), 16 deletions(-)
Index: linux-2.6.22/arch/um/kernel/process.c
===================================================================
--- linux-2.6.22.orig/arch/um/kernel/process.c 2007-11-14 13:29:51.000000000 -0500
+++ linux-2.6.22/arch/um/kernel/process.c 2007-11-14 13:38:36.000000000 -0500
@@ -82,12 +82,12 @@ static inline void set_current(struct ta
{ 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)
{
struct task_struct *from = prev;
- struct task_struct *to= next;
+ struct task_struct *to = next;
to->thread.prev_sched = from;
set_current(to);
@@ -95,16 +95,15 @@ void *_switch_to(void *prev, void *next,
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));
- next= current->thread.saved_task;
- prev= current;
- } while(current->thread.saved_task);
+ next = current->thread.saved_task;
+ prev = current;
+ } while (current->thread.saved_task);
return current->thread.prev_sched;
@@ -162,8 +161,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);
@@ -172,7 +169,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;
Index: linux-2.6.22/arch/um/sys-i386/ptrace.c
===================================================================
--- linux-2.6.22.orig/arch/um/sys-i386/ptrace.c 2007-11-14 13:29:51.000000000 -0500
+++ linux-2.6.22/arch/um/sys-i386/ptrace.c 2007-11-14 13:37:30.000000000 -0500
@@ -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;
Index: linux-2.6.22/arch/um/sys-i386/tls.c
===================================================================
--- linux-2.6.22.orig/arch/um/sys-i386/tls.c 2007-11-14 13:29:51.000000000 -0500
+++ linux-2.6.22/arch/um/sys-i386/tls.c 2007-11-14 13:37:30.000000000 -0500
@@ -172,7 +172,7 @@ void clear_flushed_tls(struct task_struc
* 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;
Index: linux-2.6.22/arch/um/sys-x86_64/syscalls.c
===================================================================
--- linux-2.6.22.orig/arch/um/sys-x86_64/syscalls.c 2007-11-14 13:29:51.000000000 -0500
+++ linux-2.6.22/arch/um/sys-x86_64/syscalls.c 2007-11-14 13:37:30.000000000 -0500
@@ -105,7 +105,7 @@ long sys_clone(unsigned long clone_flags
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;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [uml-devel] [PATCH 2/4] UML - Remove unused variables in the context switcher
2007-11-14 19:20 ` Jeff Dike
@ 2007-11-16 0:15 ` Andrew Morton
-1 siblings, 0 replies; 6+ messages in thread
From: Andrew Morton @ 2007-11-16 0:15 UTC (permalink / raw)
To: Jeff Dike; +Cc: linux-kernel, user-mode-linux-devel, magotari
On Wed, 14 Nov 2007 14:20:49 -0500
Jeff Dike <jdike@addtoit.com> wrote:
> 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: Karol Swietlicki <magotari@gmail.com>
> Signed-off-by: Jeff Dike <jdike@linux.intel.com>
I assumed from the above that Karol was the author of this patch. Please
let me know if that was wrong.
We communicate authorship by putting a From: line at the very start of the
changelog. If that line is not present then we use the From: from the
email headers.
Thanks.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/4] UML - Remove unused variables in the context switcher
@ 2007-11-16 0:15 ` Andrew Morton
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Morton @ 2007-11-16 0:15 UTC (permalink / raw)
To: Jeff Dike; +Cc: linux-kernel, user-mode-linux-devel, magotari
On Wed, 14 Nov 2007 14:20:49 -0500
Jeff Dike <jdike@addtoit.com> wrote:
> 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: Karol Swietlicki <magotari@gmail.com>
> Signed-off-by: Jeff Dike <jdike@linux.intel.com>
I assumed from the above that Karol was the author of this patch. Please
let me know if that was wrong.
We communicate authorship by putting a From: line at the very start of the
changelog. If that line is not present then we use the From: from the
email headers.
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [uml-devel] [PATCH 2/4] UML - Remove unused variables in the context switcher
2007-11-16 0:15 ` Andrew Morton
@ 2007-11-16 3:25 ` Jeff Dike
-1 siblings, 0 replies; 6+ messages in thread
From: Jeff Dike @ 2007-11-16 3:25 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, user-mode-linux-devel, magotari
On Thu, Nov 15, 2007 at 04:15:21PM -0800, Andrew Morton wrote:
> I assumed from the above that Karol was the author of this patch. Please
> let me know if that was wrong.
He is - I forgot the From line...
Jeff
--
Work email - jdike at linux dot intel dot com
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/4] UML - Remove unused variables in the context switcher
@ 2007-11-16 3:25 ` Jeff Dike
0 siblings, 0 replies; 6+ messages in thread
From: Jeff Dike @ 2007-11-16 3:25 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, user-mode-linux-devel, magotari
On Thu, Nov 15, 2007 at 04:15:21PM -0800, Andrew Morton wrote:
> I assumed from the above that Karol was the author of this patch. Please
> let me know if that was wrong.
He is - I forgot the From line...
Jeff
--
Work email - jdike at linux dot intel dot com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-11-16 3:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-14 19:20 [uml-devel] [PATCH 2/4] UML - Remove unused variables in the context switcher Jeff Dike
2007-11-14 19:20 ` Jeff Dike
2007-11-16 0:15 ` [uml-devel] " Andrew Morton
2007-11-16 0:15 ` Andrew Morton
2007-11-16 3:25 ` [uml-devel] " Jeff Dike
2007-11-16 3:25 ` Jeff Dike
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.