aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mn10300/kernel
diff options
context:
space:
mode:
authorAkira Takeuchi <takeuchi.akr@jp.panasonic.com>2013-09-10 12:20:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-10 17:54:59 -0400
commit3da06ed7366f6749ac333d1c051131c1a550755f (patch)
tree03fe3b9a13322bdb82a12e057244bedf84083b9e /arch/mn10300/kernel
parent31f7c3a688f75bceaf2fd009efc489659ad6aa61 (diff)
mn10300: Fix crash just after starting userspace on !CONFIG_PREEMPT
The mn10300 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 fixes the problem that was introduced by 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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mn10300/kernel')
-rw-r--r--arch/mn10300/kernel/entry.S6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/mn10300/kernel/entry.S b/arch/mn10300/kernel/entry.S
index 222152a3f751..177d61de51c9 100644
--- a/arch/mn10300/kernel/entry.S
+++ b/arch/mn10300/kernel/entry.S
@@ -171,10 +171,10 @@ ret_from_intr:
171 mov (REG_EPSW,fp),d0 # need to deliver signals before 171 mov (REG_EPSW,fp),d0 # need to deliver signals before
172 # returning to userspace 172 # returning to userspace
173 and EPSW_nSL,d0 173 and EPSW_nSL,d0
174 beq resume_kernel # returning to supervisor mode 174 bne resume_userspace # returning to userspace
175 175
176#ifdef CONFIG_PREEMPT 176#ifdef CONFIG_PREEMPT
177ENTRY(resume_kernel) 177resume_kernel:
178 LOCAL_IRQ_DISABLE 178 LOCAL_IRQ_DISABLE
179 mov (TI_preempt_count,a2),d0 # non-zero preempt_count ? 179 mov (TI_preempt_count,a2),d0 # non-zero preempt_count ?
180 cmp 0,d0 180 cmp 0,d0
@@ -189,6 +189,8 @@ need_resched:
189 bne restore_all 189 bne restore_all
190 call preempt_schedule_irq[],0 190 call preempt_schedule_irq[],0
191 jmp need_resched 191 jmp need_resched
192#else
193 jmp resume_kernel
192#endif 194#endif
193 195
194 196