m68k: use same start_thread() on MMU and no-MMU
authorGreg Ungerer <gerg@linux-m68k.org>
Thu, 21 Jul 2016 07:29:43 +0000 (17:29 +1000)
committerGreg Ungerer <gerg@linux-m68k.org>
Mon, 25 Jul 2016 04:40:40 +0000 (14:40 +1000)
The MMU and no-MMU versions of start_thread() are now identical, so use
the same common code for both.

Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
arch/m68k/include/asm/processor.h

index 46672d1f4d620ccd8a96302503eee2239d85dd58..c84a2183b3f0abb6110a2c17840d90baac59eb29 100644 (file)
@@ -110,7 +110,6 @@ struct thread_struct {
 #define setframeformat(_regs)  do { } while (0)
 #endif
 
-#ifdef CONFIG_MMU
 /*
  * Do necessary setup to start up a newly executed thread.
  */
@@ -123,24 +122,14 @@ static inline void start_thread(struct pt_regs * regs, unsigned long pc,
        wrusp(usp);
 }
 
+#ifdef CONFIG_MMU
 extern int handle_kernel_fault(struct pt_regs *regs);
-
 #else
-
-#define start_thread(_regs, _pc, _usp)                  \
-do {                                                    \
-       (_regs)->pc = (_pc);                            \
-       setframeformat(_regs);                          \
-       (_regs)->sr &= ~0x2000;                         \
-       wrusp(_usp);                                    \
-} while(0)
-
 static inline  int handle_kernel_fault(struct pt_regs *regs)
 {
        /* Any fault in kernel is fatal on non-mmu */
        return 0;
 }
-
 #endif
 
 /* Forward declaration, a strange C thing */