public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sh, exec: remove redundant set_fs(USER_DS)
       [not found] <BANLkTinv1teZEHMK0qymaVdcxPOErpqSyg@mail.gmail.com>
@ 2011-06-10 13:10 ` Mathias Krause
  2011-06-14  6:33   ` Paul Mundt
  0 siblings, 1 reply; 2+ messages in thread
From: Mathias Krause @ 2011-06-10 13:10 UTC (permalink / raw)
  To: Paul Mundt
  Cc: Andrew Morton, Linus Torvalds, linux-sh, linux-kernel,
	Mathias Krause

The address limit is already set in flush_old_exec() so those calls to
set_fs(USER_DS) are redundant.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
---
 arch/sh/include/asm/processor_64.h |    1 -
 arch/sh/kernel/process_32.c        |    2 --
 2 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/arch/sh/include/asm/processor_64.h b/arch/sh/include/asm/processor_64.h
index 2a541dd..e25c4c7 100644
--- a/arch/sh/include/asm/processor_64.h
+++ b/arch/sh/include/asm/processor_64.h
@@ -150,7 +150,6 @@ struct thread_struct {
 #define SR_USER (SR_MMU | SR_FD)
 
 #define start_thread(_regs, new_pc, new_sp)			\
-	set_fs(USER_DS);					\
 	_regs->sr = SR_USER;	/* User mode. */		\
 	_regs->pc = new_pc - 4;	/* Compensate syscall exit */	\
 	_regs->pc |= 1;		/* Set SHmedia ! */		\
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c
index b473f0c..aaf6d59 100644
--- a/arch/sh/kernel/process_32.c
+++ b/arch/sh/kernel/process_32.c
@@ -102,8 +102,6 @@ EXPORT_SYMBOL(kernel_thread);
 void start_thread(struct pt_regs *regs, unsigned long new_pc,
 		  unsigned long new_sp)
 {
-	set_fs(USER_DS);
-
 	regs->pr = 0;
 	regs->sr = SR_FD;
 	regs->pc = new_pc;
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] sh, exec: remove redundant set_fs(USER_DS)
  2011-06-10 13:10 ` [PATCH] sh, exec: remove redundant set_fs(USER_DS) Mathias Krause
@ 2011-06-14  6:33   ` Paul Mundt
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2011-06-14  6:33 UTC (permalink / raw)
  To: Mathias Krause; +Cc: Andrew Morton, Linus Torvalds, linux-sh, linux-kernel

On Fri, Jun 10, 2011 at 03:10:48PM +0200, Mathias Krause wrote:
> The address limit is already set in flush_old_exec() so those calls to
> set_fs(USER_DS) are redundant.
> 
> Signed-off-by: Mathias Krause <minipli@googlemail.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-14  6:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <BANLkTinv1teZEHMK0qymaVdcxPOErpqSyg@mail.gmail.com>
2011-06-10 13:10 ` [PATCH] sh, exec: remove redundant set_fs(USER_DS) Mathias Krause
2011-06-14  6:33   ` Paul Mundt
     [not found] <BANLkTiknCeAxe30MJdVTxDom+ko8+EDQ4A@mail.gmail.com>
     [not found] ` <1307642718-22257-1-git-send-email-minipli@googlemail.com>

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox