* [PATCH] mn10300: Fix crash just after starting userspace on !CONFIG_PREEMPT
@ 2013-09-10 16:20 David Howells
0 siblings, 0 replies; only message in thread
From: David Howells @ 2013-09-10 16:20 UTC (permalink / raw)
To: torvalds; +Cc: dhowells, takeuchi.akr, linux-am33-list, linux-kernel
From: Akira Takeuchi <takeuchi.akr@jp.panasonic.com>
Kernel crashes just after starting userspace programs, if CONFIG_PREEMPT is
disabled.
Freeing unused kernel memory: 96K (90286000 - 9029e000)
MISALIGN: 97c33ff9: unsupported instruction f
MISALIGN: 97c33ff9: unsupported instruction f
MISALIGN: 97c33ff9: unsupported instruction f
:
This commit fix the problem. It was introduced by the commit d17fc238ac14
(MN10300: Enable IRQs more in system call exit work path).
Signed-off-by: Akira Takeuchi <takeuchi.akr@jp.panasonic.com>
Signed-off-by: Kiyoshi Owada <owada.kiyoshi@jp.panasonic.com>
Signed-off-by: David Howells <dhowells@redhat.com>
---
arch/mn10300/kernel/entry.S | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/mn10300/kernel/entry.S b/arch/mn10300/kernel/entry.S
index 222152a..177d61d 100644
--- a/arch/mn10300/kernel/entry.S
+++ b/arch/mn10300/kernel/entry.S
@@ -171,10 +171,10 @@ ret_from_intr:
mov (REG_EPSW,fp),d0 # need to deliver signals before
# returning to userspace
and EPSW_nSL,d0
- beq resume_kernel # returning to supervisor mode
+ bne resume_userspace # returning to userspace
#ifdef CONFIG_PREEMPT
-ENTRY(resume_kernel)
+resume_kernel:
LOCAL_IRQ_DISABLE
mov (TI_preempt_count,a2),d0 # non-zero preempt_count ?
cmp 0,d0
@@ -189,6 +189,8 @@ need_resched:
bne restore_all
call preempt_schedule_irq[],0
jmp need_resched
+#else
+ jmp resume_kernel
#endif
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-09-10 16:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-10 16:20 [PATCH] mn10300: Fix crash just after starting userspace on !CONFIG_PREEMPT David Howells
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®