Commit b7de110044b4e26adcb7b278d14da93133692ed7

Authored by Mathias Krause
Committed by Linus Torvalds
1 parent f796062598

m68k, exec: remove redundant set_fs(USER_DS)

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>
Cc: Greg Ungerer <gerg@uclinux.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 3 changed files with 2 additions and 6 deletions Side-by-side Diff

arch/m68k/include/asm/processor.h
... ... @@ -105,9 +105,6 @@
105 105 static inline void start_thread(struct pt_regs * regs, unsigned long pc,
106 106 unsigned long usp)
107 107 {
108   - /* reads from user space */
109   - set_fs(USER_DS);
110   -
111 108 regs->pc = pc;
112 109 regs->sr &= ~0x2000;
113 110 wrusp(usp);
... ... @@ -129,7 +126,6 @@
129 126  
130 127 #define start_thread(_regs, _pc, _usp) \
131 128 do { \
132   - set_fs(USER_DS); /* reads from user space */ \
133 129 (_regs)->pc = (_pc); \
134 130 ((struct switch_stack *)(_regs))[-1].a6 = 0; \
135 131 reformat(_regs); \
arch/m68k/kernel/process_mm.c
... ... @@ -185,7 +185,7 @@
185 185 void flush_thread(void)
186 186 {
187 187 unsigned long zero = 0;
188   - set_fs(USER_DS);
  188 +
189 189 current->thread.fs = __USER_DS;
190 190 if (!FPU_IS_EMU)
191 191 asm volatile (".chip 68k/68881\n\t"
arch/m68k/kernel/process_no.c
... ... @@ -158,7 +158,7 @@
158 158 #ifdef CONFIG_FPU
159 159 unsigned long zero = 0;
160 160 #endif
161   - set_fs(USER_DS);
  161 +
162 162 current->thread.fs = __USER_DS;
163 163 #ifdef CONFIG_FPU
164 164 if (!FPU_IS_EMU)