mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-01 12:04:08 +00:00
m68k: use same start_thread() on MMU and no-MMU
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>
This commit is contained in:
parent
120c4d95b2
commit
f987e5a13c
1 changed files with 1 additions and 12 deletions
|
@ -110,7 +110,6 @@ struct thread_struct {
|
||||||
#define setframeformat(_regs) do { } while (0)
|
#define setframeformat(_regs) do { } while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_MMU
|
|
||||||
/*
|
/*
|
||||||
* Do necessary setup to start up a newly executed thread.
|
* 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);
|
wrusp(usp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
extern int handle_kernel_fault(struct pt_regs *regs);
|
extern int handle_kernel_fault(struct pt_regs *regs);
|
||||||
|
|
||||||
#else
|
#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)
|
static inline int handle_kernel_fault(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
/* Any fault in kernel is fatal on non-mmu */
|
/* Any fault in kernel is fatal on non-mmu */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Forward declaration, a strange C thing */
|
/* Forward declaration, a strange C thing */
|
||||||
|
|
Loading…
Add table
Reference in a new issue