[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] [PATCH] return from interrupt.
It was possible to get a process stuck in an infinite loop on the rfid
instruction.
The problem was that it was possible to get an interrupt during context
restore and when that happened after R14 was restored it resulted in an
infinite loop that gradually shrink down to include just the rfid
instruction.
Index: linux-2.6.x-petalogix/arch/microblaze/kernel/entry.S
===================================================================
--- linux-2.6.x-petalogix.orig/arch/microblaze/kernel/entry.S 2007-11-12 11:42:12.000000000 +0100
+++ linux-2.6.x-petalogix/arch/microblaze/kernel/entry.S 2007-11-12 11:43:44.000000000 +0100
@@ -143,7 +143,11 @@
no_intr_reshed:
/* save mode indicator */
lwi r11, r1, PT_MODE
-3:
+3:
+ /* Must protect the restore against interrupts */
+ /* schedule uses spin_lock_irq() and spin_unlock_irq() */
+ /* and even if schedule is not visited interrupts can be on */
+ disable_irq
swi r11, r0, PER_CPU(KM)
/* save r31 */
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/