From: Greg Ungerer <gerg@linux-m68k.org>
To: linux-m68k@vger.kernel.org
Cc: Greg Ungerer <gerg@linux-m68k.org>
Subject: [PATCH 3/3] m68k: use same start_thread() on MMU and no-MMU
Date: Fri, 22 Jul 2016 10:40:09 +1000 [thread overview]
Message-ID: <1469148009-25426-4-git-send-email-gerg@linux-m68k.org> (raw)
In-Reply-To: <1469148009-25426-1-git-send-email-gerg@linux-m68k.org>
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 | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/arch/m68k/include/asm/processor.h b/arch/m68k/include/asm/processor.h
index 46672d1..c84a218 100644
--- a/arch/m68k/include/asm/processor.h
+++ b/arch/m68k/include/asm/processor.h
@@ -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 */
--
1.9.1
next prev parent reply other threads:[~2016-07-22 0:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-22 0:40 [PATCH 0/3] m68k: flat file load fix and cleanup Greg Ungerer
2016-07-22 0:40 ` [PATCH 1/3] m68k: fix bFLT executable running on MMU enabled systems Greg Ungerer
2016-07-22 0:40 ` [PATCH 2/3] m68k: fix file path comment Greg Ungerer
2016-07-22 0:40 ` Greg Ungerer [this message]
2016-07-29 4:39 ` [PATCH 0/3] m68k: flat file load fix and cleanup Greg Ungerer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1469148009-25426-4-git-send-email-gerg@linux-m68k.org \
--to=gerg@linux-m68k.org \
--cc=linux-m68k@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox